David Cook thinking about robots David Cook
a robot
home | projects | contact | copyright & disclaimer | books | links

Roundabout Printed Circuit Boards Assembly Tips

Roundabout's motherboard (top left), daughterboard (top right), and floorboard (bottom middle) printed circuit boards
Roundabout's three printed circuit boards: motherboard (top left), daughterboard (top right), and floorboard (bottom middle)

Parts #RNDMPCB, #RNDDPCB, and #RNDFPCB. Or part #RND Deal for the bundle.

Printed Circuit Boards

This page contains component placement instructions for the printed circuit boards (PCBs) for Roundabout, the room-exploring, line-following, sumo-battling robot. This information is applicable for boards matching my template, whether you purchased ready-made boards or etched your own.

In any case, you need the book Intermediate Robot Building to understand the circuits and to obtain the online resources. The link to the online resources page is on the final paragraph of page xxii. The online resources page contains updates, templates, PCB files, source code, and the parts list.

Download the parts list spreadsheet to see part descriptions, part values, which board it is located on, part prices, and example suppliers. Because of limited free space on the PCB itself, some parts are only labeled with their part number ("C2") without their part value. Simply look up the part number in the spreadsheet for all the information.

Left: Roundabout PCB #4 screw hole pattern matches Sandwich PCB. Right: The daughterboard also includes smaller holes for tapping, if desired
Left: Roundabout PCB #4 screw hole pattern matches Sandwich PCB.
Right: The daughterboard also includes smaller holes for tapping, if desired.

Screw Holes

There are four large screw holes on the boards (on the floorboard, only the rear two holes are necessary). These are for attaching the finished boards to the robot's body with #4 screws. On ready-made boards, the screw holes are not threaded -- the screws should simply pass through. If you're etching your own board, you can choose to drill a smaller hole and tap it, if you desire.

The motherboard, daughterboard, and rear two screw holes on the floorboard match the same pattern as those on the Sandwich PCB. This makes it easy to install the Roundabout circuitry inside of or on top of Sandwich's body if desired.

The daughterboard features five spare screw holes (two in the rear of each side and one in the center) that are small enough to permit the holes to be tapped with threads for #4-40 screws. PCB laminate isn't the best material for tapping, so consider these holes for light-duty use, such as mounting a thin speaker or decoration. For heavier usage, use a washer and a nut instead of relying on threads made in the PCB.

Half circle marking a via Bare wire soldered on both sides of the board to complete a via
Left: half circle marks a via. Right: Bare wire soldered on both sides of the board to complete a via


Throughout the board are a number of holes with a half circle above them. These indicate locations where the front side of the board needs to be electrically connected to the back side of the board. If you're etching your own board, you'll need to insert a bare wire (no plastic insulation) into the hole and solder the wire on both the front and back sides.

If you've got a ready-made board, ignore the half-circle holes; the board manufacturer has plated through the holes, making the connection and saving you time. Alternatively, you can use the half-circle holes as test points.

Left: PCB test points consist of a single hole with a square silkscreened around it. Right: Insert a 1-pin header to test a voltage (or frequency) at that point
Left: PCB test points consist of a single hole with a square silkscreened around it. Right: Insert a 1-pin header to test a voltage (or frequency) at that point.

Test Points

There are “official” test points throughout the boards. The test points are usually labeled with “TP” such as “+5VTP” or “TP38kHz”. On the ready-made boards, the test points are usually surrounded by a single silkscreened square.

You can attach a piece of wire (pointing out straight or in a loop) or a 1-pin standalone header to each hole to allow hook clips to attach for testing. Or, you can leave the test point holes alone and ignore them. They are not necessary for the robot to function.

On the motherboard, I would recommend at least using the TP38kHz and GND test points to make it easy to connect a multimeter in frequency mode to tune the emitters.

Resistors are non-polarized and can be inserted with either pin in either hole


Resistors are non-polarized parts, and thus can be inserted with either pin in either hole.

Left: Aluminum electrolytic capacitors have a stripe to indicate the negative (or GND) lead. Right: Tantalum capacitors have a stripe or '+' to indicate the positive lead.
Left: Aluminum electrolytic capacitors have a stripe to indicate the negative (or GND) lead. Right: Tantalum capacitors have a stripe or '+' to indicate the positive lead.


Larger value capacitors (1 µF and up) are usually polarized parts. That means you have to insert the correct lead into the correct hole or else the capacitor will be damaged when power is turned on. In particular, aluminum electrolytic and tantalum capacitors have a stripe, '+', or '-' symbol to indicate polarity. See the above picture.

