Maker Pro
Maker Pro

FET on PIC output

milen

Dec 20, 2009
17
Joined
Dec 20, 2009
Messages
17
I found this diagram
167-picmin5.gif

on this site and whis to know if you don't need a reverse biased diode like you need when using a BJT to eliminate spikes at startup and shutdown operation.

PS author mention that FETs normaly need voltages higher than 10V at the gait to conduct through drain - source. Do FETs that could be controlled directly from PIC output exsist?
 

Resqueline

Jul 31, 2009
2,848
Joined
Jul 31, 2009
Messages
2,848
It would be advantageous to have a diode across the motor as usual. FET's are more susceptible to breakdown due to spikes than BJT's are - in my experience.
The kind you want is called logic level MOSFET's. They attain full conduction at 5V rather than the usual 10-20V.
Most FET's can be controlled by 5V though and still achieve acceptable efficiency for most uses. It's just a matter of choosing a larger FET than strictly neccessary.
 

milen

Dec 20, 2009
17
Joined
Dec 20, 2009
Messages
17
can you sugest me one. I wish to power 12v siren, that according to multimeter draws betwen 120 and 170 mili amps. I dont know if this siren is inductive load but i gues fet will be better than bjt?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Google is your friend: http://www.nteinc.com/Web_pgs/LL_MOSFET.html

My personal preference would be for a SI4936DY (because I have them on hand). Whilst not technically a logic level MOSFET, they have an Rds of 0.055 ohms at Vgs of 4.5 volts. They can pass 4.7A at that gate voltage, so unless your motor is huge, you should have no problems.

The issue with many high current, low Rds mosfets is that they have a large gate capacitance and you may get slow switching -- slow means, don't try to switch them at 20 kHz from a PIC. But for switching once per second or so, the dissipation during switching should not be an issue.

http://search.digikey.com/scripts/DkSearch/dksus.dll?vendor=0&keywords=si4936

Be aware that they're surface mount -- are you OK with that? (they're also a dual device, so you can have 2 channels for the price of one, or parallel them for higher current).

There's a plethora of other devices out there though. If your current requirements are quite low, look at the specs for the graph of Id Vs. Vgs and you may find that a lower gate voltage will give sufficient drain current. The "headline" Vgs is typically that which is required to give a saturation current equal (and often greater) than the device's maximum rating)

Also ensure that you determine the dissipation of the device and determine if heatsinking is required, and obviously that the Vds is sufficient.

