Resistor Specification on 20 KHz PWM

Lord Grezington

New Member
Hi there

I am designing an H-Bridge and learning a lot along the way, I have come up with a few questions I am hoping some of you can help me answer.

If I am sending a 5V 20Khz PWM signal from the PIC into a Mosfet, and to ensure that I do get the full PWM into the Gate of the Mosfet I want to use a Pull up/Down resistor. I am fairly new to this, but if I use a Pull down, I loose a few volts at the top end of the pwm, and if I pull up, the voltage never really gets back down to ground. And I will get a larger voltage drop when using a lower value resistor. But also, lower value resistors absorb more power and hence make the circuit less efficient (I am not really worried about this). Is this theory correct? And what is better for PWM, up or down?

Also, if I Use a large value resistor the PIC has easily enough "Power" to switch and can do this fairly quickly, and, if I have a low value resistor (if it is too low) it will take much longer to switch (if it switches at all). Now, the problem I have is that the Mosfet switching around 20 KHz (and the motor wires PWM'ing it to 24Vdc) creates a lot of EMC. I am worried that this EMC is going to send noise spikes into the control electronics and manipulate the 5V PWM. I am trying to keep the board to a double layer (so no ground plane). So now a lower value resistor is recommended as there is less chance of any noise pulling the pwm up or down?

So to conclude,
Is it better to pull up or down?
What calculations can I use to specify the pull up/down resistor in an electrically noisy environment?
Should I use some capacitors to filter out some of the EMC? if yes, what calculations can I use to make the specification?

P.S - I have also seen on some bridges that people use a 1K resistor in series with the Mosfet. Is my theory correct when I say that all this is going to do is create a voltage drop across the resistor and hence pull less voltage onto the gate, hence taking longer to charge the gate capacitor and increasing switching time?

Thanks in advance

Graham
 

Lord Grezington

New Member
I have Looked at using a driver IC, but this still does not solve any of the issues of the resistors - And - I am very limited in the physical space. I am trying not to add too many components unless they are critical. There is a good selection of TTL driven Mosfets to choose from.

Graham
 

pyrogaz

Member
A driver IC would address your question of whether to use pull-up or pull-down resistors. Most mosfet drivers are push/pull thus ensuring rapid switching in both directions (assuming the usual gate driving criteria are met) so no "pulling" resistors are required, although I always use a 10k pull-down on the signal to the IC but that's just to prevent floating.

Wold be useful if you could provide a bit more information on the overall project, sounds like you're controlling a 24v motor? What is it being used for?
 
Last edited:

Lord Grezington

New Member
Hi,

The project is going to be a high power stepper motor (so 2 H-Bridges will be involved). I will only be using a max of 24Vdc which i will PWM down to lower voltages at lower speeds to regulate the current.

Graham
 

Janne

Senior Member
To make an efficient FET-driver the gate needs to be driven to on / off voltages as quickly as possible. The gate of a FET behaves like a capacitor, so with small drive currents it will take longer to charge up the capacitance, and the FET will spend longer in the mid region, where losses are high. The FET gate driver IC's do just that. They provide a high current push / pull output to drive the gate fast both directions. You do the math, what happens when the gate is driven directly from the picaxe pin, with the outputs limited to about 25mA sink or source.. Even if the FET gate would work at TTL levels, high power ones still have a fair bit of capacitance, that needs to be charged and discharged fast to make it work effectively.

The resistors you mentioned are for a bit different purpose. Pull-up / down's are required if there is a special case (during startup for example) where the gate of the fet would be floating. FET gates should be never left floating, as they might then spuriously turn on(or off, if fail safe on-operation is desired). The series resistors on the other hand are used to tidy up the drive signal. Without any series resistors ringing and overshoot in the gate drive signal might occur, and the series resistor can be used to dampen them. Usually a value between 1-50 ohms works well, but you really need an oscilloscope to confirm it.

Where is Dippy's FET tutorial when one needs it? ;)
 

Goeytex

Senior Member
"...to ensure that I do get the full PWM into the Gate of the Mosfet I want to use a Pull up/Down resistor. I am fairly new to this, but if I use a Pull down, I loose a few volts at the top end of the pwm, and if I pull up, the voltage never really gets back down to ground. And I will get a larger voltage drop when using a lower value resistor. But also, lower value resistors absorb more power and hence make the circuit less efficient (I am not really worried about this). Is this theory correct? And what is better for PWM, up or down?"
When asking for advise on issues like this it is always helpful if not critical to provide a schematic of your circuit and Part numbers or datasheets for things like MOSFETS. Without knowing what FET you are using no one has any way of knowing whats really happening. That means those that try to help have to guess and/or or make assumptions that may or may not be correct. The more details you provide, the better the chance is you will get a good solution.

Without getting too deep into FET theory, in a nutshell your "theory" is flawed because it is based upon driving a FET directly from the output of a Picaxe, and is based solely upon your observations using one particular MOSFET (which you did not identify). There is no one way (pullup/ pulldown) that is better than another since you really do not want to do either. ( more later) Generally speaking though, driving a high power MOSFET at 25khz directly from the Picaxe output is not a very good idea and is the most likely the source of your problem(s).

Using a low RDSON Power Mosfet with a dedicated Mosfet Driver will most likely solve your problem. Another option could be to use a logic level IGBT instead of a Mosfet.

Since there is no schematic provided, I will assume that you are using a Logic Level MOSFET driven directly by the Picaxe pwm output. The Picaxe output is limited to 20 ma maximum and therefore cannot adequately drive a high input capacitance FET. The Picaxe output both sinks and sources current so a pullup or pull down resistor is of no real value anyway in regards to switching characteristics. The only reason a pulldown is used, is to keep the FET off while the circuit is powering up. The pulldown resistor simply keeps the gate from floating and does nothing in regards to sinking current. A typical value for the resistor is from 4.7k to 100K and has almost no measurable effect on FET gate voltage. Using a low value resistor here is only a detriment to switching, and in the case of the limited current available from the Picaxe, is the reason you are seeing lower voltage PWM and crummy switching. Keep the Pull down resistor at 10K or above. Adding a "Pullup" to the gate of a Logic Level FET connected directly to a Picaxe will serve only to mess things up. The Picaxe output is push - pull meaning it both sources and sinks current, therefore you do not want or need to use a pullup resister.

Also, if I Use a large value resistor the PIC has easily enough "Power" to switch and can do this fairly quickly, and, if I have a low value resistor (if it is too low) it will take much longer to switch (if it switches at all).
Let's talk about gate capacitance. Your FET has a certain amount of gate capacitance. Think of it as a capacitor connected from the gate to ground. Before the FET can reach its turn on threshold voltage this capacitor must be charged. This takes current & time. The more current the less time. When you decrease the value of the pulldown resistor the Picaxe output provides more current through the resistor and therefore less to the gate. This means it takes more time for the gate cap to charge and reach the threshold voltage. Switching gets worse... and if the resistance is low enough it stops. Why ? Because there is not enough current to overcome the gate capacitance. Again, the only reason for a "pulldown" is to keep the gate from floating during power on. This requires very little current, therefore the higher the resistance the better. A 10K resistor draws only 500 microamps leaving the rest of the Picaxe output current to drive the gate.

The best solution to all this is to select the correct components to do the job. My guess is that your MOSFET has too much gate capacitance to switch efficiently and quickly at 25Khz being driven only by the Picaxe 10 - 20ma output capability. Either get the proper FET for the application or even better , use a MOSFET DRIVER !

Now, the problem I have is that the Mosfet switching around 20 KHz (and the motor wires PWM'ing it to 24Vdc) creates a lot of EMC. I am worried that this EMC is going to send noise spikes into the control electronics and manipulate the 5V PWM. I am trying to keep the board to a double layer (so no ground plane). So now a lower value resistor is recommended as there is less chance of any noise pulling the pwm up or down?
This has ABSOLUTELY NOTHING to do with the value of a pullup or pull down resistor. First get your FET properly matched to the rest of the circuit , and then deal with EMC. There are tons of Application Notes that show how to deal with EMC.

And if you want help with selecting the proper FET &/ or FET Driver , please post a detailed schematic and a link to the datasheet of your FET .
 
Last edited:

Dippy

Moderator
For fast PWM for power MOSFETS you ABSOLUTELY need a driver. You'll be wasting your time otherwise.
You can make your own push-pull driver but for the sake of a quid or two you can buy a little device which has all the shoot-through balancing and deadtime stuff all done for you.

Many drivers allow you to include separate push-pull resistors.

I've knocked up a simple (very basic) calculator so you can get a rough guide as to resistor values.
I'll dig it out if of any interest.

A 1k gate resistor for fast PWM in power MOSFETs? You're having a laugh.
Whoever told you that has no experience of driving power MOSFEts , assuming there wasn't a communication problem between you both.
You'll be more in the region of 1R to 30R in most cases.

EMC (EMI/RFI).
At 20kHz it's not the actual Fq you should worry about, it's the switching speed. i.e. the slew rate of the square wave.
This is why you have gate resistors to slow that RC charge/discharge curve.
The squarer your wave then the more harmonics and the more EMC you get.
On the other hand, the squarer the wave then the less time your MOSFET spends as a heater.
You'll have to accept that it's a balance and trade-off.

No, don't stick capacitors in the gate drive. There are some techniques which involve them but that's beyoind here.

ALWAYS put adequate decoupling on a) your PICAXE and b) any driver circuit/chip.

