Brandon's line following robot: The Chariot

Posted by Brandon on 6 May 2015

Deciding where to start

For the recent LVBots line following competition, my first instinct was to try to come up with some unique alternative design for a robot that would be competitive with the traditional differential drive robots. However, I knew the winning robot from the last LVBots line following competition (Mostly Red Racer) would be returning, and it had an impressive time to beat. I also remembered spending so much time designing and assembling the hardware for my last line following robot, that I ended up not having enough time to tune the PID coefficients and get the performance I was hoping for. After brainstorming a few ideas, I ended up deciding to keep it simple and make sure I had enough time to get a robot I was happy with, which I ultimately named “The Chariot” because of its shape. The Chariot ended up winning second place in the competition, which I was very happy with. Instead of focusing this blog post on how you can make your own version of The Chariot, I will try to explain my thought process throughout the design and build process. In other words, my hope is that after reading through this post, it will be clear why I chose the parts that I did.

Choosing parts

The first thing I decided was how I was going to power The Chariot. When designing a line following robot, one thing to keep in mind is that the performance can change significantly when your battery voltage changes (e.g. when the batteries are recharged or drained). A great way to prevent this inconsistency is to use a voltage regulator. I chose to use a regulator from the D24V25Fx family of step-down regulators, which allow for output current of around 2.5 A and come in a variety of output voltages from 3.3 V to 9 V. I ended up choosing the 7.5 V D24V25F7 regulator because it fit well with the rest of my system. I also had an extra 3S LiPo battery that I decided to use as my main power source.

I used a pair of our 35:1 Metal Gearmotors 15.5Dx30L mm and compatible mounting brackets. These motors have a free-run speed of about 575 RPM at 7.5V and plenty of torque for my lightweight robot. Also, the 3mm-diameter D-shaped output shaft is compatible with our Pololu Wheels. I also used a lightweight 3/8″ plastic ball caster as a third contact point. After some quick calculations, I determined the 70 mm wheels should give my robot a theoretical maximum free-run speed of around 2 m/s. I used the speed of a 3pi robot, which is roughly 1m/s, as a base-line goal to beat.

Next, I looked for a motor driver. I wanted a small dual motor driver that did not use a lot of I/O pins to drive from a microcontroller. The Qik 2s9v1 Dual Serial Motor Controller fit these criteria and worked great with the motors I chose. Since the Qik accepts serial commands and has an Arduino library, it was easy to integrate into my system. For my main microcontroller, I used the A-Star 32U4 Mini LV. This Arduino-compatible programmable controller is based on the ATmega32U4 from Atmel and has an onboard switching step-up/step-down regulator that allows it to be powered efficiently from 2.7 V to 11.8 V. It is also small and uses a Micro-B USB connection for programming. The only part left to pick was the line sensors. For that, I used a QTR-8RC Reflectance Sensor Array, but since I did not need all 8 sensors in the array, I broke the board into two parts, leaving me with a 6 sensor array for The Chariot and an extra 2 sensor board for a later project.

Designing a chassis

I designed the chassis for my robot using SolidWorks. Using 1/8″ thick acrylic from our Custom Laser Cutting Service allowed The Chariot to be sturdy but lightweight (about 210 g including components and hardware). I knew from past experience that having too much weight extended in front of the robot makes it difficult to control during turns, so I kept my battery located under the motors. To allow easy access to the battery, I used a few t-slots intended for #2-56 screws and nuts to hold it all together. If you are designing something like this in acrylic, I recommend reading this How to make snug joints in acrylic guide, which has some useful tips. I also remembered robots using IR sensors having problems with interference from the lighting in the competition room during a few of the previous competitions. To help prevent this problem, I designed a shield around where the QTR sensor array was mounted. The pictures below show the rendered model I designed in SolidWorks.

Following a line

Unlike the previous line following competition, I had enough time to tune my robot to a performance I was comfortable with (not too fast that it was unreliable, but fast enough to be competitive). I even had time to add a second button on the day of the competition to program in an “aggressive mode” and a “conservative mode”. This allowed me to have a faster (but less reliable) setting for The Chariot, just in case I felt like it needed a small boost during the competition. While it was a nice feature to have, it was a little too unreliable. After losing an early race because The Chariot missed a turn and lost the line, I stuck with the conservative option.

