Connect with us

I would like the LED to turn off when beam is broken

Discussion in 'LEDs and Optoelectronics' started by Screemberry, Mar 21, 2013.

Scroll to continue with content
  1. Screemberry


    Mar 18, 2013

    I would like to include an LED to act as an indicator as to when the beam is broken. It will also be an indicator to when the sensitivity of the photo Interrupter is just right.

    There are 2 outcomes for the LED:
    1 - when the beam is broken, the LED will go out, and then back on when the beam is established.​
    2 - when setting the sensitivity of the photo interrupter, the LED will go out when the resistance is too high, then when I back the pot off, the LED will come back on.​

    The relevant parts of this schematic include the Photo Interrupter (The photo transistor and its associated led), and the 100k pot, (which I will change out to a 10k pot). You can ignore the 2N2222 and the SCR as the output of the Interrupter will be going to an Arduino to trigger an event.

    Any help is appreciated. Thx.

  2. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    Nov 28, 2011
    Here's a circuit that will do roughly what you want.


    This circuit is based on a common two-transistor Schmitt trigger. A Schmitt trigger is normally used when dealing with real-world signals because a fixed threshold causes problems when there is noise on the signal - as the voltage crosses the threshold, the noise causes the threshold to be crossed multiple times. This can be a problem when the detector output is used by software, and especially if it generates an interrupt!

    A Schmitt trigger provides a quality called hysteresis (hiss-tur-EE-siss) which causes the threshold to move once it has been passed. Look it up on Wikipedia if you want more information.

    The circuit operates from 9V as you specified. The output is the Q3 collector circuit, which includes a voltage divider to provide a 0V/3.3V output swing for your Arduino circuit. (I assume the Arduino uses 3.3V logic; if not, change the resistors to suit.) I've put the LED in the collector circuit for simplicity as well. The collector circuit runs at about 10 mA.

    The way it's designed, the LED will illuminate (and the output will go high) when the phototransistor is DARK, not when it's light. So the LED in this diagram has the opposite behaviour from what you asked for.

    The illumination threshold and the amount of hysteresis can be set separately. Maximum hysteresis corresponds to about a 2:1 ratio in illumination; you may want to set the hysteresis trimpot to about half way.

    Attached Files:

    Last edited: Mar 29, 2013
  3. Screemberry


    Mar 18, 2013
    Thank you for your reply. I appreciate your time on this.
    Last edited: Apr 4, 2013
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day