Introduction: How to Make a Line Follower Robot
In order to makea line follower robot, you need knowledge in various areas. This guide will provide the bases in making this type of robot. The challenge is building a robot which can effectively and quickly follow a line, going through the different paths and curves found along the way.
Remember that only the foundations are given, it is necessary for you to investigate a little, and basic knowledge of electronics is needed.
Step 1: Get the Materials
We have picked materials which are easy to use but efficient.
1. Motors: we used motors from the Brand Pololu, HP version with a reduction 10:1. These achieve good speed but you need to take in consideration the total weight as they will not work correctly if it is too heavy. In case the robot has more weight a 30:1 reduction is needed.
2. Sensor: This part will “read” the line; they are the eyes of the robot. Use QTR-8 sensors, they are analogic from Pololu and have 8 sensors which determine the reflectance, so as to know the position of the line.
3. Controller: Baby Orangutan B-328, again, from Pololu; it adapts perfectly to the project as it has analogic and digital input and output. It has an H bridge which will control the direction the motors turn. It can be programed with Arduino.
4. Wheels: The wheels are an important part of the robot, we used Fingertech, which are high density and provide good grip on the track
5. Battery: Use a LiPo battery of 500mAh and 7.4v. You may take batteries of similar capabilities but procure it doesn’t weigh much and it must be 7.4v for the motors.
6. Ball caster: They work as support for the front of the robot, as some kind of wheel. You will need two 3/8 Pololu Ball Casters, but you may only use one if you want.
7. Brackets: These pin the motors to the chassis, so, 2 are needed. Because the motors are from Pololu, these brackets work perfectly
8. Chassis: We chose to make our own from PCB, and we recommend you do the same, this way you can adapt it to your necessity. Use PCB Wizard to design the circuit, and with acetate sheets, a laser printer, a plate and a Copper Clad Board the chassis is done.
9. Programmer: When using the Baby Orangutan controller, you can’t connect it directly to the computer, it needs to be programmed another way. There are two options: buying an AVR programmer (sold by Pololu and other brands), or programming it with an Arduino UNO R3 or an Arduino Mega with ISP programming. We used Arduino UNO, and we will give a general idea of how to use it. You need to upload an Arduino sketch to your plate, which is found in the IDE of Arduino with the name ArduinoISP. Arduino and the controller work with different frequencies so you need a ceramic capacitor 104 (of 1 microfarad) between the 5 volt pins and the Groud of our Arduino UNO. After this, you connect the Arduino and Orangutan ISP pins. You can search for “Baby orangutan ISP” and “Arduino ISP” to see the connection.
10. Other electrical components: We will also use LEDS, Regulator to 5v, switch, button, 1k resistances, pins and wires.
Step 2: Hardware
Just like it has been told before, this guide will not give much detail in how to make the PCB, as there is lots of information available. However it is important you know the circuit.
Once you have the design (You can use any program for PCB, we used PCB Wizard), it goes into the Copper Clad Board, it is cut, drilled and weld. You can use a Hacksaw to cut it, then sand it, and any drill will work, just use thin drill bits and be careful.
Step 3: Programming
For some this will be the most tedious part of the project, as you need to test different values in order to make the robot move smoothly along the line. We recommend you take an existing code for a line follower which has PID control (This prevents the robot from oscillating too much), you can find a lot of them in the internet and it is a good way to start.
After getting more experience with robots and programming, you may make your own code. Until then, here is a code which adapts very well to the robot and is simple enough. This is not our own, it was taken from tdrobotica.co (spanish website for software, an english equivalent would be www.robotbasic.org)
The following file has the example.
Step 4: Improve Your Code
In the website tdrobotica.co you can find more information regarding the program. You can change speed and PD values, the values P (proportional) and D (Derivative) completely change the performance of the robot, and I must admit it is the most maddening part of the project, you will need patience but it is rewarding when you finally make it work correctly.
We recommend starting with a low velocity so you see how the robot behaves and starting with values 1 and 0 for the proportional and derivative respectively. The velocity directly influences PD values so you must check for them each time you change speed.
So far, we are done with our robot, but here are some recommendations:
- You can use a camera for observing the robot, this way if it doesn’t work or it loses control you make look frame by frame and will be able to locate the problem more easily.
- Clean the wheels. This is really important, even more if you wish to compete. The wheels often pick up lots of dust, and in turn makes it skid a lot. You need to keep cleaning them constantly.
- Do not stop investigating. You can always learn new things and this endeavor is no exception. There are a lot of things to discover, and even though this robot is fast enough, it is too simple comparing it to the things one can achieve. Look for information everywhere and you will improve constantly. Once you are able to make this robot it will surprise you how quick it can be done once again if you put effort into it. Have fun and do not give up. If you stumbled upon this instructable there is a good chance you have an interest in robotics, which, sadly, can be lost, maybe because of frustration, laziness or it simply stops being fun, which happened to us sometimes. Just keep on trying until you achieve your expectations. It helps if you find a partner and making the robot together. Once you are finished you will feel pleased and will be easier to improve
Step 5: Assemble All the Parts
Dont give up if it looks like you failed and you have to do it all again, like in the picture.
This is all about trial and error. Try to plan everything before making any holes and make all the parts fit. You'll be fine with one mistake or two.
Aaaand that's it.
Thank you for reading my Instructable. :D
Feel free to comment and ask if you need to know something!
Gabriel T. , Axyoan M. and Endo O.
We have a be nice policy.
Please be positive and constructive.