April 3, 2003, Ramona Cone


Erin and I finalized our method for reading and storing intersection data. We decided to store the distance to the intersection and direction to go once the vehicle reaches the intersection in one byte. See fig. 1 below. Where bits 0-2 will store which direction the vehicle should go: Left (bit 2 set), Center (bit 1 set), or Right (bit 0 set). The distance we are expecting to travel is going to be stored in bits 3-7. The distance is stored as (actual distance)/10. Ex. Distance = 240 ft, the value stored will be 24.

7 6 5 4 3 2 1 0

Fig. 1. Intersection byte

* Note: We need to add a 'PANIC' feature to our code. If operation fails while testing outdoors we can press a button and stop the vehicle.

I started working on updated flowcharts for our Lost Edge/Turn Modes in the microprocessor. I still need to complete working on them. When complete I will post them on here.

Our technician finished up some loose ends for us this week: power supply connection to microprocessor, remounted keypad, mounted DC/DC converter, and mounted a reset swtich for the microprocessor. Once he was done I was able to get all of our hardware connected and the system running only off of the 12V battery supply.

Then I started testing the systems. I tried running the code to run the motor, but I ran into problems. The PWM signal for the motor is output by the microprocessor on P1.2. When there was no connection to the hardware from that pin the signal behaved as expected (TTL). Once there was a connection to hardware the signal was pulled down to approx. 1V. So, as a solution I placed a resistor between P1.2 and +5V. But this created a new problem. When P1.2 was low the signal was still high going into the hardware . To solve this I used and AND gate with the PWM and a new signal on P1.7 as the inputs . Its output went to the hardware. In the software, T2IO when set will turn motor on and when clear will turn motor off. I made a small block of code that will manipulate P1.7 to be the same value as T2IO. This solved that problem and controlled the motor.

I was retesting the code to operate the linear actuator, that I mentioned in March 27, 2003 labnotes, since we were now using the onboard EMAC. When I ran the code that worked last week I got terrible results. It would go full right, but full left ended up being the center position and center was partial right. I thought that noise from the H-bridge was causing the problem. But, if that was the case it would have caused problems last week during the tests. Then I realized that the only thing different was the microprocessor. So, I switched to another microprocessor kit and the code worked once again. My conclusion is that the A/D converter on the onboard microprocessor is not working correctly. I have left a note with the technician for him to repair.

While testing the code to run the motors, I noticed that only one of the wheels was moving. I went and troubleshot the hardware and determined that the connections on the relay had shaken loose. I will need to ask the technician to correct this problem. Once we are outside testing, the current connections will not hold up.

Our goal is to be outside testing this coming Tuesday, but with the A/D problem I am not sure if that is going to be reality.

April 3, 2003, Erin Cundiff


Today I will work on testing the acoustic sensor circuit that I wire wrapped last week. I tested the sensor 1 circuit first, and it was not working. I started trouble shooting, and I found that my diode was the component that was not working. I replaced the d1N4148 diode with a new diode, and then the circuit worked properly. Next I tested the sensor 2 circuit, and it also worked properly. The sensor circuit can be seen in Figure 2 below.



Figure 2. Sensor Circuit for Filtering Analog Signal

As Ramona said in her notes, we discussed the mapping of the quad. I am responsible for this, and I have been putting a lot of time thinking about the best way to do this. As Ramona discussed above, the distance information and the information indicating whether the vehicle will turn right, turn left, or go straight will all be stored in one byte. Each intersection will have its own byte, and there are five possible intersections the vehicle can go to. See Figure 3 below to see a map of the quad and the location of these five intersections. Note that there is a specific starting point for the vehicle.



Figure 3. Jobst-Baker Quad Map

After I made sure that my wire wrapped circuits were working properly, I started working on making the appropriate connectors for my circuit to the EMAC board and the power supply. Making these connectors required some soldering. After I finished making the appropriate connectors, I tested my circuits again. Unfortunately, it appears that the soldering may have damaged one of the sensors. Time has run out today, but I will be back in tomorrow to do some more testing to determine if I need a new acoustic sensor.

Return to Note links