Jon's line following robot: Usain Volt 2.0
Like other developers and engineers here, I made a robot for the LVBots Line Following Contest. This post describes my robot, Usain Volt 2.0, and details some of what I was thinking when I designed it. If you want to know more about the competition rules and how it was judged, see the LVBots line following rules.
During my preparation for the last line following competition, I remember how horrible it was to program my line following robot to get it to actually follow a line. It had fast, low-torque gearmotors that were supplied with a high voltage (the robot was scrapped and its parts reused, but I think I used the 10:1 HP micro metal gearmotors and a 3S LiPo), which made it very difficult to control (for those with experience driving manual cars, think of trying to get around using nothing but fifth gear) and very difficult to get to follow a line without resorting to speeds and duty cycles that would barely allow it to push itself through the course. Knowing that my hardware decisions held me back last year, I decided to base this year’s design off of Ben’s line follower, Mostly Red Racer, which won the last line following competition. I did some calculations based off of Ben’s motor selection, supplied motor voltage, and wheel diameter to come up with his robot’s base speed, which I used to explore possible wheel, motor, and voltage combinations that would make sense for my robot. Thanks to our adjustable, high current regulators, I was able to select a motor and wheel combination that, with a single regulator, could be supplied a voltage that would start the robot off slower than Ben’s, and then with an adjustment be supplied a higher voltage to theoretically surpass Ben’s robot’s base speed.
The name of my line follower is a throwback to Usain Volt, which was what I named my dead reckoning robot that didn’t reckon well, though it could follow a line. Usain Volt is, of course, a play on Usain Bolt, and the robot’s chassis and wiring has a color scheme and overall shape that is intended to resemble the bobsled of the Jamaican bobsleigh team. Fun fact: Usain Volt 2.0’s right wheel is one of the yellow 60mm wheels used on the original Usain Volt. (The original plan was to use both wheels, but one had formed a severe crack which eventually resulted in a catastrophic accident mid-turn during one of my line following test runs.)
Like Mostly Red Racer, Usain Volt 2.0 is a two-wheeled differential drive robot. The drivetrain consists of two 50:1 HP gearmotors directly connected to a pair of 60mm Pololu wheels, and driven by two DRV8838 motor drivers (another fun fact: I routed that board!). Unlike Mostly Red Racer, Usain Volt 2.0 uses two 1/2″ plastic ball casters to support the chassis, intended partly to make the top view of the robot more resemble a bobsled, and partly to corner better. Two QTR-3RC sensors are used to detect the line, and a Pololu pushbutton power switch toggles power to an adjustable 4-12V buck/boost regulator and an A-Star Prime SV, which controls everything. The whole robot is powered by a low-profile 2S LiPo located on the underside of the chassis.
To mount all of my hardware, I made a chassis that was basically two layers of acrylic that were cut with Pololu’s laser cutting service. The top layer was made up of yellow, green, and black sections of 1/8″ acrylic that, when pieced together, would resemble the Jamaican flag. The bottom layer was a single piece of clear 1/16″ acrylic equal in size to the combined sections of the top layer, so that I could use acrylic glue to mate the two layers together. The bottom layer being clear allows people to see my color scheme when the robot is viewed from the bottom. However, a downside to the bottom layer being clear is that when the robot is held up to the light at certain angles, you can see exactly where the acrylic glue spread to bond the two layers together.
I used a black breadboard to hold the pushbutton power switch and motor drivers (the breadboard has an adhesive backing, which is convenient for mounting to flat surfaces), and a mix of premium jumper wires and solid core wires were used for the connections between the electronics. The A* Prime, regulator, and QTR sensors are mounted with #2-56 sized screws and nuts and offset with spacers so any soldered joints don’t just rest on the acrylic. The robot’s battery is held in place with double-sided tape.
The A* Prime was especially fun and convenient to work with since it has many features useful for prototyping and making connections. In particular, I enjoyed using the additional ground and power access points (it has over 40 of each) to connect to my QTR sensors and motor drivers quickly with something simple like a solid core or premium jumper wire. Right next to the available ground rails on the Prime is a power rail that users can supply their own voltage to. Because the Prime’s 5V on-board switching regulator can provide up to 1.5A (plenty enough current for the logic power on both DRV8838s and both QTR sensor arrays, which draw current in bursts), I chose to solder some wires between the 5V pin and the power rails to permanently make that 5V available. I also added some female headers to make the power rail accessible to solid core wire. You can see my modifications in the pictures below:
Also, while programming, I found the A* Prime’s included pushbuttons and buzzer especially useful for various things like starting my QTR sensor calibration routine, knowing when the routine has finished, and starting the robot’s line following routine to begin a race. Although I did not use the LCD, I expect it to be a very useful debugging tool as I try to shave time off of Usain’s laps.
I’m proud to have made a robot that can follow lines faster than an unmodified 3pi (it averaged 1.07 m/s during its best race)! It looks like my method of selecting hardware worked just fine, and I can now concentrate on improving the code. Right now, my sketch is a straightforward PID loop, and I want to incorporate some kind of speeding up during the straightaways, as well as tune the PID further to increase the overall base speed and reduce the overshoot on the turns. I suspect this is not the last time you’ll see Usain Volt 2.0; I included a set of mounting holes to add a second layer above the breadboard, which I could use to mount another, more powerful processor, and the micro metal gearmotors I am using have an extended motor shaft, which allows me to add magnetic encoders. Both of those features are key to reusing the robot for something like the 2014 dead reckoning competition.