Proximity sensing LEDs


Here’s a proximity-sensing LEDs project by Will_W_76.  He writes a complete step-by-step instructions here:

So how does this all work? What makes it proximity-sensing? Remember in the explanation above that the photo-transistor acts like a switch. So when the photo-transistor is off, no current is flowing across it to our blue LED and the LED is off as well. Now look at the other side of our circuit. That’s where the IR LED is connected, and it is connected such that it is always on and emitting 880nm infrared waves. Remember that I also mentioned the photo-transistor is set to respond best to wavelengths of 880nm? That’s how the proximity-sensing works! When an object (such as your hand) goes over this little “cluster”, IR light of 880nm is emitted from the IR LED. This light reflects off of your hand and back to the circuit. When the photo-transistor picks it up, it turns on allowing current to flow through from the source to our blue LED lighting it up!

Join the Conversation


  1. The animated GIFs on the main page is something that annoys me a lot on hackaday. If that’s an experiment on your part you might want to know not everyone is fond of them :D

      1. I disagree. The animated gif is awesome. Makes it where i dont have to open some slow ass huge youtube on my phone. A 5 second gif shows exactly whats going on at a quick glance.simple and effective.

  2. Simple, yet very effective! Nice.
    (I quite like the animated GIF, I would probably not have looked at this particular project without it). But I agree, it’s not always appropriate. In this case I think it worked well to convey the project concept though.

  3. I’m assuming the photo-transistors are highly directional. If not, they would be constantly “on” due to the adjacent IR LED’s.

    You could probably have one IR LED in the center of 4 sensors, reducing your current draw.

    1. Article quoted the phototransistors as QSD124-ND, Digikey data gives 24 degrees viewing angle. Quite narrow. For comparison, cheapo Chinese highly directional “marketed as high intensity” white LEDs are usually 10-15 degrees.

      FWIW, occasional animated GIFs are fine by me, though 2MB is large to an old-timer with a crappy DSL connection… ;-)

    2. Yes, as KH mentioned they have a pretty narrow viewing angle, so that’s a good idea to have several photo-transistors in the range of one IR LED. I’ll try that out!

      I understand the GIFs are annoying. I thought in this case though it was helpful though. Otherwise the picture would have just been a boring breadboard.

      One last thing… thanks to Dangerous Prototypes for posting my project! I really appreciate the extra traffic it brought :)

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.