Line followers (LFRs) have developed from being pretty basic to extremely advanced. Basic ones can be good for your high school or college projects, and the advanced ones incorporating PID and map memorizing techniques can win you lacs in robotic competitions, and this post here serves to cater for both. This is my first post on line follower. It will help you understand the fundamentals of a basic line follower. Upcoming posts will guide you in making advanced LFRs.
For the ease of understanding ,this blog has been divided into three parts,
Line Follower :Assembling Components
This post is based on a two-sensors-three-wheel-drive line follower. Having done with this, we will move to advanced ones involving PID and multisensors-array.
Two battery operated(b.o.) motors and compatible tyres
Two infrared sensors
Motor driver module(L298)
Arduino IDE software
Now, let’s have a look at our components:
Imagine it as the control room of our robot .Now, there are a lot many development boards, that were considered for this project, but Arduino UNO was simply no match to others.It isn’t that our protagonist was superior in terms of its multidimensional features.If that had been the case, Raspberry Pi and Intel Edison would have smacked it between the eyes.The most compelling arguments that led to the selection of Arduino UNO were formed by the combination of features, price,size and requirement for the project.
Some relevant reasons were:
- SIZE : It is quite small compared to Atmega16 or Atmega8 based development boards,consumes a little space on chassis,so you get a compact and handy bot. This really matters in robotics competitions. Trust me you would hate roaming around with that big ugly bot, changing venues all day.
Smaller the size , faster the robot and more efficient the turns.
- BEST PROTOTYPING BOARD: Undoubtedly, Arduino UNO has the best combination of features for prototyping. Once your circuits are in place and your project works perfect you can replace it with something smaller and cheaper like Arduino Nano or Attiny85 ic. For those ,making line follower for college projects , I suggest replacing uno with Nano at the end.
2. CHASSIS: Few points to keep in mind regarding your chassis ,
- It should be lightweight and strong.
- For projects, it’s better if you buy one from market.But If you are preparing for competition, I strongly suggest you customize your own ,keeping in mind the dimensions and the requirements of the competition.
- Choose a plastic or wooden chassis. Metallic ones can short your circuits.
- Keep you chassis as low as possible.That gives stability to the bot.
3. MOTORS: Use light weight battery operated (B.O.) d.c. motors.
4. CASTOR WHEEL: It gives you three wheel drive. The reason for preferring three wheel drive over 4 wheels is because of its comparatively faster turning action. You might have noticed the cycle rickshaws piercing through the traffic like reptiles.I hope you see the point I am trying to make.
- SENSORS: Well, if arduino is your bot’s brain ,sensors might as well play the role of eyes.Here are a few things about sensors:
- The sensors must be oriented in a way that led(s) face the ground.
- Should be placed at the front end of your bot.
- Minimum spacing between them must be greater than the width of the black line.
- MOTOR DRIVER BOARD: Both L298N or L293D are equally suitable for making an ArduiGeek robot.Though, L293D is comparatively cheaper but has a low current rating. Their connections are nearly the same. Since,I have given the connections for both,it is totally up to you how you make your own ArduiGeek bot.
- POWER SUPPLY: Use a 12 v adapter or a battery (not more than 12 volts).
Placements of components(from front to back end) :
Sensors at the head of your bot.
Castor wheel in middle
Motors and tyres in one line at the back.
1. SENSORS to ARDUINO:
Connect the sensor pin to arduino pin as shown,
|Sensor pin||Arduino pin|
|LEFT SENSOR OUT||pin 6|
|RIGHT SENSOR OUT||pin 7|
Note :To check if your sensors are powered up, you can use a camera(provided it doesn’t have an infra red filter).
2. MOTOR to MOTOR DRIVER:
Each motor has two terminals which need to be connected to motor driver. Never try and connect them directly to UNO.
To know the reason why it is so and to prevent your arduino from any damage , navigate to the link———>HOW NOT TO FRY YOUR ARDUINO
Looking from the back of your bot , with motors near to you and sensors away, connect them as follows,
|LEFT MOTOR||PIN 1 AND 2||PIN 7 AND 8|
|RIGHT MOTOR||PIN 13 AND 14||PIN 9 AND 10|
3. MOTOR DRIVER to ARDUINO UNO:
|MOTOR DRIVER(L298N)||ARDUINO UNO|
|PIN 8 & PIN 9||PIN 3 & PIN 9|
|PIN 10 & PIN 11||PIN 5 & PIN 10|
|PIN 7 & PIN 12||5V|
|MOTOR DRIVER(L293D)||ARDUINO UNO|
|PIN 5 AND PIN 6||PIN 3 & PIN 9|
|PIN 11 AND PIN 12||PIN 5 & PIN 10|
|PIN 4 AND PIN 5||5V|
NOTE: Pins 8 and 9 of l298n are used to control the motor connected to 1 and 2. And, 10 and 11 control motor connected to pins 13 and 14.Similarly, pins 5 and 6 of l293d are used to control the motor connected to 7 and 8.And, 12 and 11 control motor connected to pins 9 and 10.
Her we are guys, to the end of the post! We are just done with the design part.We still have the coding to do.For now, pick up your tools and start making your ArduiGeek bot.Do comment and let me know how the post helped you. Click on the given link to move on to the programming part———>.LINE FOLLOWER : PROGRAMMING AND CONCEPTS