Small value capacitors (less than 1 µF) are usually non-polarized parts, and thus can be inserted with either pin in either hole. If you don't see a polarity symbol (+ - or a stripe), then chances are the capacitor is non-polarized. Column F of the parts list spreadsheet indicates whether that part value is expected to be polarized or not.

Small value capacitors are usually non-polarized. Wide capacitors fit in the first and third holes. Small capacitors fit in the second and third holes.

Because capacitors come in different widths, I designed most of the capacitor locations with three holes, to accommodate capacitors with either 0.1 inch or 0.2 inch spacing. The middle hole is the same as the + hole. (You can turn the board over and see that those holes are simply wired together.) If you have a wider capacitor, it should fit into the first and third hole (ignore the middle hole). If you have a narrower capacitor, place it in the middle hole and the hole without the + sign.

For example, take a look at C1 on the bottom left side of the above picture. Due to lack of board space, C1 isn't labeled with the value. I looked up C1 in the parts list spreadsheet to see I needed to insert a 0.1 µF monolithic ceramic capacitor. There are only two holes for C1, so no confusion there. Column F says this is a non-polarized part, so either pin can be inserted in either hole.

Now take a look at C51 (right side of the above picture). The parts list shows this is the exact same type of part as C1. But, I had a little bit more room on that board, so I labeled it with the value (“0.1 u”) and provided a third hole just in case your capacitors are wide. Simple insert the capacitor in the middle hole and the hole without the '+'.

Insert an LED and or infrared emitter (IED) with the flat side (cathode) of the package matching the flat side of the silkscreen outline
Insert an LED and or infrared emitter (IED) with the flat side (cathode) of the package matching the flat side of the silkscreen outline.


LEDs are polarized parts and should be inserted such that the flat side (cathode) of the part package matches the part outline on the PCB. If for some reason the part doesn't have a flat (or you have covered it with shrink wrap tubing) you can simply test it on a multimeter (see pages 148-152 of Robot Building For Beginners) or with alligator clips (pages 156-159). To see if an infrared LED is lit up, you'll need to look through a digital camera.

Bicolor LEDs (LED1 and LED2 on the motherboard) can be a little trickier, as they light up in a different color when flipped. For Roundabout, consider the cathode to be whichever lead is connected to GND (or -) when the LED lights up red. If you insert the bicolor LEDs in the wrong orientation (flipped), then they’ll light up green instead of red and red instead of green. You can either accept this, or desolder and flip them.

Zener diode inserted such that the band/stripe matches the straight line on the diode symbol on the PCB.
Zener diode inserted such that the band or stripe matches the straight line on the diode symbol on the PCB.

Zener Diodes

Technically, the zener diodes in Roundabout are optional and can be left out completely. However, zener diodes provide protection to regulated components (see pages 136-140 of Intermediate Robot Building), and zener diodes are really inexpensive. So, I recommend installing a 5.6V zener diode for ZD11 (motherboard) and ZD51 (daughterboard).

Make sure to install the zener diode with the band/stripe matching the horizontal line (that the arrow is crashing into) on the diode symbol on the PCB. The robot won't work if you insert the zener diode in the wrong direction.

Molex connector inserted with strain relief / polarizing tab matching outline on PCB
Molex connector inserted with strain relief / polarizing tab matching the outline on the PCB.

Molex Connector

Molex KK connectors have a strain-relief/polarizing/locking tab to make sure the connection is made correctly and stays in place. Be sure to insert the Molex connector such that the tab matches the outline on the PCB.

You can substitute a different type or brand of connector with 0.1 inch spacing if you choose. A lot of builders use plain male square headers or female sockets (see page 345 of Intermediate Robot Building).

Alternately, you can save money by soldering wires directly to the board. However, it makes debugging and disassembly more difficult. Also, you can't as easily swap in different brains like the Sandwich-Roundabout retrofit.


Since this book and project is targeted for the intermediate builder, step-by-step instructions for installing resistors, connectors, and other parts should be unnecessary. Instead, this section concentrates on tips and options. However, if you have a question or would like for me to provide more information about installing a particular part, please don't hesitate to ask.

I have made about ten copies of Roundabout so far. I begin by opening up the parts list spreadsheet and sorting by Column D (Description). This bunches similar parts together. Sometimes I'll hide columns G through T, such that the Quantity Per Full Roundabout (Column U) is viewable onscreen at the same time as the part description. This makes it easy to pull the exact part and quantity from storage.

Completed Roundabout motherboard with all optional components. Ready for the daughterboard.
Completed Roundabout motherboard with all optional components. Ready for the daughterboard.

