Introduction: Picaxe MakerFaire Special Robot

About: I'm a robotics hobbyist and general tinkerer, among other things. Check out my blog or the LetsTalkRobots Playlist on YouTube: http://www.youtube.com/user/appterranova
This is a special Maker Faire edition robot kit designed by Let's Make Robots and Rocket Brand Studios, and based on the PICAXE-08 Motor Driver Board.


The purpose of this robot kit is to give new robot makers access to a quick and simple robot that provides experience in all the basics of robot building. The kit is easy to assemble and program, and introduces the maker to basic construction technique, locomotion, and obstacle detection. Using this kit as a base, you can learn quickly and then adapt the design. Modify the program. Add different sensors. Experiment and learn.

Step 1: Gather Your Materials

Materials Tools
  • Wire strippers
  • Wire cutters
  • Soldering iron and solder
  • Small flat-head screwdriver
  • Small Phillips head screwdriver
  • Needlenose pliers
  • fine toothed saw for cutting acrylic (or a laser cutter if you have one)
  • (optional) drill and small drill bit for cutting a mounting hole in your wheels if you make your own

Step 2: Solder Wires and Capacitors to Motors

Cut four 6 inch lengths of 22 AWG stranded wire. If you have different color wire, you might like to cut two of each color for this step.

Strip approximately 1/4 inch of insulation from the end of each wire. Twist the stranded ends of each wire into a tight spiral, this will prevent the wire strands from fraying as you work with them. 

(Optional) I recommend that you tin each wire end with your soldering iron. This makes soldering to the motors easier. Be sure not to use too much solder, or you will make it difficult to insert the wire into the solder tabs on the motor.

(Optional) If you used different color wires, now would be a good time to test your motors with your battery pack. Insert the 3 AAA batteries into the battery holder and close the cover. Align the motors the way they will need to be for the robot, with one output shaft sticking out to each side, as shown in the first picture. Carefully touch the red wire from the battery holder to one motor contact, and the black wire to the other motor contact, and see which way the motor spins. You want to identify which way will make both motors spin to move the robot forward. Because one motor is facing left and one right, the motors need to spin in opposite directions in order to move the robot forward. Take careful note of which contacts to use, and chose one color wire to represent positive voltage, and another color wire to represent ground (0 volts).

Carefully insert two wires into the motor contacts of one motor. Then spread the leads of a 0.1uF capacitor and insert one lead into each of the motor contacts. Be sure that one of the wires is still inserted into each contact, and solder them in place.

Repeat the soldering for the other motor. When you are done, it should look something like what you see in the second picture.

Step 3: Solder Wires to the Microswitches

Your microswitches may look slightly different than the ones pictured. Identify the contact that is 'common' and the contact that is 'normally open'. You will be soldering wires to these two contacts.

NOTE: If you attended one of the Let's Make Robots 'Anyone Can Make a Robot' workshops at Maker Faire NY, your microswitches are wired differently than described in this Instructable. We used the 'normally closed' contact instead of the 'normally open'. You can correct that yourself, or there is a special version of the program in Step 13 that will work with the switches wired this way.

Cut four 6 inch lengths of 22 AWG stranded wire. If you have different color wire, you might like to use a different color wire for the microswitches than you did for the motors.

Strip approximately 1/4 inch of insulation from the end of each wire. Twist the stranded ends of each wire into a tight spiral, this will prevent the wire strands from fraying as you work with them.

(Optional) I recommend that you tin each wire end with your soldering iron. This makes soldering to the switches easier. Be sure not to use too much solder, or you will make it difficult to insert the wire into the solder tabs on the switch.

Insert the end of one wire into the 'common' contact of the switch and solder it in place. Next insert the end of one wire into the 'normally closed' contact of the same switch and solder it in place.

Repeat the soldering for the other switch. When you are done, it should look something like what you see in the picture.

Step 4: Make the Chassis

Rocket Brand Studios designed a custom laser cut acrylic chassis for Maker Faire. This was a one-off design for Maker Faire. However, you can cut your own easily enough.

I recommend a simple 2 inch x 3-3/4 inch cut. You'll need two pieces, one for the bottom deck and one for the top. You can optionally make the top deck a bit shorter; 2 inch x 3-1/4 inch should do.

(Optional) Drill some small holes in the top deck for wire management, as shown in the two images below.

If you have a laser cutter or are want to try for a fancier cut, you can try to reproduce the Rocket Brand Studios design or create your own. 

Step 5: Make the Wheels

Rocket Brand Studios custom cut some acrylic wheels for the kit. This was a one-off design for Maker Faire. Cutting circles from acrylic is not easy without a laser cutter.  You can make your own, or buy something about the right size.

You want a wheel 1-1/8 inch to 1-1/2 inch in diameter. Definitely not more than 2 inches in diameter. 

I have successfully used plastic bottle caps as wheels a number of times, as shown in the second picture. You have to find the center to make a mounting hole that is about 1/8 inch in diameter. A wide rubber band like you find around lobster claws or bundles vegetables in the supermarket work great.

Another great way to add traction to smooth wheels is to cut traction bands from the necks of balloons. Big punching balloons work really well for this. See the third picture for an example of a balloon neck traction band on an acrylic cut wheel. 

Step 6: Attach the Motors to the Bottom Deck

Time to start putting it together!

You will use the double sided foam tape to attach the two gear motors to the bottom deck, as described below.

Align the edge of the first gear motor closest to its output shaft with one edge of the bottom deck. Try to center the output shaft from front to back (the longer dimension of the deck). However, you need to leave enough room at the front of the deck to fit the microswitches. Attach the motor to the deck using the double sided foam tape.

Now attach the other gearmotor to the other side of the deck, aligning the edge of the motor as you did with the first motor. Make sure that you have aligned the two output shafts in a straight line from the left side of the robot to the right. Attach the motor to the deck using the double sided foam tape.

Step 7: Attach the Top Deck

You will use the double sided foam tape to attach the top deck, as described below.

Align the back edge of the top deck with the back edge of the bottom deck. If your top deck and bottom are the same width from left to right, the outer edges of the two gearmotors should be aligned with the edges of the top deck. Attach the top deck to the motors using the double sided foam tape.

In the picture below the wheels are already attached, but you get the idea.

Step 8: Attach the Battery Holder and PICAXE Board

This is really very simple.

Use the double sided foam tape to attach the battery holder to the top deck. The wires from the battery holder should face the rear of the robot.

Now use the double sided foam tape to attach the PICAXE board to the top of the battery holder. The round programming jack of the PICAXE board should face the rear of the robot.

Step 9: Attach the Wheels

So you have either purchased or made or adapted something to use for wheels. Attach the wheels to the output shafts of the gearmotors now.

Use a #2 sheet metal screw and a lockwasher if  you have one.  Hold the motor shaft from turning using a pair of needlenose pliers as you tighten the screw. 

Repeat for the other wheel.

Step 10: Attach the Microswitches to the Bottom Deck

Use the double sided foam tape to attach the two microswitches to the bottom deck. Align each switch at the front of the robot, with the switch actuators to the sides.

Try to get the actuators to extend at least to the outer edge of the wheels. This will help ensure that the robot doesn't get caught on obstacles.

Route the wires through any holes you may have made in the top deck for that purpose.

Step 11: Set the Jumpers of the PICAXE Board

There are two little jumpers on the PICAXE board. You can refer to the AXE023 Motor Driver documentation for details of how these jumpers work.

Jumper H1 is closest to the circular programming jack. Set this jumper to 'PROG' when you want to program the board, or to 'RUN' when you want to operate the robot. Set it to 'PROG' for now.