ALWAYS have the track between driver and mosfet as and straight as possible. You will never get optimum performance on breadboard and unlikely on strip board.


We really need to see a schematic of your proposed bridge as there are several varieties.
In some cases a few hundred pFs of ceramic cap are put across each MOSFETds.
An important one is to put capacitance right at the top of your bridge to act as reservoir/decoupler/bypass.
You MUST keep big/fast transients away from long track lengths.
The PCB layout style and design is very signiificant.
 

Lord Grezington

New Member
Thank you all for your advise. I am using TTL power MOSFETS, and i had spent a long time specfying the correct ones which i could use. After some thought i have decided to Keep the TTL N-channel Mosfets which i will PWM through a AND Gate. This way the P-Channel Mosfets dont need to switch nearly as quickly (these tend to have a much higher Rgs and higher capacitance), even so, i may now try and find the space to add some driver IC's in there somewhere as it is the better solution, and the last thing i need is for one of them to go.

I will take some time to digest all the comments above, sorry for not supplying my schematic as at this point its still all in my head. All my components have only just arrived today so its all going on the breadboard over the weekend.

Again, thank you all for all your help, its all gold dust.

Graham
 

Dippy

Moderator
Many driver chips do the logic for you.
There are dozens of driver chips available.
If you have Ps at the top and Ns at the bottom there drivers that invert and non-invert appropriately.
And remember, you don't have to PWM top and bottom of the H.
A simple logic chip cannot , in itself , provide enough ooomph for fast switching.

It's difficult to recommend or suggest if you don't post your schematic.
And if you are new to this it's best that you post first then we can suggest what you can order.
Many here have seen/done what you want to do a million times (a slight exaggeration maybe).
:)
 

Lord Grezington

New Member
The reason I want to use 20KHz is its just above the audible noise spectrum, I diddnt want to go too high a frequency due to the switching losses dippy mentioned earler.
 
Top