Claire's line following robot: Oddish

Posted by Claire on 7 May 2015

A few weeks ago the local robotics club, LVBots, hosted a line following competition here at Pololu, and like many of the engineers here, I built a robot, which I named Oddish, for the competition. I really only started seriously working on my robot about a week before the competition, so when I made the final decisions about what components to use, I aimed for simplicity. In the last year we have come out with several A-Star microcontroller boards that include switching regulators, so I thought it would be fun and simple to make a line follower using an A-Star as the brain and its built-in 5 V regulator to power all the other components. I chose the A-Star 32U4 Mini LV for its operating voltage range and size.

The regulator on that version of the A* can output about 1.5 A, so I went with medium power micro metal gearmotors, which have stall currents of 700 mA each. In a previous line following competition I had trouble tuning my PID constants because I used low gear ratio motors with low torque that were not responsive enough. This time I wanted to make sure my motors would have enough torque, so I chose 50:1 gearmotors and paired them with our 32×7 mm wheels. While testing, however, I was able to tune my PID well enough with that motor and wheel combination that the robot followed the line well at its max speed, but was still slower than I wanted, so I switched out the motors and then the wheels for 30:1 micro metal gearmotors and our new 40×7 mm wheels. This significantly reduced my lap time while still allowing Oddish to follow the line closely at full speed. I also tried our 60×8 mm wheels on the morning of the competition, but did not have enough time to tune the PID constants well enough to consistently beat the lap time I was able to achieve with the 40 mm wheels, so I switched back to the smaller ones before the competition to make my robot more reliable.

As I mentioned, I started my robot kind of late, so since I chose to use an A-Star 32U4, another way I was able to simplify was by using our motor and line following examples for the Zumo 32U4 Robot as the starting point for my code. The Zumo 32U4 Robot has two DRV8838 motor drivers integrated into it, so the easiest way to make sure my robot was compatible with the example code would probably have been to use two of our DRV8838 motor driver carriers on my robot as well. However, my medium power motors did not need the amount of power the DRV8838s are capable of outputting and those drivers would have taken up a little more space than I liked, so instead I decided to use our DRV8835 Dual Motor Driver Carrier, which has a lower continuous current rating and is smaller than using two DRV8838 carriers. The DRV8835 and DRV8838 both have the same phase/enable interface, so I was able to connect my DRV8835 to the same pins used for the motor drivers on the Zumo 32U4 Robot and run the motor demo code without any modifications.

For the remainder of my components I used the QTR8-RC Reflectance Sensor Array, a pair of our micro metal gearmotor brackets, a plastic ball caster, and a 2S LiPo battery. All of the components were mounted to a custom laser cut chassis, and connections for the battery, a push button, and power buses were added to make the robot easier to wire up and use.

Oddish was definitely not the fastest robot at the competition. As you can see from the rankings in the video of the competition, it did not win (it didn’t even make the top 5). However, it was very easy to put together, program, and tune, and it followed the line very accurately and consistently, so I am happy with how it turned out.


Post a comment

Using your Pololu account allows you to customize your avatar and manage your comments; you can also post anonymously.

Related Products

30:1 Micro Metal Gearmotor MP 6V
Pololu Wheel 40×7mm Pair - White
A-Star 32U4 Mini LV
DRV8835 Dual Motor Driver Carrier
QTR-8RC Reflectance Sensor Array
Pololu Micro Metal Gearmotor Bracket Pair - White
Pololu Ball Caster with 3/8″ Plastic Ball
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors