| Building the Bot
I start by placing all the 1206 surface mount components. Placing these is tricky at the best of times so having a flat board on which to work is a boon.
Getting the orientation of the LED's and phototransistors right is crucial. Here's a close up view so you can see the proper orientation.
Here's how I bent the legs of the forward facing ultra-bright LED and phototransistor. This guarantees proper placement.
Pin 1 of the PIC18F1320 is to the left of the board (as seen from the front). The corners of the PCB under the bumper switches ought to be removed by sanding or a Dremal tool which I did on the prototypes. Since I only use these for calibrating the robot for now I left the board as-is on later builds. I also used a socket for the PIC chip but this isn't really necessary.
There's nothing really tricky on the rear of the robot. I put a black mark on the PCB to mark the battery ground connection. A helpful reminder for when you've forgotten which way around it goes.
Here you can see the small power switch which has been added beside the mode switch. Small pieces of double sided tape hold the servos in place. The servos are quite oily so clean then well with a window degreaser or a solvent like isopropyl alcohol. The PNP transistor (if using the 2N4403) mounts with the flat side towards the edge of the board.
The servos fit snuggly in place. A small piece of duct tape finishes the job. A 4-cell AAA battery pack is mounted on top of the servos. Don't let the pack hang over the rear edge of the servos as this will block the servo pins on the PCB.
A brass picture hook is soldered to the copper rectangle. This acts as a drag foot. Bend it so that the PCB is level with the wheels attached. I used 4cm diameter wheels.
The wheels came from Dollar Store toy motorcycles. The toys I bought came with 4cm diameter and 3.5cm wheels. The large ones worked best. A simple disk cut from a thin sheet of plastic or MDF would suffice. If you want more traction you can glue a rubber band around the perimeter.
Finally, small pieces of black shrink wrap tubing were snugged over the phototransistors. This helped a lot in reducing the effects of spurious light sources.
Next Section: Writing the Code