Submitted by vidam on June 19, 2008 - 1:49pm.
Hello there, my username is Vidam and I am submitting this work for the 3rd Society of Robots competition entry. This effort is also part of a workshop I am leading for the DC/MD/VA Robotics and Automation Team. Also this is my first tutorial for SoR! :-)
The steps I took to layout the sensors, MCU, batteries, and wiring are illustrated. Rigel will do basic obstacle avoidance and line following behaviors. The project assumes some basic skills in soldering, electronics, and programming. After completing this project you will be ready to implement more advanced sensors on this platform such as GPS, vision, and encoders as this platform is rugged and expandable and can be used indoors or outdoors. If you are under the age of 18, please get a knowledgeable adult to help.
Steps 1a-1d guide you through assembling the hardware and programming the actuators with PWM. Steps 2a-2c
guide you through setting up the sensors I/O and programming for sensors to test that they work. Step 3a-3c guidle you combining code for sensors and actuators. And finally, step 4a-4c guide you through playing with
your robot and showing off to your friends.
The Rigel Platform is 4WD and without the use of any kind of encoder it will be nice to know just how bad the error is in dead reckoning tasks. Reducing this margin of error either in code, or hardware will be investigated as part of this work. So let's get started building the robot. (Another problem is I cut my finger and bled over the wires when trying to strip wire. So be careful and don't hurt yourself with the wiring.)
Figure 1: Assembled Budget Robotics 4WD Rigel Platform
Step 1: ASSEMBLING HARDWARE
Assembling hardware in step 1 includes robot building, wiring assembly, MCU installation, battery configuration, and sensor mounting.
Step 1a: Assemble tools and parts :
Note you will need the following parts list to complete step 1. The links are places where you can purchase these items.
- Solder station,
- Heat shrink tubing,
- Cutters and wire strippers,
- Qty-2 Tamiya female connectors,
- Qty-2 Kyosho male connectors,
- 9-Volt Battery
- Battery connector,
- Battery charger and 5-cell, 6-V, 1700 mah rechargeable NiMH battery,
- Qty-2 Sharp GP2Y0A21YK,
- Qty-2 IC Sensor phototransistor IR Reflectors, (e.g. phototransistors)
- Arduino Decimella microcontroller,
- Rigel 4WD Platform from Budget Robotics,
- Qty-2 of 3" or 6" Y harness
- Thumbtacks or superglue
- Liquid Paper Whiteout
- Small adhesive breadboard
- PIN HEADER, 2.54 PITCH
- 0.1 Inch Header Pins (Single Row)
3" Female-Female Header Jumper
Step 1b: Assemble the chassis and other components
- Assemble the Rigel 4WD platform (item 13) according to the instructions provided with the kit using a screwdriver. The platform is shown in Figure 1.
- Install the Arduino (Item 12) as shown in Figure 1 with adhesive material such as velcro to keep it in place.
Step 1c: Crimping & Soldering
Tip #1-- plan out the design and layout for your sensors, batteries, and wiring before throwing stuff onto your chassis. This plan has been done already for this tutorial. The lower level of the Rigel chassis is the power distribution level for the MCU and sensors. It is where the batteries and other wiring are located. The upper level of the Rigel chassis is the processing level for MCU.
- Mount the IR sensors (Item 10) to the front and back of the
Rigel platform. You can use thumbtacks or superglue to mount them to
- Solder 4-lead wires to the Phototransistor and mount them underneath Rigel as shown in the pic. Use the datasheet to help you understand the wiring. If you are having trouble interpreting the phototransistor datasheet, read this forum post .
- Using a small adhesive breadboard wire up a voltage divider circuit. Use 10 kOhms for each phototransistor. To understand voltage divider circuits read about them in the SoR tutorial.
- Mount the rechargeable 5-cell, 6V battery (Item 8) to the first rung of the platform using the velcro to secure it in place..
- Next, mount the rechargeable 9-Volt battery (Item 7) to the first
rung of the platform using the velcro to secure it in place. Attach the
9-Volt battery connector (Item 8) and using the crimpers connect the
Tamiya female connector to it (Item 5).
- Now connect a 3" female - to - female header jumper from Vin and
the Arduino Decimella to a female Tamaya connector. Plug the 9 Volt
battery connector to the jumper and verify that Arduino PWR LED is
- Using the cutters tool remove the
.1 Inch Crimp Housing 3 Pos. from each of the 4 servos.
- Separate VCC, Gnd, and Signal wires from each of the 4 servos.
- Braid together the red wires (Vcc) on each of the four servos as well as the positive leads on the IR sensors and the 2 phototransistor sensors.
- Next, solder the braid to the Kyosho male connector (Item 6) using the crimpers. Use heat shrink tubing (Item 3) to protect your wires from wear and tear.
- Repeat the same braiding technique for the black wires (GND) on each of the 4 servos, 2 IR sensors, and 2 Phototransistors.
- Solder together the 4 black servo wires, 2 Sharp IR back wires, and 2 phototransistor wires and use heat shrink tubing to protect from wear and tear. Important to splice an additional black wire to the braided set of wires as this ground (black wire) will connect to
GND on the Arduino Decimella (Item 11) in a later step. For now just have this extra wire available.
STEP 1d: Connect Arduino, Power, and Actuators.
- Trim the pin headers and insert the male pin header into the arduino I/O where the sensor, GND, and actuator will later connect. You can use the flush cutter to trim the pin header to the correct size. Cover your eyes with protective goggles when trimming the pin headers. And make sure nobody is nearby when you are cutting them. The tips fling off at high velocity across the room and could stick in someone else's eye if your not careful. You can control where the tips fly by using your hand as a barrier to prevent the cut tips from flying across the room.
- Use the female-to-female header jumper to connect to the arduino pin header when it makes sense to do so. This tutorial is just a guideline, and you are left to make your own decisions with the tools and pictures given here.
- Connect left side servos to the PWM pins 9 using a Y-harness.
- Connect the opposite end servos to PWM 10 using a Y-harness.
- Connect the extra gnd wire to Arduino GND.
- Connect the VIN and GND on the arduino to the 9-Volt battery
- Connect the rechargeable 6-V battery to the connector to power all of the sensors.
- Turn on power to the Arduino board and the
servos/sensors. You should see a green LED light up on the Arduino as
well as hear the servos have sign of power. This means you are now
ready to start wiring up your sensors to the Arduino.
Your finished. Now we are ready to proceed to programming the actuators.