After getting all of the parts together, I'll grab one of the completed boards to act as a visual guide. See the picture above.

What follows are instructions and tips for components that exist specifically on the motherboard.

Schottky diode for motor driver protection inserted with the band/stripe matching the outline on the PCB.

Schottky Diodes

Diodes are polarized parts. Be sure to install them such that the band/stripe matches the outline on the PCB.

TO-220 package tab must match the PCB outline.

VR11 Voltage Regulator

The metal tab on the back of the TO-220 package of the voltage regulator must match the PCB outline.

The half-sphere on the Panasonic PNA4602M package should match the outline on the PCB.

IC3 and IC4 Panasonic PNA4602M Infrared Detectors

Important: This part has been replaced by the equally compatible Vishay TSOP4038. The half-sphere on the front of the detector package should match the outline on the PCB. Notice that the holes in the PCB are slightly askew to point the detectors slightly towards the sides.

The detectors leads should be inserted all the way down to the metal flanges. Don't let the detector sit up much higher than that, as the long leads will be subject to more electrical noise, causing false detections.

Three choices for N12 on the motherboard: Ignore, add a two-pin header, or add a Molex connector.

N12 or Test Points

One side of the motherboard has two holes labeled “+UN GND TP or Unreg N12”. These holes connect to the 9 V battery through the power switch. That makes these convenient test points for measuring the battery's voltage during operation. Alternatively, this could become the power supply connection for an external circuit, such as a bunch of LEDs that light up the robot's body.

Here are three options:
  1. Left side of picture: Simply ignore the holes.
  2. Middle of picture: Insert a 2-pin male header and use as unregulated (9 V) and GND test points.
  3. Right side of picture: Insert a Molex KK header and use them as test points or hook them to colorful LEDs (such as the tube LEDs in Sandwich).

Roundabout's motherboard can be protected against overcurrent with a PPTC.

Overcurrent Protection with a Polymeric Positive Temperature Coefficient (PPTC) Device

CB11 is near the power switch. This is the location for an optional overcurrent protection part (see pages 131-136 in Intermediate Robot Building). It acts as an automatic circuit breaker, preventing damage that would be caused by a short-circuit in either the motors or robot circuitry.

Since PPTCs are relatively inexpensive ($0.50) and easy to install (non-polarized), I recommend you use one (see the right side of the above picture). However, if you choose not to, you can't leave these holes empty. Instead, solder a bare wire between the holes (see the left side of the above picture).

Three options for reversed-battery protection: no protection, diode protection, p-channel MOSFET protection.

Reversed-Battery Protection

