Robot Racing for Everyone
by Tech Rockstar Academy in Circuits > Robots
269 Views, 2 Favorites, 0 Comments
Robot Racing for Everyone
Welcome to Tech Rockstar Academy's Robot Racing for Everyone program. This program was remixed from TCPL's How to Hold a Robot Racing Event! : 6 Steps (with Pictures) - Instructables.
In this instructable I will show you how to make TRA's version of the Autonomous Robot Racer: Analog Mode (no Microcontroller Needed) : 8 Steps (with Pictures) - Instructables
We use this robot for community outreach and with complete beginners. Robotics enthusiasts and those with more advace skills will also have fun trying to tune the robot to go faster. They are made to be played with over and over again. The robots are also easy to fix with them requiring no soldering. The reason we use this robot for outreach is it doesn't require any additional technology and can be raced in almost any indoor space on top of an 8ft foldable table. The robots are "programmed" by changing the front skid, adjusting weight distribution, and playing with the angle and sensitivity of the sensors. For the full lesson plan please reference the to Instructables above.
This Instructable is written and made by Joah Tang, the inventor of the TCPL Autonomous Robot Racer.
Supplies
3D files
https://www.tinkercad.com/things/jtriKnCJVY7-tra-version-of-autonomous-analog-robot-racer-chassis
Parts
10cm Male to Female Breadboard Wire
10cm Female to Female Breadboard Wire
2x Ir Sensors
2x 12mm m3 screws, 2x 16mm m3 screws, and 4 m3 nuts
Rechargeable 9v Batteries with Charger
Tools
Plastic Nippers or Wire Cutter/ Stripper
Hot Glue Gun with Hot Glue
Screwdriver
Electrical Tape
(Optional Soldering Iron with Solder.
Clean 3D Prints
We use a Bambu A1 to print this kit. I've also printed this kit on a Makerbot, Ender 3, and Prusa machines. The settings I use are 15% infill and outer brim. No supports required, I use brims as a safety since I will print 10 - 20 robots at a time.
If you use brims make sure to clean them off using your preferred tools.
Prepare the Motors
If you have the TRA kit this step is already completed.
You can optionally solder the wires to each motor.
You will need a red, orange, black, and brown male to female wires along with the two motors.
Using your preferred tool, cut the female ends off and strip each wire. Twist all the stripped wired end tight. Insert a red and black twisted end into each pad of the DC motor. Gently twist tight around the pads. Use hot glue to secure the wire to the sides of the dc motor bell (see third picture for example. Finally, tightly wind electric tape around the wires and the dc motor (see 4th picture).
Do the same with the orange and black wire along with the remaining DC motor. Next take the 3D printed motor clips and slide them over each motor. Please see pictures 6, 7, and 8 for examples and orientation.
Prepare the Motor Driver and Power Distribution
If you have the TRA kit we have already prepped the battery box and cut the 5v wire for you.
Take a black male to female wire and cut off the female end. Strip the cut end of the wire and twist it tight. Cut the pre soldered end of the black wire coming from the battery box off. Strip the battery box black wire and twist it tight. Twist the black breadboard wire and the battery box black wire together.
Optionally you can solder the two black wires together better durability.
Find a red male to female red wire and cut the female end off. Strip the cut end and twist it tight on the red wire.
Optionally you can solder this twisted end for better durability.
Take the L298n motor driver and loosen the screw down input labeled GND. Insert the twisted together ends of the black wires into the GND input then screw down tight.
Loosen the 12V screw down input on the L298n motor driver. Insert the single red wire coming from the battery box into the motor driver's 12V screw down input and tighten with a screwdriver.
Loosen the 5V screw down input on the L298n motor driver. Insert the single red wire with the stripped end into the motor driver's 12V screw down input and tighten with a screwdriver.
Please see the last three pictures for examples and orientation.
Wire the Sensors and Prepare the Tires
The sensors will need the following wires for each of their pins:
Red and orange Male to Female breadboard wires for the VCC pins.
Black and brown Male to Female breadboard wires for the GND pins.
Blue and Purple Female to Female breadboard wires for the OUT pins.
Please use the second picture to see where each wire plugs into.
Heat up your hot glue gun. Apply a thin layer of glue to the outside of the 3D printed wheel to make grippy tires. Please be careful and use safety equipment when applying hot glue. I like to put a small dot of glue on the wheel and spread it smooth with the glue guns hot end. Do not hold the hot glue gun on the 3D print for long or it will melt it.
Putting It All Together
Gather all the parts you have prepared up to this point in the instructable.
See picture 2 and 3 for orientation of the motor driver on the chassis and where each screw goes. Take the longer screw, 16mm, and insert them through the bottom of the chassis and motor driver. Fasten with two bolts.
See picture 4. Hot glue the 9V battery box with the switch towards the back of the robot. Make sure to leave a small gap to make getting the battery in and out easy.
See picture 5 and 6 for sensor orientation. Using the remaining 12mm screws fasten the sensors to each side of the robot chassis. Rember to insert the screws from the bottom of the chassis so it doesn't hinder the robot's driving. Make sure to angle the sensor LEDs out to match the angle of the chassis.
See picture 7 and 8 for breadboard orientation. Remove the adhesive protector from the breadboard and adhere it to the front of the robot. Do your best to center it and cover the three slits at the front of the robot. This will help keep the skid, also known as a brake pad, in place when driving.
Use picture 9 to see where to insert the black and red wire coming from the motor driver. Be gentle when inserting the bread board wire, it can be delicate and break.
Use picture 10 through 12 to see how to lace the wires attached to each VCC pin on the sensor. Insert the orange and red wire coming from each sensor next to the red wire coming from the motor driver on the breadboard (See picture 13).
Do the same for the brown and black wire coming from the sensors. See pictures 14 and 15.
Use pictures 16 through 18 to see how the wire coming from the OUT pin on the sensor connects to the motor driver.
Picture 19 shows how the other wire coming from the remaining sensor is connected to the motor driver. You will notice the sensor connects to the pin furthest from it. This is done because the sensor controls the motor opposite to it so the robot will turn the right way.
slide the motors in and insert their wires into the screw down inputs closest to them see pictures 20 and 22.
Flip the robot over and attach a skid/brake pad into one of the slots. You will see each brake pad has a long rectangle at the top that slots into the slot. The sticky pad of the breadboard keeps the brake pad in place while driving. See picture 23.
Slide on each wheel onto each motor picture 24.
Congratulations you built a self-driving robot! You're ready to test it and get it racing.
Test Drive and Trouble Shooting
Place the car on top of the electrical tape so it doesn't drive away when you insert the battery. Once the battery is inserted turn the car on and make sure both wheels are turning and driving forwards.
If the one or both wheels aren't turning, make sure nothing is triggering the sensors. Both lights on the sensor will be on if it detects something. If nothing it trigger it and both lights are on use a screwdriver to turn the potentiometer counterclockwise until only one light is on, see picture two for example. If the motor is driving in the wrong direction move the OUT pin wire over one pin on the motor driver to change its direction.
Make a Track and Tune You Car
The robot drives around a track by detecting walls and turning off the opposite motor to turn away from them.
The track can be made out of anything that doesn't absorb IR light, so nothing matte black. I use cardboard strips and RC drift walls. To race your robot car, I will use painters' tape to mark a starting/ finish line. I will then use my phone's stopwatch to time my car from start to finish. Once you have your first lap time try tuning the car to go faster.
You can tune the robot by adjusting the weight distribution by slide the motors either backwards or forwards, the further back the better it drives in a straight line and closer to the center quicker turns. You can also make the car go faster by using brake pads with less friction or wedges that help it driver over bumps. You can also adjust where the brake pads are placed to add better turning or stability in straightaways. Finally, you can change the angle of the sensors to see the wall sooner or later even further changing how you robot drives around the track.
Video Series
TRA has a video series that you can use to learn more about the robot racer and build along with. If you have any questions, please comment below and I will answer them ASAP. If you do make one of these racers, I would love to see it! Please post you builds in the I Made It! section.