Status LED for Opto Sensor Signal Level

Thread Starter

digital_ade

Joined Sep 19, 2016
11
Hi All,

Appreciate a sanity check here. I am looking to implement a simple circuit switch on/off an LED based on the signal level of an opto sensor.

This is the opto sensor: OPB830W51Z
https://www.mouser.co.uk/ProductDetail/Optek-TT-Electronics/OPB830W51Z?qs=iblIa22dKKTyyQ8HOTK3ZA==

The concept is that when the opto sensor beam is not broken, the transistor in the opto sensor will be open which in turn pulls the SIGNAL level down to ground. The result is that the base of Q1 is not switched high and the circuit for D1 is not complete - so D1 is off.

When the opto sensor beam is broken, the transistor in the opto will switch off which in turns pulls the SIGNAL level up to 5V via R2 (10K pull up). As SIGNAL is pulled high is applies a positive bias to the base of Q1 switching it on. This then allow current to flow through D1 switching it on.

Does this make sense?

Here is my suggested circuit design:

Opto Circuit.png
 

MisterBill2

Joined Jan 23, 2018
27,482
For starters, the connections in the circuit in post#1 are WRONG!! At least, the connections to the four terminals as shown will not function in any way at all.
The connection from the +5 volt supply should pass thru the 60 ohm resistor to the anode of the LED in the opto- isolator, and the cathode of the LED should connect to the negative side of the 5 volt supply..
To function as described, the emitter of the transistor must connect to the 5 voly supply negative and the collector must connect to both one side of R2 and also the base of the switch transistor.The other side of the 10K resistor will connect to the positive 5 volt supply point. The unbroken beam will cause the photo transistor to conduct and so the switch transistor will not conduct and the LED will not illuminate. When the light beam is broken, the phototransistor will not conduct and so the switch transistor base will be biased and so collector current willflow and the LED will illuminate.
 

eetech00

Joined Jun 8, 2013
4,705
Hi
Use a small mosfet instead of BJT. It will use very little current. It can be a 2N7000 or 2N7002.
As shown, as long as the light beam is hitting the phototransistor, the LED will be off. When an object blocks light beam, the LED will turn on.

1710217812414.png
 

MisterBill2

Joined Jan 23, 2018
27,482
Hi
Use a small mosfet instead of BJT. It will use very little current. It can be a 2N7000 or 2N7002.
As shown, as long as the light beam is hitting the phototransistor, the LED will be off. When an object blocks light beam, the LED will turn on.

View attachment 317433
Note that the "ground" symbol is a substitute for the 5 volt supply return connection, which may, or not, be connected to anything else.
There is no functional requirement to "ground" any portion of the circuit.
Not showing the actual supply return connection is a common way of confusing folks. We should avoid using it except when it is actually required.
 

eetech00

Joined Jun 8, 2013
4,705
Note that the "ground" symbol is a substitute for the 5 volt supply return connection, which may, or not, be connected to anything else.
There is no functional requirement to "ground" any portion of the circuit.
Not showing the actual supply return connection is a common way of confusing folks. We should avoid using it except when it is actually required.
Sorry...but I have no idea what you mean.
 

Thread Starter

digital_ade

Joined Sep 19, 2016
11
Hi eetech00

thanks for such a clearly presented and direct solution to my question. This is extremely helpful.

the circuit you have laid out makes perfect sense to me.

Aside from the transistor selection and the resistor values, I am struggling to identify the differences in the wiring scheme between the circuit you proposed and my original circuit.

Aside from component selection is there anything functionally wrong with my circuit?

Many thanks.
 

eetech00

Joined Jun 8, 2013
4,705
Hi eetech00

thanks for such a clearly presented and direct solution to my question. This is extremely helpful.

the circuit you have laid out makes perfect sense to me.

Aside from the transistor selection and the resistor values, I am struggling to identify the differences in the wiring scheme between the circuit you proposed and my original circuit.

Aside from component selection is there anything functionally wrong with my circuit?

Many thanks.
If you understand your circuit, just compare it with mine.

In your circuit:
Q1 is normally pulled up (R2), so it doesn't need a pull down resistor (Q1-BE resistor).
The opto (X1) is wired wrong (shorted terminals, etc.). Compare it with my schematic.
Re-compute the all resistor values if you decide to use BJT. If you use 2N7000/2 mosfet, use the values I've shown.
 

MisterBill2

Joined Jan 23, 2018
27,482
Sorry...but I have no idea what you mean.
AS you study the circuit presented in post #3 you should notice that there is no connection to the negative (return) side of the +5 volt power source. An educated guess would be that it is that "ground " symbol, but that is an assumption, not stated as a certainty.
 

eetech00

Joined Jun 8, 2013
4,705
AS you study the circuit presented in post #3 you should notice that there is no connection to the negative (return) side of the +5 volt power source. An educated guess would be that it is that "ground " symbol, but that is an assumption, not stated as a certainty.
There has to be a return path to ground. But my schematic is showing the opto input and output have to be reference to the same ground since both use the same +supply. Of course, separate supplies could be used with a minor circuit modification if desired.
 

MisterBill2

Joined Jan 23, 2018
27,482
WE must guess, or assume, but we are not told that the supply negative is connected to that same ground. THAT WAS MY POINT!!especially for a newcomer who is not aware of the assumptions that are implied but not stated.
 

BobTPH

Joined Jun 5, 2013
11,505
WE must guess, or assume, but we are not told that the supply negative is connected to that same ground. THAT WAS MY POINT!!especially for a newcomer who is not aware of the assumptions that are implied but not stated.
There is no power source shown in the circuit. The +5V is, by convention, relative to circuit common (which you are, incorrectly, calling ground.) There is nothing wrong with the circuit.
 
Top