Optoisolator

Thread Starter

LaurenceR

Joined Feb 7, 2013
107
I am using a 4n25 opto-isolator to turn on a N channel mosfet. Most of the circuits I see us the opto output to pull down a voltage and turn off the mosfet. Why can't I use the optoisolator to switch the voltage on and off the gate of the mosfet. The mosfet doesn't draw any current only needs a voltage. What is the internal resistance of the mosfet output if there is any. Mine reads about 35 ohms when on. I might have already blown them.

Thanks for any help with this.
 

MikeML

Joined Oct 2, 2009
5,444
The 4N25 is an NPN "open collector" output from C to E, so it can sink current (current flows into C, out E). It must be paired with a "pull-up" resistor, or with a "pull-down" resistor in order to drive the gate of a mosfet.

pupd.gif

Gate supply can be the same as Load supply (for some cases)
 
Last edited:

ian field

Joined Oct 27, 2012
6,536
As long as that voltage is not higher then the maximum Vgs rating of the MOSFET.
On most power MOSFETs its in the region 18 - 20V.

A different situation arises with high side switches - the supply for gate control needs to be at least 8V more than Vdd.
 

Roderick Young

Joined Feb 22, 2015
408
Either of those circuits that MikeML showed above look good. Hopefully, you're only going to switch your load on and off very slowly. If you need to switch on and off a lot, as in a motor speed control, or a switching power supply, that sort of drive will have a slow rise and fall time, which will make the MOSFET dissipate a lot of power.

As for the on resistance of a mosfet, take a look at the data sheet for your device. I'm accustomed to switching power, and 35 ohms would be a sign that something was wrong - possibly not enough drive voltage at the gate. For a low power mosfet, maybe that would be ok.
 

Thread Starter

LaurenceR

Joined Feb 7, 2013
107
Thanks for all the helpful comments. Looking at the diagrams of the pull up and pull down drivers I'm not quite sure with the pull up configuration what will unload the capacitance on the mosfet gate when you turn the opto off. Although I am switching at a low rate (less than 20 hz) I am not sure why the reduced switching rate. I might have made a mistake in my explanation of the situation to Mr. Young. I meant there were 35 ohms on across the output pins of the optoisolator when turned off, not the mosfet.

These drawings also depict another problem I am having with the same circuit. My driver voltage is a different source than the drain to source voltage of the mosfet and the voltage on the mosfet is much higher. Approximately 60vdc. I am concerned about connecting the two negatives from different sources although it appears I have to in order to make it work.

Thanks again.
 

MikeML

Joined Oct 2, 2009
5,444
For 20Hz switching rate, you could use ~10KΩ for the pull-up or pull-down. The choice of pull-up or pull-down dictates if the MosFet is normally on or normall off..
 

crutschow

Joined Mar 14, 2008
34,470
Thanks for all the helpful comments. Looking at the diagrams of the pull up and pull down drivers I'm not quite sure with the pull up configuration what will unload the capacitance on the mosfet gate when you turn the opto off. Although I am switching at a low rate (less than 20 hz) I am not sure why the reduced switching rate. I might have made a mistake in my explanation of the situation to Mr. Young. I meant there were 35 ohms on across the output pins of the optoisolator when turned off, not the mosfet.

These drawings also depict another problem I am having with the same circuit. My driver voltage is a different source than the drain to source voltage of the mosfet and the voltage on the mosfet is much higher. Approximately 60vdc. I am concerned about connecting the two negatives from different sources although it appears I have to in order to make it work.
The resistor is what charges or discharges the gate capacitance when the opto turns off.

I don't understand your concern about connecting the negatives from the two sources together (?).
With the opto isolator you don't have to. The input and output are completely isolated.

If you have 60V for the MOSFET supply then you will need to prevent the gate from exceeding it's maximum rating which is likely no more than 20V (the MOSFET data sheet will tell).
One way is to add a resistor to form a voltage divider to drive the MOSFET gate. Select the resistor values so the gate voltage can never exceed its maximum rating.
For example to keep the gate voltage at no more than 15V you could use a 30.1kΩ resistor in series with a 10KΩ resistor to ground. The gate goes to the junction of the two resistors.
 

Thread Starter

LaurenceR

Joined Feb 7, 2013
107
The resistor is what charges or discharges the gate capacitance when the opto turns off.

I don't understand your concern about connecting the negatives from the two sources together (?).
With the opto isolator you don't have to. The input and output are completely isolated.

If you have 60V for the MOSFET supply then you will need to prevent the gate from exceeding it's maximum rating which is likely no more than 20V (the MOSFET data sheet will tell).
One way is to add a resistor to form a voltage divider to drive the MOSFET gate. Select the resistor values so the gate voltage can never exceed its maximum rating.
For example to keep the gate voltage at no more than 15V you could use a 30.1kΩ resistor in series with a 10KΩ resistor to ground. The gate goes to the junction of the two resistors.
I follow you. I didn't mean connect the ground from both sides of the opto. I am actually converting an ac voltage to dc with a full wave rectifier to drive my load through the mosfet. I am also connecting a step down transformer to the same ac voltage to drop it down to 20 vac then rectifying it to give me a dc voltage for the gate. I am wondering if I have to connect both of those grounds?

