This project has been derived from LDR based line following robot. I strongly recommend that you first try line follower robot using LDR, I found that the LDR gives better results than infrared sensor.
We need the following components for making a line following robot using Infrared sensors.
1 . Arduino- obviously !
4. 3x Current limiting resistors: 220Ohm.
5. 3×10 kOhm resistors.
6. 3 x Infrared LEDs- BUY NOW
7. 3x Photodiode- How to use a photo diode?
8. 2 x DC motors- If you get a magician chassis from sparkfun, you get 2 DC motors along with the robot chassis.
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) LED. A dark object reflects less light than a bright object, or we can also say, a dark object absorbs more light than a bright object, this is the only fundamental logic behind a line sensing robot. So, in a line sensing robot, we make a sensor that detects the difference between bright object and a dark object, or say, distinguishes a black line from a white surface.
The circuit for making Infrared based line sensing robot:
If you have never worked with Ardumoto or Infrared, follow these links:
Test your sensor
Before you start assembling the sensor onto your robot chassis, check your if your 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 Infrared LEDs and Photo diodes. In this project, I used a mini breadboard, whereas in case of LDR based robot, I have used PCB.
Fix the components as shown in the picture:
Second important thing you should remember is that the photo diodes should be slightly above the Infrared LEDs, so that the rays don’t fall directly on the photo diodes.
Now, connecting the sensor circuit to Arduino 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 photo diodes 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.
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic - Simulation - PCB Layout - Gerber Viewer
JLCPCB Prototype & Small-batch PCB: Only $2 for 10pcs 10×10cm PCBs, 24 hours Quick Turn, DHL Delivery in 3 Days