Also near the power switch, Roundabout features three options for reversed-battery protection (battery's +/- connections flipped).
Here are three options:
  1. Left side of picture: No protection. Solder a bare between C and A.
  2. Middle of picture: Protection with low voltage drop. Install a 1N5817 Schottky diode between C and A with the band/stripe (representing the cathode) towards the 'C'.
  3. Right side of picture: Protection with lowest voltage drop. Install a logic-level p-channel power MOSFET such that the gate, drain, and source pins are respectively in the 'G' 'D' and 'S'. Roundabout's PCB is designed with the IRFU5505 in mind, such that the metal tab would face the 'G D S' label. See pages 103-107 in Intermediate Robot Building for more information on the advantage of using a power MOSFET instead of a Schottky diode.
You can't leave these holes completely unused. You must choose one of the above options.

Left: Socket notch must match PCB outline. Right: Socket must be installed directly over PCB outline

IC DIP Sockets

Electrically speaking, IC DIP sockets are not polarized. They work even if installed in a flipped orientation. However, that may cause you to install the IC chip in the wrong orientation, which won't work and will likely damage the chip.

So, be sure to install all IC sockets such that the notch matches the PCB outline. Also, be sure to install the IC socket directly over the PCB outline, and not to one side or the other.

Some people choose to solder chips directly to the boards without using a socket. However, it is easier to debug (remove/swap a chip for testing) and easier to repair a board that includes sockets.

IC1 Big Decision

IC1 on the motherboard presents you with your most significant choice. Do you plan on adding the daughterboard to your Roundabout robot? Or is this motherboard going to be used standalone?

If you are not going to use a daughterboard, then go ahead and solder a 14-pin IC socket to the IC1 location on the motherboard. If you are going to use a daughterboard, then skip the 14-pin IC socket and follow the instructions on pages 343-355 of Intermediate Robot Building for adding boardmount sockets.

Yes, you can always change your mind and desolder one part and replace it with another later on. But, frankly, I always start with the boardmount sockets (not the IC socket) and test the standalone motherboard using a wire-wrap DIP socket as shown in Figure 16-8 on page 347 of Intermediate Robot Building.

Left: Motherboard only robot uses bare wires for JMP1 and JMP2. Right: Males headers with shunts provides options for either standalone motherboard or combined with daughterboard.

Sneaky Jumpers JMP1 and JMP2

Sitting beside IC1 are locations for two jumpers. Normally, the bicolor LEDs (LED1 and LED2) and wired to the same outputs and the motor driver controls. As such, the LEDs always turn red or green depending on whether the associated motors are going forwards or backwards.

With the microcontroller installed, I want the robot to be able to light up the LEDs even when the motors aren't turning. So, I added these sneaker jumper locations (JMP1 and JMP2) to disconnect the LEDs from the motors.

That means you've got to make a choice. If you plan on only using the motherboard by itself, then go ahead and solder a bare wire in JMP1 and JMP2. But, if you plan on attaching the daughterboard at some point, then solder two-pin male headers in JMP1 and JMP2. These headers will let you decide when to tie the LEDs to the motors (add shunts -- yellow things in the picture) and when to let them function independently (remove shunts).

Left: Power switch installed directly. Right: Molex connector for off-board power switch

Power Switch

There are two options for the power switch:
  1. If the motherboard is going to be used standalone and not inside of Sandwich, then the power switch location on the PCB will be easily accessible by your fingers. So, you may choose to solder the power switch directly to the motherboard (see the left side of the above picture).
  2. If the daughterboard is going to be on top of the motherboard or if the motherboard is going to be installed inside of Sandwich's Ziploc-container body, then the power switch will be difficult to access if it is installed on the motherboard. In that case, install a Molex KK connector and locate the power switch somewhere else (see Figure 16-17 on page 356 of Intermediate Robot Building).
I normally prefer to install the Molex connector (option 2 above) and use an externally located power switch. However, the one exception is when I made the mini-sumo version of Roundabout, as I wanted the power switch to remain buried on the motherboard (see item 5 in Figure 17-19 on page 390 of Intermediate Robot Building) so that the opposing robot wouldn't accidentally power off Roundabout.


Compared with all of the tips and options available on Roundabout's motherboard, the daughterboard is a breeze!

Completed Roundabout daughterboard
Completed Roundabout daughterboard.

Note the correct sets of holes for the IC socket and the male headers (installed from below)

Sea of Holes

There appears to be a sea of holes surrounding IC51 on the daughterboard. The top row and bottom row of holes are unused on the ready-made boards and can be ignored or used as test points. The row just above the IC outline and just below the IC outline (highlighted in red in the picture) are for soldering the IC DIP socket. The remaining two rows (highlighted is dotted yellow in the picture) are for soldering the male headers from below as described on pages 343-355 of Intermediate Robot Building.

Testing a pushbutton before installing onto the daughterboard.

Pushbutton SW65

The daughterboard has a location for the pushbutton. Only the top two pins of SW65 are connected to the circuit. It is important that you find the two pins on your pushbutton that are open (infinite resistance) when the button is not pushed, but that are closed (shorted, zero resistance) when the button is pushed. The easiest way to find the correct pins is by using a multimeter.

If you happen to solder a two-pin pushbutton to the bottom holes, or solder a four-pin pushbutton with the top two pins always open or always closed, then the robot won't be able to read the pushbutton presses (but no damage will occur).


Being the smallest board with the fewest components, the floorboard is the easiest to put together.

Completed Roundabout floorboard
Completed Roundabout floorboard.

Before soldering, cut the corners of the floorboard to match the radius of your robot's body if necessary

Cutting to Shape

The floorboard fits inside of Sandwich's Ziploc body or on a 6-inch diameter disc without needing to be cut. But, depending on the shape and radius of your Roundabout robot, you may want to cut the corners of the floorboard (see pages 380-381 of Intermediate Robot Building) to prevent the portions from sticking out of a round body. In any case, be sure to perform any desired cutting before installing components or soldering.

Position the floorboard where it is going to be located on the robot and mark the outline of the portion that sticks out. The two white lines on the corners of the ready-made board indicate safe areas to cut. Beyond that, double-check before cutting that you aren't going to snip any circuit traces. (For example, I chose to cut a little bit deeper in the above picture, actually entering the potentiometer outline.)

I used a table saw with a diamond blade to make straight cuts, but shears are also popular for cutting circuit boards. A Dremel with a cut-off disc can be used in a pinch. Always wear a breathing mask when cutting or drilling PCBs.

Photoresistors and resistors optionally replacing TSL257s and capacitors on the floorboard

Optional Photoresistors

After reading pages 376-378, if you are still not deterred from using photoresistors, then you can actually substitute photoresistors for TSL257s on the floorboard. Insert the photoresistor leads where the little half-circle appears inside of the TSL257 outline (see above picture).

IC86, C86, IC87, and C87 are not necessary if you're using photoresistors. However, you'll need to add two 10 kilohm resistors as shown in the above picture.


Here are the steps I go through to build Roundabout after the body is complete and the motors are installed:
  1. Gather the parts for the motherboard, daughterboard, and floorboard PCBs.
  2. Start with the motherboard.
  3. Insert all of the parts that have long leads that can be bent to hold themselves onto the board. Such as resistors, capacitors, diodes, IC sockets, potentiometers, PPTC, voltage regulator, power MOSFET, infrared detectors, LEDs, and so on.
  4. Solder all of those parts.
  5. Clip all of the leads.
  6. Insert, solder, and clip the leads of each part (one at a time) that won't stay in by itself, such as Molex connectors, test points, and the power switch. Sometimes a little silicone adhesive helps hold the Molex connectors in place when the board is turned upside down for soldering.
  7. Reheat each clipped solder joint (one at a time) to relive stress and be sure there are no poorly formed solder joints.
  8. Insert all of the chips in their corresponding sockets. IC1 needs the wire-wrap adapter since I always install boardmount sockets instead of a 14-pin IC socket.
  9. Connect a multimeter to the +5V and GND test points.
  10. Hook up a 9V battery and read the meter to make sure the board is generating 5V.
  11. Leaving the meter connected to the GND test point, hook the other meter probe (that was hooked to 5V) to the 38kHz test point.
  12. Tune R6 until reaching 38 kHz, plus or minus 100 Hz.
  13. Disconnect the multimeter.
  14. Tune R7 until the bicolor LEDs indicate no detection (no red) when no objects are present, yet light up red at the maximum distance possible when an object is present.
  15. The motherboard is now complete and tuned. I try it on Roundabout's body to make sure the motors work. I usually let the robot explore the room a bit just to be sure.
  16. Power off the motherboard.
  17. Repeat the installation and soldering process for the daughterboard with the exception of IC51's socket.
  18. Follow the instructions on pages 343-355 of Intermediate Robot Building for installing the socket. Frankly, I don't bother trying to get or make headers with two plastic stops (as were shown in Figure 16-9 on page 348). I just use the headers listed in the parts list spreadsheet with a single plastic stop orientated toward the bottom (where it will come in contact with the boardmount sockets on the motherboard).
  19. Insert both male headers into the boardmount sockets on the motherboard, with the single plastic stop flush with the top of the motherboard's boardmount sockets.
  20. Put the daughterboard on top, guiding the male headers into the correct holes. If you use a 3/4 inch nylon spacer without any extra washers or nuts between the motherboard and daughterboard, and you use the exact boardmount sockets and male headers as in the parts list, I find that the tips of the male headers will just stick out the top of the daughterboard, perfect for soldering without any trimming necessary. Make sure to insert screws and tighten the whole assembly (as shown on page on Figure 16-11 of page 349) before soldering.
  21. Trying to get the boards, headers, nylon spacers, and bolts together can be a huge pain. After soldering the front row of male headers to the daughterboard, I apply a drop of super glue to each nylon spacer where it touches the daughterboard. Then, after giving it time to dry, I disassemble the boards to solder the IC socket (IC51) and then reassemble the boards to finish the rear row of male headers. Since the nylon spacers are now gently stuck to the bottom of the daughterboard, it makes the subsequent reassembly much easier.
  22. Install the chips in their corresponding IC sockets in the daughterboard.
  23. Plug in the speaker.
  24. Set the DIP switch to DEMO mode.
  25. Connect a multimeter to the GND and +5V test points on the daughterboard.
  26. Power up the combination motherboard and daughterboard. The speaker should beep the version number and the meter should read approximately 5V.
  27. Press the pushbutton and test the LEDs, motors, and sensors.
  28. Power off.
  29. Install and solder the floorboard components.
  30. Connect the floorboard to the daughterboard.
  31. Connect the multimeter to the FL:R (and subsequently FL:L) pin on the right-angle Molex connector on the daughterboard as shown in Figure 17-18 and complete the calibration instructions on pages 384-386 of Intermediate Robot Building.
  32. Run through DEMO mode with the completed robot.
  33. Run through each of the modes (explorer, line-following, and sumo) with the completed robot.

Good luck! Enjoy!

Let me know if you have any questions.

Click here to see all projects...