Volga: the line following robot
My Rover 5 was out of order because of a broken voltage regulator so I thought why not start a new project. I have boxes full of parts that I bought when I started playing with Arduino. So I had a look what I could built with them, and a line following robot came up in my mind. I have seen lots of videos of them and I want to see if I can write a sketch to do the same :) I'll try to keep this robot as simple as possible. It is pretty easy to replicate if you have a solder iron. The chassis of this robot is a simple plastic box, it was the packaging of some electronics I bought some time ago. I knew it was going to be useful one day.
The parts I used (bought everything on Ebay):
2 continious rotation servos (bought really cheap on ebay, 16$ for the 2) fitted to the chassis with double sided tape
2 plastic wheels screwed to the servo horns (the cheapest I could find)
small castor wheel stuck to the chassis with double sided tape
Arduino Nano v3 (ATmega 328)
3 TCRT5000 sensors which I soldered on a pcb and mounted on the front of the chassis, I used some brass standoffs and a whole bunch of spacers so that the sensors are really close to the ground.
IR receiver: I will use a small remote to control the robot and switch between line following and manual control
Hobbywing 3A UBEC to power the servos
To get the power to the Arduino Nano and UBEC I soldered some pins and terminals on a small pcb. This makes it a whole lot easier to connect the servos and 2 cell LiPo battery. The LiPo is connected to the Vin pin of the Nano and the power pins of the servos. The signal of the servos go to the Nano. Don't forget the common ground.
Front view of Volga: (I put some black tape on the pcb so that the littlle holes don't let any light through)
At the moment the Nano is sitting on a breadboard but I will built an undershield for it. (Thanks CtC for the inspiration) But I'm waiting for some female header pins.
I have not yet written a sketch yet to do any line following. I have just made a basic sketch to drive forward/backward/left/right commanding it with the IR remote control. And I have done some testing with my self built line following sensor. It seems to work :) I've drawn a "track" in Autocad and I'll plot it at work on a A0 so I can start testing with line following.
Update June 29th: Succesfully finished my line following robot :)
Added 2 videos of Volga in action, first video is the initial testing. The second video is the current state of Volga.
Volga uses 2 continuous rotation servos to move. I did some testing running the servos from a simple LM7805 regulator and destroyed it. I then measured the current and these 2 servos together draw more then 1A when running at full speed. I could have used a cheap UBEC as I've bought several on Ebay and I first used one for the initial testing (see above). But it's a lot more fun to built stuff your self. I was originally going to solder an Arduino Nano undershield on a stripboard. I then started playing with Eagle software and designed an Arduino Nano undershield with a 3A 5V switch mode regulator on it. After spending hours learning to work with Eagle I sent my design to Iteadstudio and had the PCB's made. My Arduino Nano undershield has succesfully powered 10 micro 9G servos during testing. If you want to know more about it, take a look on my website. So after testing the undershield I could start playing with my line following robot. I drew a "track" in Autocad and plotted it at work on an A1. My line following sensor consisted of 3 TCRT5000 sensors. In the first video you can see Volga working with 3 sensors. It worked but Volga would sometimes lose direction and run of the track. Chris then gave me a link to his line following sketch (see the comments), his code uses 5 sensors so I decided to add 2 more TCRT5000 sensors. I had bought 10 on ebay so might as well use them... I then adapted his code to work with my robot and see the second video for the result. It works :) You can find the sketch I have used on my website.