The competition was a bracket-style, double elimination, line following race. Two robots would face-off for 3 laps around mirrored courses, clock their times, then switch courses. The one with the single fastest time won the heat. That format allowed a more exciting structure since there were head-to-head races, while also letting us directly compare robots with others we might not have raced against. For more information about the rules, see the LVBots line following rules. The Chariot ended up in the final race against last year’s champion, Ben’s Mostly Red Racer. Coming into the final race from the loser’s bracket meant that the Chariot had to win twice to be declared the winner, but the Mostly Red Racer was too fast, with three laps clocking in 24.4 seconds and an average speed of 1.20 m/s. The Chariot was close behind, getting second place with a time of 25.1 seconds and an average speed of 1.17 m/s. Overall, I am very happy with the second place result, and while I did not beat the defending champion, I did beat my personal best.

7 comments

Hello Brandon, I really liked your robot. I pretend to make a spin-off of it. We have a project over that expects our little robot to go up and down ramps as well, while folling the line. So, we have to use an accelerometer and a gyroscope to adapt to this conditions and get the best performance possible. Other than changing the Plastic Ball Caster and adding the new sensor board, I would think no more hardware changes would be necessary. The rest would be a programming challenge. So I wonder if you can share a more specific tutorial or share more details of your project, since programming should be our real challenge. Thank you and congratulations on your robot.
Hello, Pedro.

I am glad you like my line follower. It is not clear to me what part of the robot you are requesting more details about, but if you are mostly interested in the line following code, I would suggest looking at our example line follower code for the Zumo Robot for Arduino, v1.2 (which is what my code is based on).

I have never made an advanced line following robot quite like the one you described. I recommend getting the basic line following working before connecting additional sensors.

Please let me know if I misunderstood your request or if you have more specific questions about my robot.

By the way, if you have more general questions about building your line follower, you might try posting them on our forum to see if anyone there has suggestions.

-Brandon
please send me your code. Mr. Brandon
......sauvikray001@gmail.com...
Hello.

I do not currently have my code available; however, as I mentioned in my last comment, my code is based on our example line follower code for the Zumo Robot for Arduino, V1.2. Other than converting the motor commands into the corresponding TTL serial commands for the Qik 2s9v1 motor controller, the biggest change I made to that code was probably tuning the PID coefficients. Since this varies for every system, I suspect my code would not be any more helpful than that sample code.

I see you also posted a request for help on our forum. That seems like a more appropriate place to continue the discussion if you have more questions.

-Brandon
Hi Brandon, Im really intrigued with your chassis design. Im working on my own line follower and was looking for chassis design examples specifically for those wheels. It is possible to get your solid works design file?
Prodigydx@hotmail.co.za
Hello, James.

I am glad you are interested in my design! I made my design files for the laser-cut pieces available via Thingiverse; you can use this link to access those files when they are available (this is my first time uploading and publishing a creation on Thingiverse, and they require a minimum wait time of 24 hours between account creation and publishing your first creation, so you might have to wait until around this time tomorrow).

For the mechanical components, you can find 3D models for the motor and motor bracket on their respective product pages. We do not currently have models available for the wheels or ball caster, although it is something we are looking into. For now, you can find dimension diagrams for them on their respective product pages. Please let me know if I left something out or you have any additional questions.

Brandon
Hi Brandon

Thank you so much. I 3D printed it and it looks amazing. My collegues were impressed so i referred them to your blog.

Much appreciated for your help.

James

Post a comment

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

Related Products

Custom Laser Cutting Service
A-Star 32U4 Mini LV
QTR-8RC Reflectance Sensor Array
Pololu Qik 2s9v1 Dual Serial Motor Controller
Pololu 7.5V, 2.5A Step-Down Voltage Regulator D24V25F7
35:1 Metal Gearmotor 15.5Dx30L mm
Pololu 15.5D mm Metal Gearmotor Bracket Pair
Pololu Wheel 70×8mm Pair - Black
Pololu Ball Caster with 3/8″ Plastic Ball
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors