Let's Make Robots!

Tequila - The Line Follower

I've been a longtime lurker on LMR  and finally want to start sharing some projects. Hopefully this will be the first of many projects and robots I share with the community.

Tequila is a line following bot I did for a course project last year. The goal was to create a simple line follower that could follow a circular track as quick as possible.  The robot was also required to change direction if it came to a dead end. 

The robot chassis provided was printed using a 3d printer. The two geared DC motors are controlled using a L293DNE half H-bridge. To sense the line I opted to use a Dagu Compound IR Sensor.

Almost all of my microcontroller experience has been with the Arduino or the NqBasic and this was my first time using the Launchpad. Compared to using the Arduino it felt like torture. After many frustrating hours of reading the user guide between failed coding attempts I finally made progress. I wrote a small library that generates two separate PWM signals to give full control of each motor.  I also created a small library to read the IR compound eye using the 10bit ADC. Originally, I wanted to use a PID control loop to keep the robot on track but in the end I abandoned the idea and went with simple fuzzy logic. I started to bring over an Arduino PID library but ran out of time and into more problems than I was ready for.

To make the robot a little bit more exciting I bought one of those song-playing birthday cards to add some music to the mix. Being a university/college student I figured a birthday card playing the Tequila song would be suitable!  After a bit of unsoldering and hacking I was able to add it to the robot so that it would begin to play the song when the robot got moving. At first the song would skip and restart on its own but after a little troubleshooting and adding a capacitor to filter out noise from the motors everything cleared up.


Overall the project was pretty successful. The robot ended up being the quickest in the class and I think everyone got a kick out of the music surprise tucked away. I would have liked to keep working on it but all projects were kept by the school so I guess I'll leave Tequila here and keep working on the next robot.