Switching circuit using 4n25

Thread Starter

soulcramp

Joined Jan 21, 2011
1
I have a similar issue as one that I found when searching for opto-isolators in the forums. I am trying to use the optocoupler to activate a relay and switch 120VAC. I am forced to work with a 1.9-2.1 VDC control voltage and figured an optocoupler would be the best way to go. Attached is a picture of the circuit I have but cannot seem to get to work properly. When the 12V adapter is plugged in it instantly energizes the coil on the relay voiding the ability to control it with the opto. Any suggestions would be much appreciated!
Thanks
Soulcramp
 

Attachments

t_n_k

Joined Mar 6, 2009
5,455
Perhaps either the 2N3904 or the 4N25 is damaged. If you can unplug the opto-coupler (if it is socket mounted?) the 2N3904 should not conduct.

The 4N25 "dark current" should only be a few nA so the 2N3904 shouldn't be turning on with no LED side input current.

Have you checked the wiring and device pin/lead connections are correct?
 

eblc1388

Joined Nov 28, 2008
1,542
When the 12V adapter is plugged in it instantly energizes the coil on the relay voiding the ability to control it with the opto.
This happens by (bad) circuit design.

You will need to place a resistor of around 10K(10K~20K) from the base of the NPN transistor to 0V.
 

SgtWookie

Joined Jul 17, 2007
22,230
The 4.7k resistor is really too large; it should be 3.6k, and as eblc1388 mentions, a pull-down resistor from the base to the emitter is needed to ensure the relay turns off when the optocoupler turns off.

That doesn't address why the relay turns on immediately though.

Double check the transistor connections. If you had the base and collector connections swapped, that would cause the problem.
 

Audioguru

Joined Dec 20, 2007
11,248
If you built it on a breadboard then a nearby radio station will be picked up by the wires connected to the base of the transistor acting like antennas and causing the transistor to turn on. A base-emitter resistor will make the base less sensitive. A small pcb instead of the breadboard will stop the radio pickup.

Every few threads I say, "Don't use a breadboard". We should have a "sticky" about it.
 
Top