Depending on your requirements you may find sellers on ebay with small quantities of suitable mosfets for bargain prices (presuming that you're in the US).

http://shop.ebay.com/i.html?_nkw=(s...&_sticky=1&_trksid=p3286.c0.m14&_sop=15&_sc=1

edit: OK, siren and 170mA -- even easier. Same procedure, but you'll be able to look at lower powered devices and the dissipation issues are likely not to arise to any great extent. Is it inductive? I don't know. But placing a diode across it is cheap insurance.
 
Last edited:

milen

Dec 20, 2009
17
Joined
Dec 20, 2009
Messages
17
tell me by which data should I search FET suitable for 5V PIC.
Is it "VGS", as voltage gate-source? Should that value be 5V.

As I know BJTs are current related, meaning that more current across base-emitter, more current across the collector-emitter and FETs should be voltage controled, meaning that more voltage on the gate more current across the drain source.

But I don't know how much current will be drained from the PIC output to the gate of FET, since PIC only have 5V when current is 0. Even minimum current lowers the PIC output voltage.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
A Vgs (yes, voltage gate to source) of 5V or less would certainly be great. However if you have any mosfets on hand, look at their datasheets and check the specs on the device.

As the voltage on the gate (compared to the source) is increased (more +ve for N channel, more -ve for P channel), at some point the mosfet starts conducting. For low currents, the device seems to be a resistor. At high currents it is a current source. As you increase the voltage further, the resistance (for small currents -- now potentially a larger current) decreases and the max current (where it becomes a current source) increases. At some point the "small current" can be as large as the device is capable of handling and you can never practically get to the region where current is limited. This final point (pretty much) is the Vgs for the device.

However, as I've suggested, you can quite often use mosfets to switch light loads with gate voltages well under their specified Vgs. If you have any mosfets, check their datasheets and see what the characteristics are like. Determine if dissipation will be a problem, if channel resistance will be a problem, and if the device can actually supply sufficient current. After you've done that, tell us what you've found and I'm sure someone can double-check it for you.

Alternatively, purchase one of the mosfets recommended above. A totally safe bet is any N channel Power Mosfet that is labelled "logic level", has a Vds at least 50% higher than your supply voltage, has a power rating about equal to your motor (this is probably overly generous), and can switch currents at least a couple of times greater than your motor requires.

I'd also recommend a small gate resistor (say 100 ohms). Mosfets have a very high impedance, but highly capacitive gate. When a load is quickly switched, the drain current can be capacitively coupled to the gate. The gate resistor helps prevent the spike from adversely affecting whatever is doing the switching.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
OK, your second question -- gate currents.

A mosfet is a very high impedance device. When turned ON or OFF the base current is essentially zero. (it's nA or even pA) for the SI4936 it's 100nA = 0.1 uA.

However the gate capacitance can be large. As you switch the device the capacitor must be charged or discharged. During this process, current flows. For fast switching applications the required gate current can be large. For the SI4936, they specify a certain set of conditions which include a gate current of 1A to switch a load in a max of 16ns.

A PIC can't hope to supply 1A, so you might think that this mosfet won't work. However it will. 1A is required to charge or discharge the gate capacitance fast enough to switch the device in 16ns, but you almost certainly don't need to be turning your motor on and off quite so fast.

Let's say your output can supply 10 mA, that means the switching time will be in the order of 1.6ms (probably faster). During that 1.6ms, the mosfet is going through a region where it is dissipating power, but as long as you're not going to switch it on and off many times per second, you will see no appreciable heating.

The specs will frequently tell you how much power you can dissipate for short periods (in this device, for 1.6ms you can ask it to dissipate around 20 watts -- way more than your motor)

The spec sheet I'm referring to is: http://www.datasheetcatalog.org/datasheets/70/272488_DS.pdf'

Mosfets like the one I suggest can be found on computer hard drives. They are typically used for switching the drive motor.

(I just grabbed a very old hard drive at random and it uses these http://www.datasheetcatalog.org/datasheet/fairchild/NDS9945.pdf )
 
Last edited:

MattCarp

Nov 2, 2010
2
Joined
Nov 2, 2010
Messages
2
FET suggestion

[this is a really helpful thread for me!]

How about the Diodes ZVN4206A N-channel enhancement MOSFET?

http://diodes.com/products/catalog/detail.php?item-id=1364#3

It's in a TO-92 case, so it's easy for through-hole construction, Vgs of 3V, can switch up to 60V and handle a drain current of 600 mA (700mW), and can withstand gate voltages of up to 20V.

I'm actually trying this out myself, but I am having a problem getting it to switch on. Using the PICkit debugger, I'm able to verify that I can switch an output pin on my PIC from 0 to 4.9V, but the FET isn't coming on. I don't have a resistor to tie the gate to ground, so I suspect that's the problem. (I'm trying to switch 15V to activate a relay).

If anyone has some deeper skills/experience and wouldn't mind checking the 4206 datasheet, I'd appreciate any tips/guidance. I can't believe something so simple (getting a FET to switch) is so challenging!
 

Resqueline

Jul 31, 2009
2,848
Joined
Jul 31, 2009
Messages
2,848
No resistor should not be a problem in turning on the transistor. If you can verify you have at least 4.5V at the gate then it should conduct with better than 1.5 ohms.
Check: PIC output not being tri-state (or open collector) and transistor pin-out.
 

MattCarp

Nov 2, 2010
2
Joined
Nov 2, 2010
Messages
2
No resistor should not be a problem in turning on the transistor. If you can verify you have at least 4.5V at the gate then it should conduct with better than 1.5 ohms.
Check: PIC output not being tri-state (or open collector) and transistor pin-out.

Thank you for your thoughts!

It's a PIC16F88, signal RB5. Aren't all ports tri-state?

In checking the data sheet and the PIC mid-range reference it doesn't clearly state the output stage configuration. However a block diagram on the data sheet (page 64) shows that it's a latch (D flip-flop) connected to the pin through an output buffer. While there isn't an explicit hi-z state, I could achieve the equivalent if I were to configure the pin to be an input and disable the PIC's "weak pull-up" feature.

Anyway, I've been able to see the toggle the output of the RB5 pin from 0 to 4.5V and see that on my multimeter, so I suppose I need to triple check the wiring of the transistor.

I've got a spare ZVN4206A transistor and a bench power supply, so I should also be able to confirm the operation of the device in a standalone test bed.

Also, following the link above, I found an NTE2987 "logic level" N-channel MOSFET at the local shop (Fry's). If all else fails with the ZVN4206A, I can change to the 2987...
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
It is possible to damage mosfets with static, so take the normal precautions whilst handling them.

Yes, generally all PIC outputs are tri-state, and they can sometimes be configured with weak pull-up when used as an input. The resistor to ground is there to ensure the gate stays low when the output is otherwise floating (or weakly pulled up) or when the power is removed.

Test the mosfet on a breadboard to verify that it is turning on and off as you apply the appropriate gate voltages. Double-check the pinout.
 
Top