Introduction: Octagon Acrylic Robot
Step 1: Parts List
- 3 sheets of 1/8" Acrylic 12" x 12" (available from Tap Plastics or your local plastic retailer).
- 1 sheet of 1/16" Acrylic 12" x 12" (available from Tap Plastics or your local plastic retailer).
- 1 Basic Stamp Board of Education Full Kit (part number 28803, available from Parallax).
- 1 Mondo-tronics' Mini Dual H-Bridge Circuit Kit (part number 3-301, available from Jameco).
- 2 Tamiya Planetary Gear Box Sets (part number 72001, available in hobby stores and on the web).
- 1 Tamiya Narrow Tire Set (part number 70145, available in hobby stores and on the web).
- 2 Casters with Ball Bearings. Ball bearings are critical to ensuring the robot can turn smoothly. Wheels should be 1 3/8" in diameter. (available from local hardware stores).
- 5 LEDs. Colors are not critical, but I recommend using three colors. I used one red, two green, and two orange. (available from RadioShack or other electronics parts retailers).
- 5 470 Ohm 1/8 or 1/4 watt resistors - color code Yellow Violet Brown. (available from RadioShack or other electronics parts retailers).
- 2 "AA" two cell battery holders. (I used Eagle Plastic Devices part # 12BH321A-GR available from Mouser Electronics).
- 4 "AA" Alkaline Batteries.
- 1 9 Volt Battery.
- 1 8" length of green wire.
- 1 8" length of blue wire.
- 1 8" length of red wire.
- 1 8" length of black wire.
- 1 4" length of white wire.
- 10 small lengths of wire for use as jumpers on the bread board (these come with the Board of Education full kit).
- 2 Two position terminal block connectors (available from Jameco, part number 164794). This part is optional as explained in a subsequent step.
- 4 #40 1" Round head bolts
- 4 #40 Nuts for mounting the Board
- 4 1/2" Nylon spacers for the #40 bolts
- 4 #8 1 3/4" Round head bolts
- 12 #8 Nuts
- 16 #8 Nylon washers
- 8 #8 3/8" Nylon bolts
- 8 #8 Nylon nuts
- 8 #8 Nylon washers
- 8 #40 5/16" Round head bolts
- 8 #40 Nuts
- 8 #40 Washers
- 4 #40 3/8" Round head bolts
- 4 #40 Nuts
- Laser Cutter. I used an Epilog Laser Cutter at Techshop. If you don't have access to a laser cutter you can use hand/power tools to cut and drill the acrylic sheets.
- Small flat head and Phillips head screwdriver.
- Small needle nose pliers.
- Wire strippers and wire cutters.
- Soldering iron and solder.
Step 2: Overview
The Octagon Acrylic Robot is a simple robot that uses a Basic Stamp mounted on a Parallax "Board of Education" to control two motors that allow the robot to move along a programmed path. The Basic Stamp sends signals to a H-Bridge circuit which, based on the inputs, will make the motors move clockwise, counter-clockwise or stop. The H-Bridge is a kit from Mondo-tronics and was chosen because it supports two 3 volt DC motors and is small enough to plug into the bread board on the Board of Education.
LEDs are used to indicate what the program is doing. The red LED is illuminated when the program is running, the green and orange LED's illuminate when signals are sent to the H-Bridge. A schematic is shown in the diagram below.
Locomotion is provided by two Tamiya Planetary Gearboxes. The Gearbox includes a motor and slows down the motor to a speed that will make the robot move at a reasonable speed with decent power. Two casters are mounted on the bottom along with the wheels to provide a stable movable base.
The robot is mounted on two octagonal platforms made of Acrylic. The gearboxes, wheels, and casters are mounted on the bottom of the lower platform. Two "AA" two-cell battery holders are mounted on the top of the lower platform. The "AA" batteries provide power to the motors. The Basic Stamp Board of Education is mounted on the top of the upper platform. Center holes in each of the platforms allow wiring to be routed to the various components. The upper platform is mounted to the lower platform using four bolts and a bunch of washers and nuts.
The robot is programmed in a variant of Basic. Programs can be compiled and downloaded to the Basic Stamp via a USB or Serial cable with free software tools available from Parallax. A complete description of the program as well as the actual program is in Step 15.
Step 3: Cut the Acrylic Parts
The first step is to cut the two acrylic platforms and the motor mounts. The platforms are octagons with holes cut for mounting components. I used QCAD to create the precision drawings for cutting the platforms and then imported the QCAD DXF files into CorelDraw and then used an Epilog laser cutter at TechShop to cut the acrylic. Epilog laser cutters are very easy to use - they connect to a computer like a printer and then you just "print" the design: the Laser Cutter cuts where there are lines and engraves where there are bitmap graphics. In this case, with these designs, it just cuts the base and the holes. If you don't have access to a laser cutter, you could cut the platform out with hand/power tools and print the DXF files (attached to this step) as a guide to drilling the holes.
The bottom platform is shown in the first image below. It has mounting holes for the motors, the casters, the battery holders, and for the bolts that are used to hold the top platform. There is a center hole for passing the motor power wires up to the top platform. You should check to make sure that the holes for the battery holder and casters align properly since the ones you get may not be exactly the same as mine: if they don't match you will need to tweak the DXF file accordingly.
The top platform is shown in the second image below. There are mounting holes for bolts from the bottom platform, for the Basic Stamp Board of Education, and a center hole for passing the wires from the batteries and motors upwards to the Board of Education. If you plan to use an Arduino or other micro-controller, you will need to change the DXF file to reflect that board's mounting holes.
You will also need to cut the motor mounts. The mounts are needed to make sure that the wheels on motor line up properly with the wheels on the casters - you want the robot to sit completely flat and not wobble. Based on the casters I used, I needed to use two pieces of acrylic for each motor: one was 1/8" thick and one was 1/16" thick. The design in the same for both thicknesses: you use the same DXF file to cut all of the spacers.
The DXF files I used are attached below. Note: the title of files say "Hexagon" but they really do contain the Octagon pattern.
Step 4: Assemble the Motors and Wheels
- Assemble two Tamiya planetary gearbox / motor sets according to the instructions that come with them. When you assemble the gearbox, you have a choice of gear ratios: I used a ratio of 400:1 so the robot would have maximum torque and power.
- Assemble the Tamiya wheels according to the instructions that come with them.
- Attach the wheels to the gearboxes as shown in the last photo.
Step 5: Mount the Motors
- Sandwich one of the 1/8" motor mounts and one of the 1/16" motor mounts between the motor and the bottom platform.
- Align the holes and insert the bolts into the holes and secure with the washers and nuts. It doesn't really matter whether the top of the bolt is coming up from the bottom or is on the bottom platform although I'd recommend the former (as shown in the second photo) because it makes it easier to remove the motor later if necessary.
Step 6: Mount the Casters
Mount the casters on the bottom platform using the nylon screws, washers, and nuts as shown in the photos below. I used nylon parts to help minimize the weight of the robot.
Step 7: Wire and Mount the Battery Holders
- Wire the battery holders as shown in the second and third photos below. Use about eight (8) inches of wire for positive and negative wires so you will have enough to reach the circuit board mounted on the top platform. Use about three (3) inches of wire to connect the two battery holders together.
- Mount the battery holders to the top of the lower platform using the small bolts and nuts as shown in the fourth and fifth photos. Note that the batteries holders are on the opposite side from the motors and casters.
- When both are mounted they will look like the sixth and seventh photos.
Step 8: Assemble Platform Stands
The upper platform is supported by four bolts attached to the lower platform as shown in the photos below. Nylon washers are used to prevent damage to the acrylic platform which scratches easily. Tips for assembly are in the image notes.
Step 9: Assemble the H-Bridge
Assemble the Mondo-tronics' mini dual H-Bridge kit according to the directions that come with it or at the Mondo-tronics website. I selected this H-bridge because it supports two 3 volt motors and is very small. Solder long green and blue wires to the H-Bridge that will later be connected to motors. The green wires go to one of the motors and the blue wires to the other.
Step 10: Wire the Bread Board
- Install the wires that will power the LEDs and will send the control signals to the motors via the H-Bridge as shown in the first figure.
- Install the LEDs as shown in the second figure: polarity is important - the long lead on the LED goes in hole on the right side and the shorter lead in the hold on the left side. You can use whatever color LEDs you want. The P14 LED (red) is illuminated to indicate that the program is running, the P13 and P12 LEDs (green) are illuminated when control signals are sent to the "B" motor inputs on the H-Bridge and the P11 and P10 LEDs (orange) are illuminated when control signals are sent to the "A" motor inputs on the H-Bridge.
- Now install the 470 ohm resistors as shown in the third diagram. These are current limiting resistors for the LEDs.
- Next install the black motor ground wires as shown the fourth diagram. This wire connects the ground to the Vss header. At this point the board should look like the photo following the diagram.
Step 11: Mount Basic Stamp Board of Education
The Basic Stamp Board of Education is mounted on the upper platform with screws and nylon spacers are shown in the first four photos below. Views of the mounted board are in the second and third photo.
In step 9, blue and green wires were soldered to H-bridge for connection to the motors. This was necessary because the wires from the motors are short (a couple of inches) and will not reach the H-bridge. I used the connector in the fifth and sixth photos to connect the wires to the motors. I used a connector with screws so make it easier to disassemble the robot if needed. Attach the connectors to the H-Bridge blue and green wires as shown in the fifth and sixth photos.
If you can't find connectors like these you can solder the wires instead and insulate them with electrical tape as described in the next step.
Step 12: Complete the Wiring Between the Platforms
- Route the blue and green wires under the Board of Education and through the center hole.
- Pull the motor wires up from underneath the lower platform through the center hole.
- Connect the blue wires to the red and black wires of one of the motors and the green wires to the red and black wires on the other motor as shown in the first and second photo. If you can't find connectors like these you can solder the wires instead and insulate them with electrical tape.
- Route the power wires from the battery packs up through the center whole in the upper platform as shown in the third and fourth photos.
Step 13: Final Wiring
- Install the motor power wires as shown the first diagram. The lower red and black wires go to the 6V battery pack on the lower platform.
- Insert the Mondo-tronics' Mini H-Bridge into the breadboard as shown in the second diagram. The board should be installed with the flat side of the circuit board facing outwards and should look like the two photos following the diagram.
- Lastly, install the 9V battery that will provide power to the Board of Education as shown in the next two photos.
Step 14: Voila! Fully Assembled!
Assembly of the Octagon Acrylic Robot is now complete. The robot should look like the photos on this step. In the next step, the program will downloaded to the robot and it'll be ready to run.
Step 15: Program the Robot
To start the robot, place it on a flat surface and slide the switch on the Board of Education to the "2" position and the robot should start - the LEDs should flash like Cylon eyes and the robot should start moving. If not, press the "reset" button and all should be well. After the robot has completed running the program it will stop. Press the "reset" button to restart the program.
The flow of the program is shown in the first diagram on this step. The program starts by making the LEDs flash like Cylon eyes, then moves forward for five seconds, stops the motors then goes backwards for five seconds, stops the motors, then turns left for five seconds, stops the motors, and then turns right for five seconds. The program then makes the LEDs flash like Cylon eyes and stops.
The program has five high level subroutines for controlling the motors: motors_forward, motors_backwards, motors_turn_left, motors_turn_right, and motors_stop as shown in the second diagram.
- motors_forward subroutine makes both motors turn clockwise.
- motors_backward makes both motors turn counter clockwise.
- motors_turn_left turns by making motor A go clockwise and motor B go counter clockwise.
- motors_turn_right turns by making motor A go counter clockwise and motor B go clockwise.
- motors_stop turns both motors off.
- Set the direction of the motor by turning on or off the two control signals. The H-Bridge documentation explains how an H Bridge works in more detail.
- Turn the appropriate LEDs on / off to match what signals are sent to the H-Bridge. This isn't required for movement but is very useful for debugging and makes the robot "look" cool.
The cylon_hello_world subroutine makes the four motor control LEDs illuminate and move back and fourth like Cylon eyes. Who knows? This robot could be Six's great, great, great, great, great, great grandparent (a little Battlestar Galactica humor is only fitting for a robot instructable).
Step 16: Ideas for Adding Sensors
The Octagon Acrylic Robot can be easily expanded to include sensors that can be used to control the robot's movements. Pins P5 through P10 are available to be used as inputs for the sensors. Most sensors include instructions and sample code that show how to use them with a microprocessor like the Basic Stamp or Arduino. An ultrasonic sensor can be used to prevent the robot from colliding into walls and traversing open paths. You can add micro-switches to sense when the robot is about to bump into a wall or object. Light sensors can be added to make the robot move towards or away from light sources. There are even GPS devices available you're robot can make decisions based on it's location. Photos of these sensors are shown in the images below.
We have a be nice policy.
Please be positive and constructive.