This is my second Line Follower Robot and as its name suggest, it is a robot whose purpose is following a line. This robot can be used in contests where a robot must follow a route delimited by a black line on a white background in the shortest time possible.
This robot is really simple to make and then you can use this platform for other purposes.
Below is a video of the robot running on a track similar to one used in contests.
Step 1: The mechanics
The motors I used for this robot are 2 servomotors modified for speed. You can also use other motor if it' s good enough... I didn't have any so I modded 2 servomotors.
HOW TO MOD THE SERVOMOTORS (look at the pictures)
1. Remove the four screws from the servo and take it all apart.
2. Remove the electronics keeping only the wires from the motor (I kept the other 3 wires from the potentiometer but you don't have to).
3. Try to fit the gears except for one. I glued the big gear to the one beneath it so as to be high enogh to "get out" of the case. It isn't exactly a rule for how to do this... various servos will have various gears so you will need to try until you will find the best "combination".
4. Put everything toghether.
The BODY (look at the picture):
The base of the robot is made of PCB cutted to the properly size.
You will also need 5 screws:
- 2 for putting together the front and the base of the robot
- one for lifting the sensors off the ground (you can use something else here, if you have)
- 2 for lifting and fixing the microcontroller PCB
Step 2: The electronics
I made my sensors using 5 SMD IR emiting diodes, 5 SMD phototransistors and 5 1k SMD resistors. Between the phototransistor and the IR I put some black silicone so the IR light would not come directly to the phototransistor. The PCB design is in the archive "line follower.rar". It is made in PROTEUS, but I have a word document including all the PCB designs which can be printed on glossy paper or Press and Peel, and then transfered to the PCB using the method of the iron.
If you don't want to make your own sensor you can buy one from here:http://www.robotshop.com/pololu-qtr-infrared-sensor-array-1.html .
The MICROCONTROLLER PCB:
The "heart" of this robot is an ATMEGA8 microcontroller which gets the information from the sensors and drive the L293D motor controller.
1x 28-pin socket (for ATMEGA8)
1x 14-pin socket (for L293)
1x ATMEGA8 - You can also use an ATMEGA 168 or 328. The program is made in Arduino , so if you have an arduino, you can program the microcontroller on it, then remove it from arduino and insert it in this PCB. Also you can program this microcontroller via the 6 pins with an ISP. You can buy an ATMEGA 328 to program it on your arduino from here:http://www.robotshop.com/sfe-atmega328-with-arduino-bootloader.html
1x 16MHz Crystal
2x 22pF (10-28pF)
1x LM7805 http://www.robotshop.com/lm78m05-voltage-regulator.html
1x Push Button http://www.robotshop.com/sfe-12mm-push-button-switch.html
1x 4.7 uF
1x 1K resistor
1x 33R resistor
1x Break Away Header http://www.robotshop.com/sfe-straight-pin-headers.html
1x Straight Female Header http://www.robotshop.com/straight-female-headers.html
Also you will need one 4 AA battery holder.
Everything you need for making the microcontroller pcb and the sensors PCB is in the "line follower.rar" archive. You will find the PCB design, and the schematics which are made in Proteus, but are also available in the Word document.
Now all you have to do is take the soldering iron and start to solder all the parts.
After you' ve assembled the robot, you need to program the microcontroller. The program is made is Arduino so you can upload it to Arduino and then put the microcontroller in this "motherboard". You also have the HEX file for an ATMEGA8 using 16Mhz crystal.
Step 3: Assembly
After everything is done... all you need to do is assembling the robot. You can watch a video of me assembling it. Enjoy.
Step 4: Testing
If you followed this tutorial and you got something like in the video below, then, CONGRATULATIONS you have succeeded in making your first LINE FOLLOWER ROBOT.