Jumper H2 is closest to the other end of the board, near one end of the 16-pin Integrated Circuit (IC) chip. This jumper controls whether input headers for the board will both be used for Input C.3 or if one will be used for Input C.3 and one will be used for Input C.5. Set this jumper so that it connects the center pin to the one labeled '5', as shown in the picture. (Towards the IN3/5 header.)

Step 12: Connect All the Wires

What could be easier?

Attached the stripped ends of the wires into the screw terminal headers as listed below. You will use a small flat headed screw driver in this step.

As you connect the wires, route them neatly, using any holes you may have made in the top deck for this purpose.

NOTE: Make sure the switch on the battery holder is set to 'OFF' first!
  1. Attach the black ground wire of the battery holder to the 'OV' ground connector.
  2. Attach the red  wire of the battery holder to the 'V+' connector. 
  3. Attach one of the wires from the motor that drives the right wheel to connector 0. (Use the 'negative' or ground wire you identified in Step 2.)
  4. Attach the other wire from the motor that drives the right wheel to connector 1. (Use the 'positive voltage' wire you identified in Step 2.)
  5. Attach one of the wires from the motor that drives the left wheel to connector 2. (Use the 'negative' or ground wire you identified in Step 2.)
  6. Attach the other wire from the motor that drives the left wheel to connector 4. (Use the 'positive voltage' wire you identified in Step 2.)
  7. Attach one wire from the microswitch on the right side of the robot to one of the two connectors labeled 'IN3/5'.
  8. Attach the other wire from the same microswitch to the other connector labeled 'IN3/5'.
  9. Attach one wire from the microswitch on the left side of the robot to one of the two connectors labeled 'IN3'.
  10. Attach the other wire from the same microswitch to the other connector labeled 'IN3'.

Step 13: Programming the Robot and Play!

Hey, we're done building and it is time to program the robot. An example program is provided below. You can adapt the program or write your own.

Example Program

NOTE: If you participated in a Let's Make Robots 'Anyone Can Make a Robot' at Maker Faire NY 2012, your bumper switches are wired differently than described in this Instructable. Use this version of the program instead. When you turn on your robot, you will need to hold closed the switches for a few seconds to 'wake up' the robot. 

You will need to download and install the PICAXE Programming Editor for your operating system. It's free. Be sure to follow the installation instructions carefully!

Connect your PICAXE USB Download Cable to your computer. Check the instructions on the PICAXE website to be sure you have the drivers installed correctly, and the correct COM port selected. We will not repeat their instructions here.

Be sure Jumper H1 is set to 'PROG'. Connect the other end of the PICAXE USB Download Cable to the circular programming jack on the PICAXE-08 board. Set the robot on something so that its wheels do not touch the ground. Turn the switch on the battery holder to 'ON'.

Use the PICAXE Program Editor to program the robot. After the program is downloaded, turn off the robot using the switch on the battery holder. Disconnect the programming jack. Set Jumper H1 to 'RUN', and set your robot down on the ground.

Turn the robot on, and watch it go! Whenever it bumps into something that contacts one of the two microswitches, it should stop and try to turn to avoid the obstacle. 

it is common the the robot may not drive completely straight when moving forward. This is because the two motors may run at slightly different speeds. It is not critical. However, if the robot does not drives backward instead of forward, or if it spins in circles, you need to change something.

You can fix these problems either in hardware by changing how the wires from the motors are connected, or in software, by changing with pins are set to high or low in the program. 

If the robot drives backwards instead of forwards, then the motors are BOTH wired backwards, and needs to be changed in either software or hardware.

If the robot spins to the left instead of driving forwards, then the LEFT motor is wired backwards, and needs to be changed in either software or hardware. 

If the robot spins to the right instead of driving forwards, then the RIGHT motor is wired backwards, and needs to be changed in either software or hardware.

Don't be upset if your robot misbehaves at first. This is a great learning opportunity!

Step 14: References

Now that you've started, keep learning! Here are some references for you.

PICAXE: Robot Building Community: Some other great kits and products are available from:
Hands-on Learning Contest

Finalist in the
Hands-on Learning Contest