Thursday, February 5, 2009

nudgebot part 4


The brain board

The brain board was connected to the main board by a custom built six pin connector. On the main board I cut up a standard 8 pin DIL socket so I had two 3 pin connectors. These then went next to each other on the main board. The six connectors were power/ground/left sensor/right sensor/right motor/left motor. On the brain board I used an extended 6 pin connector (cut down from a 12 pin connector) that was approx 1.5cm long. This was then soldered into the main board.

Bottom of the brain board

However the first one I used turned out to be too short once the AA batteries were installed (always measure with everything in place!). This caused a problem as when I unsoldered it a number of the copper tracks came off too. Thus the second header was not as securely connected. Over time this weakened quite a bit and in the end I had to reinforce the entire lot with a big glob of epoxy glue to stop it from falling apart. Given the choice again I would just use a standard molex connector or like.

The brain board consisted of the 556 and 393 chips and associated variable resistors/resistors/etc. I used a small board (approx a third the size of the main board) and even that gave me plenty of room. I changed the circuit slightly from the original breadboard design by adding variable resistors to the time circuit in case it needed to make a few adjustments (in case my timings were off on the breadboard). After a few hours of careful soldering I was all done and ready for the first test.


Nudgebot read to go

Things started to look promising. Nudgebot drove well, detected the white line and turned, sometimes. Also there was a humming coming from the relays. Basically the relays were getting stuck (ie latching). The voltage would be at 3.5V approx and the relay wouldn't unlatch. This never happened on the breadboard design. After much trial and failure I did the obvious and used the 555 timer chip from the breadboard instead of the one I purchased for the brain board. Total success. Why were my two 556 timer chips so different? Well the issue was the design. When using a 555 to drive a relay you need a diode in series to prevent latch up. The book I had got the 555 design from specifically mentions it. I had just missed it and the breadboard 556 timer chip obviously handled this better than the other one. So I went with the breadboard 556 timer chip with a todo note for adding in the diodes in series when I get time.

With the bread board done the circuit was finished. Nudgebot worked great. It travelled well, detected the white line without issue, turned, etc. Only quibbles were the values I used for the variable resistors in the timing circuit were too high. At the lowest setting they triggered for approx 1 sec which with the motors resulted in a 100-160 degree turn. Fine but would be nice to have better control. Also as usual the motors performed differently with one motor slightly faster than the other and the turn being impacted by this. Again for a dumbbot this was fine. In fact the uneven turn meant that Nudgebot was unlikely to get stuck in a forward/reverse loop so it was kind of a blessing in disguise.

No comments: