3. The mechanics. To keep costs low I have merged the chassis and electronics board together and mounted all on a perforated prototyping board. Besides the microcontroller, the H Bridge, the voltage regulator, a couple of nails and a few screws, all the other parts I pulled out from a couple of broken VCRs found on the side of the street. They were different brands, but inside they looked the same. I needed 2 VCRs because they rarely have 2 similar DC motors inside. But here’s what I got:
DC motor with belt and wheels for the robot…
On-off switch…
IR photo diodes and LEDs, resistors and capacitors…
PNA4613 or something compatible, push buttons…
And now, let’s see how we can attach wheels and motors to the chassis:
Using a couple construction nails soldered to the perforated board as wheel axles! And drill 4 holes for each motor and tie it up with cable wraps! Don’t forget to twist the motor wires and solder 0.1uF ceramic capacitors between the motor leads and from the leads to the motor case. This will cut the noise to the circuit drastically:
Then plant the parts, using sockets for the ICs. Solder everything. Then start to make connections between pads according to the schematic using thin wire. Insert shrinkwrap tubing around the LEDs to shield any side IR light that might influence the sensor.


Now we need a third wheel… Using a plastic bushing I had in a box and a piece of metal from a VCR I made a small caster for the robot. Using 2 small wood screws I attached the battery box to the board.
Insert the batteries and program the robot.
Let’s check if it is working… Yes! The on/off LED indicator is lit, wheels start to spin fiercefully!

Now let's see if the sensor is working properly. As you can see in the picture, the left LED is lit but the right one isn’t. And the debug window shows: Left 1 Right 0
Good!

To see how I've programmed the robot, check out the Programming page...