Arduino Line following Robot
Well Making line follower for the first time is not really easy as we thought.some of the things could be turned to make simple stuff into the complex.I mean some times sensor calibration, comparison, and other related things could be more difficult.
For this we have to be smarter and more tricky.we have to choose those parts that can not create any sort of disturbance for us.I’m talking about those days when there were not much revolution in Robotics.we had to make robots using circuits with LDR’S IR’S and other messy and complex things.
so be smart and don’t waste your time in making complex circuits with separate sensors.
There are a bunch of sensor modules available in the market with built in comparators.
Step # 1: Gather all the Stuff at one place
- Arduino board/Uno/nano/mega
- 3x IR sensor modules
- 2x Dc/servo motors
- Caster wheel
- Jumper wires
As Arduino is the main part so we have to be clear about which Arduino board we are going to use.for making line followers the Arduino Uno is the best choice.we don’t need a lot of pins or very few pins that’s why we are not going for the nano and mega.
For Arduino guidance and Example, codes understanding go through these following posts.
2-IR Sensor Modules:
IR sensor module is the best choice for making a line following robot.instead of using IR LEDs we have to buy IR modules.
The pin out Configuration for IR modules and Arduino is very simple.
See the Circuit Diagram:
If you are using 3 sensors connect 3 in the same manner.The IR module has 1-pin for input and other 2 are VCC and ground.
So join all VCC and ground separately at one place and then connect to the Arduino.and the input pins are placed randomly on the digital pins of Arduino.
The selection of motors depends upon your choice.if you are going to but the LFR Kit then you got the servo motors within the package.
but my recommendation is to use DC geared motors.As I have used in this project we can handle more weight and current as compared to simple motors.so there are other several benefits of using these motors.
DC gear motors having high rpm and high
torque they are PMDC typed. The advantages of these motors are a constant magnetic field which
is uncontrolled by an external source.
Line follower KIT:
There are lots of LFR kits are available in the market.buying a kit is the easiest solution for any mechanical workload or any sort of disturbance.
Chassis could be of any thing.I’m not going in the depth there are so many things already discussed over the internet.
The chassis could be of an acrylic sheet or use any home made things for robot base.
There are standard size wheels are available in the market.if you are using KIT then you don’t need to worry about these things.
For making 2 wheel LFR you have to buy an extra wheel that is caster wheel the ball caster.For balancing the robot.
The battery is the most important part of this project.we need a good and an efficient timing battery.the dry lithium-ion 12-volt rechargeable battery is the best choice.we can also go for other choices use simple rechargeable two 4-volts batteries in series.
Pin out Configuration and Assembling:
Assemble all the parts.place everything on your kit.and now wire up.
Connect 3 IR modules with your Arduino board.the Vin pin of IR module will be connected on any of analog or digital pin of Arduino remember these pin configurations you have to use in the code.so if you are connecting to analog pins then you have to write analog in the code.
The motor driver we are using here is an L298N module. This is my recommendation to use this module instead of going for any shield or downloading libraries and other stuff this one is the simplest and easy.
For the working principle pin out configuration and why we are using this module you have to read this following post.
Upload the code and test it.Before testing check your connection and compare with your code.
I hope you got the concept.If you have any query comment below to notify.
Read the coming post about advance line following Robot and PID implemented line following Robot.
Follow to get the latest updates.Subscribe to our YouTube channel for video Tutorials.