Let’s start with the list of components required for making an LDR based line following robot.
1 . Arduino- obviously !
2. Ardumoto – You can buy one from buildcircuit.com.au
3. A robot chassis- you can buy one from sparkfun.com or from this link: 70108 Tracked Vehicle Chassis
4. 4x Current limiting resistors: 220Ohm.
5. 3×1 k Ohm resistors.
6. 4 x White LEDs- Should be bright.
9. Battery pack- 6V
What is the logic behind a line following robot?
There are basically two ways of building a line following robot. First, using a light dependent resistor(LDR) and second, using Infrared(IR) LEDs. A dark object reflects less light than a bright object ( a dark object absorbs more light than a bright object) this is the only fundamental logic behind a line sensing robot. So, basically a line following robot distinguishes a black line from a white surface.
The circuit for making LDR based line sensing robot:
If you have never worked with Ardumoto or LDR, follow these links:
Test your sensor:
Before you start assembling the sensor onto your robot chassis, check your if sensor is detecting the black and white surfaces properly. I have written a post about testing the sensor, FOLLOW THIS LINK.
How to assemble?
The most difficult part of this project is to make a combination of LDRs and LEDs. Even a small mistake can take your robot out of black line. There follow the instructions carefully.
– Solder the LEDs as shown in the picture.
You can see that the LEDs are connected at a difference of exactly 4 solder holes. Now, solder LDRs by the side of each LED, except the one close to my thumb.
You should have this arrangement: LED1(close to my thumb)–2 holes– LDR1-LED2–2 holes– LDR2– LED3– 2holes– LDR3– LED4
Second important thing you should remember is that the LDRs should be slightly above the LEDs, so that they get the reflected lights properly.
This is the correct arrangement.
Now, connecting the sensor circuit to Aduino pins:
Just follow the picture shown below:
Your sensor should be around 5-7mm above the black line.
The turns should be made smooth, not sharp because the LDRs won’t sense quick transition. I have made a circular path. And I made the black line using a black board marker, you can try with electric tape also.
For All Your PCB Need, One-stop PCB Solution Services Appear
EasyEDA: free PCB design tool, 200,000+ engineers are using
PCBs: 10pcs 2-layer 10x10cm only $8.21, on-time global shipping
Components: save up to 50% , combine shipment with PCBs