Optocoupler separated ground problem (solved)

MrChips

Joined Oct 2, 2009
34,814
4N25 optocoupler.jpg

Test input Vin is a 1Hz 5V square wave. I used a red LED to give a visual indication that that the photo-transistor is working. I tested the circuit with both 4N25 and 4N33 which I already had in stock.
I found no difference if the load is on the collector or emitter of the photo-transistor.

It still remains a mystery as to why your circuit is not working.
 

meth

Joined May 21, 2016
304
Loose negative node of the battery?
There should be no current if the battery + is routed to any other ground except the battery -, right?

Wrong resistor value?
I can't see the colors on the picture, but still that doesn't explain the behavior when GND is brought to the -.

This is some mystery indeed.
I don't know what else can you try. Measure current in series with the battery maybe?
 

ericgibbs

Joined Jan 29, 2010
21,442
hi haman,
Reduce the on board circuit to this basic circuit,
The 12V reg drives the PC817.
The PC817 output pin should be at ~12V
What do you measure??

E


As a secondary test, move the R8 10k resistor to the PC817 Collector.

BTW: I do not see any decoupling capacitors on the power rails??
This could cause power instabilty

1752583075385.png
 

Thread Starter

haman tamimi

Joined Jul 15, 2025
35
View attachment 352747

Test input Vin is a 1Hz 5V square wave. I used a red LED to give a visual indication that that the photo-transistor is working. I tested the circuit with both 4N25 and 4N33 which I already had in stock.
I found no difference if the load is on the collector or emitter of the photo-transistor.

It still remains a mystery as to why your circuit is not working.
what did you use to generate a signal?
I have just tried it using my signal generator and it work as you said.
but still the main circuit has the same problem
 

Thread Starter

haman tamimi

Joined Jul 15, 2025
35
hi haman,
Reduce the on board circuit to this basic circuit,
The 12V reg drives the PC817.
The PC817 output pin should be at ~12V
What do you measure??

E


As a secondary test, move the R8 10k resistor to the PC817 Collector.

BTW: I do not see any decoupling capacitors on the power rails??

View attachment 352748
by driving the opto using the regulator and remove everything else the opto works just fine.
and as MrChips said that it didn't mater if the load is on the collector or the emitter.
about the cap I am using a power supply for tisting so no need for it
 

Thread Starter

haman tamimi

Joined Jul 15, 2025
35
Loose negative node of the battery?
There should be no current if the battery + is routed to any other ground except the battery -, right?

Wrong resistor value?
I can't see the colors on the picture, but still that doesn't explain the behavior when GND is brought to the -.

This is some mystery indeed.
I don't know what else can you try. Measure current in series with the battery maybe?
the thing is when checking using scoop and DMM there is an input signal applied on the diode side of the opto, but on the transistor its just on cutoff region where all the voltage is across the collector and the emitter.
 

Thread Starter

haman tamimi

Joined Jul 15, 2025
35
hello everyone Alhamdulillah the problem solved
thanks for everyone for their effort helping me with it I really appreciate this.
and for those who wondering there is the explanation:
the whole problem was a grounding issue as some has guess before, but the thing is that my house ground is the problem as there is a leakage between the neutral and the ground and as all my tests was depends on variable power supply and scoop and everything was depend on converting AC to DC, so all the circuit used before wasn't a close loop and this led to what happen before, and even I found out that the signal that feed the opto has some issues because of that .
so, after using individual batteries the problem solved and the system work as anyone could expect.
and the last test to confirm this result, I have used flyback regulator to get multiple DC voltage, and it work just fine.
because of this I think if anyone try this circuit on his workshop it will work.
and let me say I never expect this to be an issue even if I knew that there is a leakage befor
and for the last conclusion: any electrical workshop or test bench must have a good foundation of grounding.
so, this is the whole thing, thanks everyone for their time and effort.
 
Top