Opto Coupler 817 not switching off

Thread Starter

abuhafss

Joined Aug 17, 2010
318
Good. Then optocoupler is definitely ON. Not OFF.
What is load of optocoupler transistor?
It should be about 10 k in your case (because of small input current).
As mentioned in post #9, for testing I'm using an LED + 1k + 9V battery.

If the optocoupler is ON then why test load LED is off?
 
Last edited:

BobTPH

Joined Jun 5, 2013
11,560
Well, you get at most 11mA through the 2K resistor and the LED. It might be enough to activate the opto, but I would not count on it.
 

sghioto

Joined Dec 31, 2017
8,634
Well, you get at most 11mA through the 2K resistor and the LED. It might be enough to activate the opto, but I would not count on it.
About the same as I figured which should be fine.
Depends on the load.
The min CTR is 50% at 5ma for the PC817.
 
Last edited:

Danko

Joined Nov 22, 2017
2,179
Faster, lower ripple, bigger out current:
1690651127211.png
Diodes D1-D4 are 1N4148, D5 is Zener 16.5 V.
ADDED:
I noticed that when the sensor is ON, the current path will be restricted to 33k resistor the rest of the circuit will remain off. And when the sensor is OFF the whole circuit will be power on.
You are right. Thank you. I swapped labels.
 

Attachments

Last edited:

sghioto

Joined Dec 31, 2017
8,634
Interesting. I think it would be simpler to have the output of the opto activate a transistor or mosfet for higher current without changing the 1/2 wave rectifier drive. Optocouplers are usually not intended to drive loads more than a few miiliamps.
 

Thread Starter

abuhafss

Joined Aug 17, 2010
318
Faster, lower ripple, bigger out current:
View attachment 299340
Diodes D1-D4 are 1N4148, D5 is zener 16.5 V.
I can't test the circuit physically until Monday.
But studying the schematic, I noticed that when the sensor is ON, the current path will be restricted to 33k resistor the rest of the circuit will remain off. And when the sensor is OFF the whole circuit will be power on.
 

Thread Starter

abuhafss

Joined Aug 17, 2010
318
1690653612543.png

The collector of PC817 is to be connected to the node PX1 and the emitter to ground of the 24V supply. Node D12 connects to digital input of Arduino.

Actually, the above isolation circuit was designed to use a 3-wire NPN (NO) inductive proximity sensor to avoid false triggering, as discussed here. However, the false trigger issue was not gone. Just a couple of days ago, I discovered that the false triggering can completely be avoided if I use a 2-wire AC sensor. So I tried to use the circuit mentioned in post #1.

The reason, why I cannot eliminate the old optocoupler+comparator network is that it is part of the PCB.
 

sghioto

Joined Dec 31, 2017
8,634
It should work with the circuit shown. May need to adjust the value of R3 or add a diode but won't know until you give it a test. A few voltage readings will help in determining the component values needed.
Use the circuit below for the test.
Read the voltage across the emitter - collector of the PC817 when the sensor is OFF and ON.
1690669788704.png
 

Thread Starter

abuhafss

Joined Aug 17, 2010
318
It should work with the circuit shown. May need to adjust the value of R3 or add a diode but won't know until you give it a test. A few voltage readings will help in determining the component values needed.
Use the circuit below for the test.
Read the voltage across the emitter - collector of the PC817 when the sensor is OFF and ON.
View attachment 299413
Your circuit looks promising, I have simulated it with R2 and R3 = 1k.
 

Ian0

Joined Aug 7, 2020
13,158
You have already got a convenient AC input optoisolator (PC814) and that allows you to eliminate the rectifier.. I had to simulate it with two PC817 in parallel,
The 150k in series with the source in the second circuit simulates the leakage resistance.
You can use the existing 1k 100nF network. The external capacitor must be a class X (but it doesn't dissipate any power unlike @sghioto 's 20k resistor which needs to be 3W) and the external 1k needs to be 1Watt.
Top trace is with proximity not detected, bottom trace is with it activated.
Screenshot from 2023-07-30 06-55-29.png
 
Top