Secondly I guess I am missing something. In your drawing it looks to me like the mosfet would remain on when the opto is off, then when you turn the opto on it would pull down the voltage to ground and shut the mosfet off. I am sure I am missing something here.
Thanks.
 

Thread Starter

LaurenceR

Joined Feb 7, 2013
107
It seems like I am missing a concept here. With a 24 vdc source I simply used the opto output like a switch and would turn the voltage on and off from a 7812 voltage regulator attached to the same source to the gate. It works fine. It seems I wasn't pulling the gate voltage up or down merely switching it on and off to the gate. What am I missing?
 

MikeML

Joined Oct 2, 2009
5,444
... What am I missing?
To turn off the FET, you have to have an Ohmic path from gate to source which must be capable of discharging the gate capacitance from a positive voltage to zero voltage. Do you have a path? It could be a resistor, or the CE path through the opto I showed in post #2.

To turn on the FET, you have to have an Ohmic path from gate to a voltage more positive than the threshold voltage, which charges the gate capacitance. Do you have a path? It could be a resistor, or the CE path through the opto I showed in post #2.
 

crutschow

Joined Mar 14, 2008
34,470
I follow you. I didn't mean connect the ground from both sides of the opto. I am actually converting an ac voltage to dc with a full wave rectifier to drive my load through the mosfet. I am also connecting a step down transformer to the same ac voltage to drop it down to 20 vac then rectifying it to give me a dc voltage for the gate. I am wondering if I have to connect both of those grounds?

Secondly I guess I am missing something. In your drawing it looks to me like the mosfet would remain on when the opto is off, then when you turn the opto on it would pull down the voltage to ground and shut the mosfet off. I am sure I am missing something here.
Thanks.
Why are you using two separate voltage supplies for the MOSFET? You only need one.
But if you use two then, yes, their commons (negatives) need to be connected together.

In Mike's first circuit your description of the circuit operation is correct.
His second circuit works with the opposite polarity (opto on turns the MOSFET on).
 

Thread Starter

LaurenceR

Joined Feb 7, 2013
107
Why are you using two separate voltage supplies for the MOSFET? You only need one.
But if you use two then, yes, their commons (negatives) need to be connected together.

In Mike's first circuit your description of the circuit operation is correct.
His second circuit works with the opposite polarity (opto on turns the MOSFET on).

Would this work in theory?
 

Attachments

MikeML

Joined Oct 2, 2009
5,444
Would this work in theory?
No, there is no way to discharge the gate capacitance. Once the opto turns off, the gate on the FET is left floating. The pull-down path is missing. A resistor added from gate to source would do that...

Here it is again:

To turn off the FET, you have to have an Ohmic path from gate to source which must be capable of discharging the gate capacitance from a positive voltage to zero voltage. Do you have a path? It could be a resistor, or the CE path through the opto I showed in post #2.
 

Thread Starter

LaurenceR

Joined Feb 7, 2013
107
My mistake. I left the 4.7k ohm resistor out from the gate to the negative rail of the load power supply. That is in my circuit that works.
Essentially the positive gate voltage has to be tied to the source of the mosfet. I guess what I am asking is if you can simply turn the voltage on and off of the gate rather than pulling it up or down. Pulling the voltage down means you are always drawing a small current in the off state which I would rather avoid.
Thanks for your help and patience.
 

MikeML

Joined Oct 2, 2009
5,444
If you had mentioned the low current gate drive in the first post we could have saved a bunch of time and confusion.


Think of a CMOS push-pull output stage. It drives a capacitive load with very little quiescent current. Compare that to RTL.

How much current is the NFET delivering to a load when it is on?
The only source of positive voltage on the isolated side is 60V?
Does it matter if the FET switch is in the high side or low side of the load?

Driving 10mA through the opto-isolator input certainly isn't low power, so why do you care about a bit of power in the pull-down resistor which is relevant only when the input to the opto is being driven?
 
Last edited:

Thread Starter

LaurenceR

Joined Feb 7, 2013
107
Sorry about that.
The load current can be as high as 15 amps.
The only source is the ac voltage I am running through a full bridge rectifier to get the 60 vdc.
Doesn't matter which side the switch is on.
 

crutschow

Joined Mar 14, 2008
34,470
....................
Essentially the positive gate voltage has to be tied to the source of the mosfet. I guess what I am asking is if you can simply turn the voltage on and off of the gate rather than pulling it up or down. ..................
Removing the voltage from the gate does not change the gate voltage, as the gate capacitance stores that voltage. You have to have a path to both charge and discharge that capacitance.
You cannot leave the gate of a MOSFET floating as that is an in indeterminate state.
 

MikeML

Joined Oct 2, 2009
5,444
So if you start with a different optoisolator, one that will stand off 60V between its C and E pins when it is turned off, you can do it in a way such that the gate circuit draws only a bit of power when the opto is on, and zero power when it is off. Here are some opto-isolators that would work. The 2N25 has a max Vce of only 30V.

Here is how:
hv.gif

R3/R2 dissipate nothing when the opto is off. R3/R2 dissipate 60mW when the opto is on. Compared to the 15A*60V = 900W being dissipated in the load, that is nothing...

Note that the open-circuit voltage across the opto NPN is 60V... The Vgs of the NFET is only ~10V when on; oV when off.
 
Last edited:
Top