/u/7434365
/joeiddon

A Proof-Of-Concept LASER-LDR Sensor

Most Arduino boards have analog pins which accurately sense 0-5V. A light dependent resistor (LDR) changes its resistance in iresponse to light. However, since the analog pins only measure voltage (and not resistance), a potential dividercircuit is needed.

Once I could then get an accurate reading of the current light intensity, there were now many different applications. One useful thing being to couple this sensor with a LASER. I soldered together a little device that joined these two components together - creating a neat package.

From here, the main thing I had in mind was making some kind of light gate. This would involve bouncing the LASER off a mirror and back at the LDR. Then, depending on the current state, the Arduino could carry out some task (for testing purposes I just lit the on-board LED (pin 13)) when the beam was active.

For the mirror itself, it had to be of high quality in order to create a clean reflection. Luckily I had a small rectangular segment that I salvaged from an old scanner.

Here is a video of me breaking the beam:

Finally, I realised that when the device was held close to a solid surface, the reflection of the LASER's light off the surface was enough to be noticable by the Arduino. I modified the simple code (merely adjusting a threshold #define) and now it worked as a proximity sensor!

A possible appication of this setup could be on a small robot - one where an ultrasound sensor would be too large. The device could be incorporated easily and allow for autonomous navigation.

Here is a video showing the proximity sensing functionality: