spacer Building the Bot

Link to schematic for the robotPCB for robotHere's the schematic for the robot plus the PCB that you can use to make your board via the toner transfer method. These were drawn using dipTrace.


LED hookupI've marked the locations of the components on the diagram below. It is seen from the bottom. Be careful hooking up the LED's and phototransistors (marked by the group of 4 circles). The cathode goes to ground (the thick trace) for both. I've marked the emitter, base and collector on the transistor in case you choose to use a different PNP, otherwise the shape of the package guarantees correct placement.

Assembly Guide for Robot
Bottom view of the robot board.

Surface mount components

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.

Downward facing line sensor

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.

Forward facing range sensor

Here's how I bent the legs of the forward facing ultra-bright LED and phototransistor. This guarantees proper placement.

Range sensor soldered in place

Placing the PIC18F1320 and bumpers

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.

Rear components in place.

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.

Double sided tape holds the servos

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.

Servos in place with a piece of duct tape

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 pickture hook acts as a drag foot

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.

Finished robot

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