PDA

View Full Version : Question about wiring MOSFETS......



winchman
12-29-2005, 05:29 PM
I need to use some MOSFETS with my microprocessor to switch some large relays on and off. The circuit recommended for driving large relays is shown at the top in the photo:

http://img.photobucket.com/albums/1003/winchman/000_11782.jpg

Will it work if I wire it up like the sketch at the bottom of the photo? The relays I want to use have one side of the coil grounded to the mounting bracket, and I can't change that. Also, I don't like the idea of having the relay coils "hot" when they're not on.

Roger

BillH
12-29-2005, 05:34 PM
A MCU powered sailplane winch, interesting.

Evan
12-29-2005, 05:44 PM
You can do that but not with the IRF511 mosfet. You will have to use a P-channel mosfet such as the IRF4905 and the control logic will be inverted.

Dawai
12-29-2005, 05:44 PM
YEah,, but 'no difference...

Think on this friend.. POWER does not flow till it has a completed circuit, in and out..

Either side..

Are you using a BS2? there are better toys out there.. I have some pcbs made up, and some extras bs'2s that is..

Are you freq out? PWM'ing the mosfet to vary speed? if so perhaps a encoder input back into the cpu to monitor actual speed and a simple pi logic to correct or ramp up to speed. The BS2 PWM is all over the place.

Too bad you aren't closer, I have a box full of mosfets. Logic gate if I remember correctly.

Voltage drop across the load? Will that affect voltage neccessary to turn on?

A IRF511 can tie directly to a bs2 pin. NO amp or inverter needed. It showes a 10k pull up resistor thou on the gate to +5.. (Microcontroller application cookbook) Matt Gilliland author..

[This message has been edited by David E Cofer (edited 12-29-2005).]

Wirecutter
12-29-2005, 05:47 PM
wrong answer. I'll post a correction later.

[This message has been edited by Wirecutter (edited 12-29-2005).]

Dawai
12-29-2005, 05:59 PM
The BS2 can source or sink according to configuration. They can actually sink more current than source. Utilizing a positive tied pull up resistor, it means that Sinking the pin will turn on the Mosfet.

Some mosfets are quite gate power hungry.

I can post a code applet if you need. I was controlling a tattoo machine with a rig just about like "that" one I posted.

[This message has been edited by David E Cofer (edited 12-29-2005).]

Evan
12-29-2005, 06:08 PM
"wrong answer."

?

The source and drain have to be swapped but that's about it. The 4905 can take +-20 volts Vgs so protection of the gate won't be required in this application.

Wirecutter
12-29-2005, 07:32 PM
<font face="Verdana, Arial" size="2">Originally posted by Evan:
"wrong answer."

?

The source and drain have to be swapped but that's about it. The 4905 can take +-20 volts Vgs so protection of the gate won't be required in this application.</font>

You got it right, Evan. I started to say that you just change the direction of the arrow on the MOSFET's source terminal, but as you said, you have to swap the source and drain, too.

I have an H-bridge circuit around here somewhere that I made for driving a telephone ring-voltage generator. It uses the IRF520 and its complement - I want to say it's an IRF9520 or some such. In my earlier post, I started to say something stupid, so I edited it out and came home to check my notes.

If anyone wants to see it, I'll see if I can post the schematic.

Regarding David's comment about power-hungry gates: MOSFET gates act like capacitors. When you switch, the gate has to be "charged up" or "discharged", kinda like a cap. If you're not switching, you can handle horrendous currents with very little gate current. The more (faster) you switch, the more energy you're pumping in and sucking out of the gate. The bigger FETs take more gate charge.

