Maker Pro
Maker Pro

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

Screemberry

Mar 18, 2013
5
Joined
Mar 18, 2013
Messages
5
Hello,

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.


photogate.gif
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Here's a circuit that will do roughly what you want.

attachment.php


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.
 

Attachments

  • SCREEM.001.GIF
    SCREEM.001.GIF
    4.2 KB · Views: 343
Last edited:

Screemberry

Mar 18, 2013
5
Joined
Mar 18, 2013
Messages
5
Thank you for your reply. I appreciate your time on this.
 
Last edited:
Top