Optocoupler Connection

Thread Starter

poxkix

Joined Nov 28, 2011
46
Will my circuit connection work?
At default state, the MCU pin is at state 0. If the MCU pin changes state to 1 it activates the 12v solenoid.
Does the Optocoupler make any difference if it is there or not?
 

Attachments

crutschow

Joined Mar 14, 2008
34,280
As shown, the optocoupler does nothing. The optocoupler is an open collector transistor to ground and is either on or off. Either way there is no voltage to turn on the 2N2222A.

To configure it to operate properly, connect pin 16 to the 12V supply and pin 15 to the base resistor of the 2N2222A.
 

Thread Starter

poxkix

Joined Nov 28, 2011
46
As shown, the optocoupler does nothing. The optocoupler is an open collector transistor to ground and is either on or off. Either way there is no voltage to turn on the 2N2222A.
To configure it to operate properly, connect pin 16 to the 12V supply and pin 15 to the base resistor of the 2N2222A.
Oh. Good thing I asked first before trying this circuit.
Can the emitter handle the 12v input? I can't seem to find it in the datasheet or I don't know how to look for it.
Like this sir?
 

Attachments

crutschow

Joined Mar 14, 2008
34,280
The Absolute Maximum Rating collector-emitter voltage (on the data sheet) of that optocoupler output is 70V so it well readily tolerate 70V. It's the collector-emitter voltage you are concerned about, not the emitter voltage. The optocoupler output is highly isolated and will tolerate a potential 2500 volts above the input ground (DC isolation test voltage).
 

Thread Starter

poxkix

Joined Nov 28, 2011
46
The Absolute Maximum Rating collector-emitter voltage (on the data sheet) of that optocoupler output is 70V so it well readily tolerate 70V. It's the collector-emitter voltage you are concerned about, not the emitter voltage. The optocoupler output is highly isolated and will tolerate a potential 2500 volts above the input ground (DC isolation test voltage).
Okay. I got it. Thanks sir.
Will this circuit do?
 

Attachments

#12

Joined Nov 30, 2010
18,224
The design is good but it looks like you are trying to put 1 volt into pin one of the optocoupler. That's not enough to fire the internal LED. If that's just an oversight on the drawing, ignore this message.
 

Thread Starter

poxkix

Joined Nov 28, 2011
46
The design is good but it looks like you are trying to put 1 volt into pin one of the optocoupler. That's not enough to fire the internal LED. If that's just an oversight on the drawing, ignore this message.
That 1/0 there is a digital state. If that is what you mean

That circuit reverses the polarity so that an input low turns on the relay. Is that what you intended?:confused:
Edit: Also R2 is not needed.
What is the correct and exact circuit to serve my purpose? It only should activate if the MCU pin gives a digital signal og 1, if not then nothing happens.
 

crutschow

Joined Mar 14, 2008
34,280
..........................
What is the correct and exact circuit to serve my purpose? It only should activate if the MCU pin gives a digital signal og 1, if not then nothing happens.
Your circuit in post #3 would work as you want. Why did you change it?:confused:
 
Top