A bit of trivia: Especially when MOSFETs first started getting big in the early '80s, they always drew the symbol with a "built-in" diode across the source-drain terminals. I was working with switching (Class D) amplifiers at the time. A guy from International Rectifier told me that the "diode" is actually more like a bipolar transistor in there. At high and fast switching currents, enough energy can couple into the "base" of this transistor to turn it on. Now imagine this in an H-bridge circuit. Our amp's main supply was the 110v line, recified into DC and charging a big bank of capacitors. When this "bipolar" turned itself on (as the FET was turned off and it's complement in the H-bridge was turned on), we'd get essentially a dead short across the bank of caps. The FETs would pop like firecrackers and send bits of plastic case flying. The guy from IR said that was nothing. Imagine the same thing with hockey-puck sized MOSFETs driving large spinning motors. Stop driving the motor, and it's a generator, and it doesn't stop spinning instantly. That must be some bang!

Anyway, that's one reason you see RC snubbers across MOSFETs that are switching hard and fast...

Dawai
12-29-2005, 07:43 PM
Winchman, Roger..

I got a couple of Robotic H-bridge motor controls that will spin pretty large motors. I think they top out at 40 amps? have a monster heat sink.

For input, they take Logic in 0-5vdc, IIR2, Freq input from a remote radio.

The heat sink weighs about 2lbs, They are protected from "battery type" low voltages and pretty hard. I had them on the RC lawnmower for a bit. *Wheelchair motors took a dive. Seems they were less than $100 each, thou I don't remember. If it is complete, will do everything you want, by the time you build something it is getting close.
You are wanting to build something to "accellerate" the sailplanes still without jerking them out between the wings?

spkrman15
12-29-2005, 07:47 PM
What is a Mosfets??

Rob http://bbs.homeshopmachinist.net//smile.gif

Evan
12-29-2005, 07:49 PM
Metal Oxide Semiconductor Field Effect Transistor

J Tiers
12-29-2005, 10:34 PM
For best results, wire a small resistor in series with the mosfet gate, as close as possible to it. Value around 47 ohms is good. Prevents oscillations, which are quite possible otherwise.

The problem with the proposed circuit with moved fet is that the gate voltage can't be up in the "on" range AND have full load voltage if the drain and the gate pullup go to the same voltage. The fet will partly turn off and the load voltage will decrease to be the power supply minus the "on" voltage.

If you had a voltage of +20V or so for the mosfet gate pullup (10K), it would work perfectly if the 7407 could handle that voltage.

Going with a p-channel reverses the drive so it has all 12V to pull the gate into the conduction range. You then have a "high side switch".

BTW:
That diode across the fet is now FAR better than before. The parasitic bipolar is no longer a problem. It does come into play somewhat during "avalanche" conduction, if drain voltage spikes over the maximum D-S rating. But newer devices have an energy rating for that mode to let you know what's acceptable.

While most of the diodes are fairly slow, with a few hundred nanosecond turn-off time(Trr), some have sub 100 ns turn offs now. I have used that diode as the "commuting" diode in class-D designs very successfully.

[This message has been edited by J Tiers (edited 12-29-2005).]

Wirecutter
12-30-2005, 04:23 PM
<font face="Verdana, Arial" size="2">Originally posted by J Tiers:
For best results, wire a small resistor in series with the mosfet gate, as close as possible to it. Value around 47 ohms is good. Prevents oscillations, which are quite possible otherwise.</font>

It'll also slow down the speed of the gate charging, hence, the switching speed. I'd imagine this would have the same protective effect as snubbers across the D-S terminals.


<font face="Verdana, Arial" size="2">Originally posted by J Tiers:
BTW:
That diode across the fet is now FAR better than before. The parasitic bipolar is no longer a problem. It does come into play somewhat during "avalanche" conduction, if drain voltage spikes over the maximum D-S rating. But newer devices have an energy rating for that mode to let you know what's acceptable.</font>

That makes sense, since after a while, I stopped hearing about the dreaded "dV/dT" problem in higher-powered FET circuits. I would have guessed a combination of "everybody knows that" and as you said, improvements in the devices. MOSFETs really are amazing devices, IMHO

-Mark

danolson
12-30-2005, 08:41 PM
David,

Any way you'd consider shipping some of those mosfets? I've got a need for some, and I hate to try to come up with enough other stuff to make digikey's $25 minimum. Thanks.


<font face="Verdana, Arial" size="2">Originally posted by David E Cofer:
YEah,, but 'no difference...

Think on this friend.. POWER does not flow till it has a completed circuit, in and out..

Either side..

Are you using a BS2? there are better toys out there.. I have some pcbs made up, and some extras bs'2s that is..

Are you freq out? PWM'ing the mosfet to vary speed? if so perhaps a encoder input back into the cpu to monitor actual speed and a simple pi logic to correct or ramp up to speed. The BS2 PWM is all over the place.

Too bad you aren't closer, I have a box full of mosfets. Logic gate if I remember correctly.

Voltage drop across the load? Will that affect voltage neccessary to turn on?

A IRF511 can tie directly to a bs2 pin. NO amp or inverter needed. It showes a 10k pull up resistor thou on the gate to +5.. (Microcontroller application cookbook) Matt Gilliland author..

[This message has been edited by David E Cofer (edited 12-29-2005).]</font>

J Tiers
12-30-2005, 08:49 PM
Wirecutter:

Actually, in that particular circuit, the 10K pullup slows turn-on switching far more than the 47 ohms. And it is not a problem anyway, since the switching is plenty fast to turn on a relay.

Reversed, with the 7407 pulling down the gate of a p-channel, it would have an effect, and the 10K would be out of the picture for turn-on, but would be effective for turn-off.

In fast switching circuits, 50kHz to 1mHz, the series resistor is a definite factor. It can in fact be used as you say, usually more for EMI than for spikes, but those two are so very closely related that it comes to the same thing.

winchman
12-31-2005, 01:10 AM
I connected the gate of the MOSFET to an output pin through a 10K resistor, and it works fine.

I can see now why the relay needs to be where it's shown. I'll just get some with ungrounded coils, and I'll get some little rubber boots to protect the connections.

Thanks for the help.

Roger

J Tiers
12-31-2005, 01:25 AM
Actually, if you don't need the relay on for more than a few minutes, you CAN use an N-channel mosfet AND put it up on top as you proposed.

I wasn't thinking..... we do this all the time.....

You need to "bootstrap" the gate drive with a big enough capacitor to hold it "on" for longer than you need it to stay on in one cycle. That is probably only a few microfarads, maybe a 4.7 uF cap, because there is hardly any current flow.

It is fairly simple, and only needs a couple more parts than you have now.

Added capacitor goes to mosfet source, and to the top of the 10K. Diode from 12V to top of cap and 10K.

When drive is low, mosfet is off, source is at zero through the relay coil, and power to 10K comes thru the diode. Capacitor is charged to 12V - 1 diode drop, or around 11.5 V.

When 7407 releases the gate and it is pulled up, the source of teh mosfet goes up near 12V, and the top of the capacitor is at 12V + the 12V held on the capacitor, because it can't change voltage until discharged.

because the 7407 isn't drawing any current, there isn't a load, and the capacitor will hold the gate high for a long time. Many minutes or longer. You won't need &lt;more than&gt; that.

The only issue is the 24V (12 +12). If teh 7407 won't deal with that, you might need a resistor in series with the diode to form a divider.

Many open collector parts are good to 30 V, but that one may not be. 20V was mentioned, and I have not looked it up.

[This message has been edited by J Tiers (edited 12-31-2005).]

Evan
12-31-2005, 01:37 AM
That should work fine. The SN7407 is good to 30vdc on the open collector.

Leigh
12-31-2005, 05:57 AM
<font face="Verdana, Arial" size="2">Originally posted by danolson:
Any way you'd consider shipping some of those mosfets? I've got a need for some, and I hate to try to come up with enough other stuff to make digikey's $25 minimum.</font>

Mouser http://www.mouser.com - no minimum

------------------
Leigh W3NLB

Dawai
12-31-2005, 12:33 PM
Question:?
I don't have the datasheet here..
And the specs on the irf511 was a negative gate turn on? I am looking for the mosfet spares I bought, I am not sure they are not IRF530's or 540's.. Thou I did have some 511's.. I have a fishing tackle box I use to keep parts in, seems the mosfets were in a plastic sack, not located yet.

And, does the PWM output on the stamp throw just a positive pulse output? (meaning you invert the signal) Since you are using a relay, you are not varying the output via pwm. It is a one line commmand in BS2 code, but the LOW command to pull the pin sinking?

Winchman; I have the code to read a quadrature encoder (*count up/dn) and it is pretty simplistic.

Mosfet drivers, I was using them before with the stamp too.. A number don't come to mind. But the PWM-mosfet reliability issue came up and I added them in and they quit dying.

Now that we have the topic open? How about a reliable H-bridge driver chip? All the ones I used are hard as hens teeth to find and obselete. A Servo chip w/encoder feedback? Share them numbers that come to mind..

We should move this whole topic over to shared "networking"

J Tiers
12-31-2005, 10:38 PM
<font face="Verdana, Arial" size="2">Originally posted by David E Cofer:
Question:?
I don't have the datasheet here..
And the specs on the irf511 was a negative gate turn on?
</font>
Mosfets are "enhancement" devices, so you pull the gate towards the drain voltage to turn on. In the case of N-channel, that is a positive drive for "on".



<font face="Verdana, Arial" size="2">

Mosfet drivers, I was using them before with the stamp too.. A number don't come to mind. But the PWM-mosfet reliability issue came up and I added them in and they quit dying.
</font>
If you are doing PWM at any reasonably high frequency, you need some form of driver.

The DC current required by the gate is essentially zero. But to quickly charge the gate up to the "on" voltage, or pull down to "off", you may need as much as an ampere peak, for a fractional microsecond.

The gate drive needed is usually given in terms of the total charge required to be transferred. Then it is up to you to decide how fast you need to provide it (how much peak current).

Slow charging, with too high a series resistance, heats up the mosfet due to the resistive heating during switching as the voltage across the mosfet slowly changes, and it is acting as a resistor. The same thing happens in fast switching, but the time is far less and total energy is that much smaller.

There are other losses, the INCREASE with fast switching, but they are too complicated to get into here.


<font face="Verdana, Arial" size="2">
Now that we have the topic open? How about a reliable H-bridge driver chip? All the ones I used are hard as hens teeth to find and obselete. A Servo chip w/encoder feedback? Share them numbers that come to mind..
</font>


There are Intersil chips, HIP4080A and HIP4081, that are not obsolete to my knowlege, and are quite reliable. I used the HIP4080A in a commercial product and had near 100% reliability. No failures of the power stage were reported, in a class-D amplifier where users might connect to any speaker load.

The 4080A has one input driving all 4 inputs, where the 4081A has independent inputs

App note

www.parallax.com/dl/docs/cols/nv/vol2/col/nv52.pdf (http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv52.pdf)