Driving FETs with PICs
Driving FETs with PICs
(OP)
I've read through several threads here about driving FETs with microcontrollers, but I'm still unsure of the best method. Some suggest pullups, some suggest pulldowns, others suggest driver transistors for maximum gate capacitance supply, etc.
Knowing that there's a "better" design for every different application, I won't ask "What's the best way?" I need to switch a mere 1-2A, in the microsecond range, etc. using a PIC. I believe most PICs can source/sink around 20mA on each I/O pin. It will be a logic-level FET (take your pick, although suggestions are gladly accepted) switching 12V into 2 LEDs and a resistor in series (Vf on the LEDs is around 4.5V each).
Knowing that there's a "better" design for every different application, I won't ask "What's the best way?" I need to switch a mere 1-2A, in the microsecond range, etc. using a PIC. I believe most PICs can source/sink around 20mA on each I/O pin. It will be a logic-level FET (take your pick, although suggestions are gladly accepted) switching 12V into 2 LEDs and a resistor in series (Vf on the LEDs is around 4.5V each).





RE: Driving FETs with PICs
1) "I need to switch a mere 1-2A, in the microsecond range, etc" - how many microseconds, and, on/off duty cycle? What speed does the PIC output device switch at? These will determine if gate capacitance or switching speed is critical, as slow turn-on or turn off at the FET can cause lots of power dissipation problems.
2) Will the power supplies to the PIC and and the 12V supply to the LEDs ever be switched separately? If they are switched separately and your circuit has pull-ups this can drive current from the 12V supply into the PIC output devices, causing all sorts of strange problems at other outputs. Also, under these part-powered conditions you need to make sure that the FET is either turned fully on, or fully off. Otherwise a "don't know" could make it fry!.
RE: Driving FETs with PICs
RE: Driving FETs with PICs
The PIC is powered by a 5V regulator off of the unfiltered 12V line. The 12V line will be the power source for the FETs.
I ask because the information I have on the subject is somewhat limited. Examples I've seen in past thread have listed gate capacitances in the 1000pF+ range and it was always suggested they couldn't be driven by themselves, whereas many of the logic-level FETs I've seen have Ciss=1000pF+. I wasn't sure if these values were equivalent.
RE: Driving FETs with PICs
Choose your mosfet with multiple sources in mind. An IRF7401, for example, has a standard SO8 pinout.
If you see too much capacitance at the gate, use logic buffers in parallel to add drive to your PIC outputs. It's like an array of small push-pull amplifiers in parallel.
Don't forget a capacitor unless you want to scramble all the rf receivers in your area. A "too good" rise time will increase interference.
RE: Driving FETs with PICs
The logic buffer approach is to be recommended if you want reasonable rise & fall times.
I've seen some remarkably complex drive circuits used in automotive comfort controls for this reason.
rgds
Zeit.
RE: Driving FETs with PICs
RE: Driving FETs with PICs
With each bank of LEDs, why not combine the PWM signal with the on/off selection at each FET? This can be done with some simple gates. That way you don't get the extra complication of using transistor level shifters for any sourcing FETS.
A further thought: although you can get power FETS with logic-level gate voltage requirements, if you use open-collector logic gates with pull-up resistors to +12V you can achieve extra gate voltage swing for the FET (if you need it) to make sure it fully turns on.
RE: Driving FETs with PICs
For everyone, what equations are you using to determine the turn on times of the FET based upon its specs, current being switched, and gate voltage? A clear explanation of Miller capacitance is also appreciated.
Thanks!
RE: Driving FETs with PICs
The switching times for FETs are normally specified at a particular load current and Vds. Depending on the drive circuit impedance, gate isolation resistors, etc., it is possible to get a significant R-C delay circuit with the gate capacitance which can lengthen turn-on and turn-off times of the FET. This can be difficult to drive at really high switching speeds, and can also increase FET power dissipation during switching transitions due to the slow edges in the load circuit.
Miller capacitance is a parasitic capacitance between drain and gate (+ circuit board strays) which slows switching times by a negative feedback effect. Consider a positive-going gate voltage to turn the FET on. As the FET starts to conduct and the drain-source voltage starts to drop from a high to lower potential, the Miller capacitance produces a negative going transition into the gate which tries to counteract the positive going change which produced it. The reverse situation occurs when the device turns off.
Hope that helps.
RE: Driving FETs with PICs
The PIC parts can supply 25mA per port (not the 20mA I originally specified). Switching times should be in the millisecond range for the "selection" FETs, but the PWM FETs should have switching times in the 100 us range.
Where do I look on the FET datasheet to find the gate capacitance? The datasheet lists Ciss, Coss, Crss (Input, Output, and Reverse Transfer Capacitance, respectively), but no indication of what these values refer to (which pin or grouping of pins). The sheet lists turn on/off times, but I assume those are based strictly upon the internal gate capacitance and resistance.
RE: Driving FETs with PICs
The gate-drain capacitance is Crss.
The drain-source capacitance is Coss.
Ciss is more or less constant.
Crss is multiplied by the voltage gain during switching to give the Miller capacitance.
The combination of Ciss and (Crsss x gain) defined the input capacitance that the driver has to charge and discharge to turn the thing on and off.
rgds
Zeit.