Encoder Front Page
SRS Home | Front Page | Monthly Issue | Index
Search WWW Search seattlerobotics.org

The Basics

This column is intended to be a place to find really basic information on subjects related to robotics and electronics. If you have questions about the basics on these subjects, this column is for you. I invite you to submit questions or information to this column. Send me some mail.

Kevin Ross

The first thing you need, of course, is information. Anyone who does hobby level robotics really needs to have a particular book. Its called

Mobile Robots: Inspiration to Implementation
Joseph L. Jones
Anita M Flynn
ISBN 1-56881-011-3
A K Peters, Ltd
289 Linden Street
Wellesley, MA 02181
(617) 235-2210, Fax: (617) 235-2404

For the past couple of years this book is the hands down winner among robot builders. If you really wanted to understand all of the parts that go into a robot, this is the book to have.

Tricks of the Trade

Few things are more satisfying that building your own project from design to implementation. As you gain experience doing so, you find that you start developing a bag of tools and tricks for building things. This month, I would like to share with you some of the things that I have found very useful for building robots.


Almost everyone at one point or another has ended up directly wiring one sub-system to another. Usually, a few wires are soldered into place, or wire wrapped between boards. Of course, when you are building and debugging something as complex as a robot, there always ends up being times when you really need to disconnect those sub-systems, and you end up having to unsolder or unwrap a bunch of connections.

The obvious, but often overlooked, solution to this problem is to handle inter-connections using standard connectors between boards. Standard connectors, especially those with interlocking tabs, are extremely useful, time saving, and prevent you from doing something really nasty like wiring up Vcc and GND backwards. I am sure most of us can relate to burning up some critical part by a bonehead mistake like plugging a wire in backwards.

Connectors are especially useful if you are publishing your design for others to use. Connectors give a well defined interface between your design and other components. In my opinion, it makes for a more complete project.

There are many types of connectors available. Buying connectors surplus is usually a hit and miss ordeal. Often times, you can't get them in matching pairs. Or, if you can, you usually are stuck with 17pins, when you really only wanted 10. There are times when buying retail parts is worth the expense. This is one of those. The ability to buy matching parts is a nice feature.

Connectors in use on a CPU board.

I would like to expand on a type that many of the SRS members have been using with great success. The connectors are made by Molex/Waldom, are called the K.K. series, and are available from several sources. I usually order from Digikey, but Mouser and Newark also carry these. Looking in the catalog can be a little confusing. It isn't obvious exactly what you need to order from the long list of parts. I will explain what the different parts are, and what you need to order.

Crimp Pin, Terminal Housing, and "Center Header"

The connectors come in three basic parts. "Center Headers" are the pins that you will solder onto your PCB. Terminal Housings are the connector part that attach to the headers. Last but not least are the crimp pins that make the electrical connection.

The metal parts are available in tin or gold plating. I have been using the tin plated parts (which are cheaper) with no problems at all. If you would prefer, you can order the gold ones. Gold is more durable, but is also much more expensive ( over twice as much!) All of the part numbers I will describe are the tin plated versions.

You want to order .100" Center Headers. These will fit the industry standard .100" spacing of most PCB parts. For example, the BotBoard power and communication connectors are all on .100" (or 100 mil) centers. The other option is a .156", which is commonly used for higher power applications. I like to use the 'Straight Friction Lock Headers', which have a locking mechanism that requires a substantial force to disconnect. You can see the friction lock mechanism in the side view picture to the left.

Friction Lock Headers also only allow the connector to be attached in one direction. This helps prevent reversing the polarity on your connections. There are also polarizing ribs available on the terminal housings.

As with many parts, connectors are cheaper in quantity. If you plan to tinker over the next couple of years, I would recommend that you consider investing a few bucks on a supply of connectors. Most commonly used in my toolbox are 2pin, 3pin, 4pin, and 6pin connectors. You may have needs for other sizes (they come up to 12 pins), but I find a supply of these sizes works well. I usually purchase 10 of each.

The next part of the connector assembly is the terminal housing. For each size of Center Header, there is a matching terminal housing. I typically use the 'Center Crimp Terminal Housing with Locking Ramp and Polarizing Ribs'. This means the locking ramp interconnects with the Center Header to hold it securely, and the polarizing ribs help prevent a misconnection. The Polarizing Rib isn't critical, but I like it.

The final part are the crimp terminals. These crimp onto the ends of the wires, and then snap into place in the terminal housing. You will need one crimp terminal for each pin. I usually get a few extra, because you are bound to break some, or pull a wire out now and then. I usually buy in lots of 100, since the pins are cheaper that way.

Now, for an example from the Digikey catalog. Everything you need for assembling a 4 pin connector is shown below:

Quantity Digi-key Part # Description Price
1 WM4202-ND 4 pin Center Header Tin Plating .48
1 WM2002-ND 4 pin Terminal Housing with Locking Ramp .29
10 WM2200-ND Crimp Terminals for .100" Housings 1.05

By checking out the catalog, you can figure out how to order the rest.

One last thing to consider is the crimping tool. I have a whole bunch of different crimp tools from various sources. I also ended up with the 'real' crimping tool for the above connector parts. If you are planning on sticking with these connectors, I highly recommend getting the $13.75 Waldom hand crimp tool. The crimp terminals fit correctly, and the crimp is always tight and electrically secure. 'Other' crimp tools work, sometimes, but nothing like the original.

Connectors, as with any of the parts we order, can be expensive. However, I justify the expense to myself by understanding that the cost of one blown processor or motor driver can make the connectors worth the trouble. They also save quite a bit of time when building the robot, since taking the sub-systems apart is quite easy. Proper connectors can make the difference between a working project and a not-so-working project.


It still amazes me to see the number of robots and projects that use the power connector as the on/off switch. I admit that most of my first robots were initialized by trying to plug the battery onto the controller board using a two pin connector. It took a few toasted HC11's to realize the beauty of the power switch.

Slide, Toggle, and Pushbutton switches

Switches come in many styles. Three basic switch styles that are commonly used as power switches are the slide, toggle, and pushbutton. My personal preference is to be able to determine the state of the switch by looking at it. Therefore, I usually try to use toggle switches. You can see the state of a slide switch, but they require either a PCB mount, or a square hole in a panel, which is a pain to deal with. Pushbutton switches also have their uses if you have space constraints, but you can't easily determine is current state just by looking at it.

In addition to the power switch, I will often put a small, low power LED on the robot somewhere that also acts as visual verification that the power switch is on. Try to put this on the computer board if possible. Use a relatively high valued resistor if you are concerned with power consumption.

Most toggle switches mount in a small round hole which can be made with drill motor and bit. Your switch should be wired to your power source, so that when the switch is off, all power to the system is shut down. Many parts, especially motor drivers, have a nasty problem where feedback through various ground paths can cause them to engage. The last thing you want is for your motors to turn on at an unexpected time. Switching the power from the positive lead from your power source is a good way to ensure that this doesn't happen.

New switches are, to be honest, ridiculously expensive. However, the surplus market is full of decent switches for a reasonable price. Electronic Goldmine or All Electronics usually have a good assortment of switches available. Vetco in Bellevue, WA is also a place to find them on the cheap. As long as you aren't too picky, you can get switches for about $0.50 each. A handful of these will last you a while, and you will find that your projects will be easier to deal with.

Remember that if you mount your power switch to the chassis of the robot, be sure to use connectors to the board and to the batteries!

What else do you want to know? Send me mail and ask away. Kevin Ross