Introduction: DIY Line Follower Sensor for Arduino Using LDR
Few days ago a friend asked me to build a line following car for his school science fair. As being too lazy to do the job while ago, I did it overnight. I didn't have the sensor so I had build my with whatever I had.
This is a line sensor or light sensor. I have used two LDRs to sense the color. Over the black(or any dark color) portion ldr output is low and over the white(any light color) portion it output is higher.
Step 1: Parts and Tools
You should get the components laying around. otherwise you can get them in any hobby store
1: 2x resistor , 1M will be better (I didn't have it)
2: 2x LDR
3: protoboard or pcb (my circuit is a bird nest as I wanted to recycle components)
4: white led (I didn't use them)
5: soldering iron
Step 2: Build It Up
follow the circuit design on the picture.
s1 and s2 are output to arduino analog inputs
the green wires are the output, yellow is ground, black is power supply
Step 3: Conclusion
The output of the sensor goes to arduino analog input , else is done by the arduino. use the value difference to detect the line.You can add led,it will give you better result. This is my first instructable so there might be some mistakes. Feel free to comments
We have a be nice policy.
Please be positive and constructive.