Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 23, 2020, 03:33:24 03:33


Login with username, password and session length


Pages: [1]
Print
Author Topic: PWM circuit  (Read 1231 times)
0 Members and 1 Guest are viewing this topic.
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2294

Thank You
-Given: 736
-Receive: 592


Top Topic Starter


« on: August 19, 2020, 07:00:12 19:00 »

Hello,

Is this a suitable circuit for driving a 12V FAN using PWM output from a MCU?
Do I need a resistor from the gate to GND, if yes, what should be the value for it?
Do I still need a diode across C3?
Is this MOSFET good, any alternative can be suggested or keep it as is?

Edit: Max current 1.1A
« Last Edit: August 19, 2020, 08:49:13 20:49 by metal » Logged
optikon
Cracking Team
Hero Member
****
Offline Offline

Posts: 771

Thank You
-Given: 892
-Receive: 1926


« Reply #1 on: August 19, 2020, 08:46:22 20:46 »

Hello,

Is this a suitable circuit for driving a 12V FAN using PWM output from a MCU?
Do I need a resistor from the gate to GND, if yes, what should be the value for it?
Do I still need a diode across C3?
Is this MOSFET good, any alternative can be suggested or keep it as is?


I would locate C3 from 12V to GND and not across your load.

You didnt say what current your fan draws...
« Last Edit: August 19, 2020, 08:50:31 20:50 by optikon » Logged

I can explain this to you. I can't comprehend it for you.
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2294

Thank You
-Given: 736
-Receive: 592


Top Topic Starter


« Reply #2 on: August 19, 2020, 09:11:43 21:11 »

I edited first post
Logged
vern
V.I.P
Active Member
*****
Offline Offline

Posts: 120

Thank You
-Given: 7
-Receive: 34


« Reply #3 on: August 19, 2020, 09:22:38 21:22 »

I would add a Z-diode >24V from Drain to GND just to protect the transistor against spikes.
A resistor from Gate to GND is only necessary if the PWM output is floating before the MCU Pin is addressed, i.e. during power up.
This could overload the transistor because it could drift in a linear area, check the safe area region in the datasheet.
A voltage of 5V and a current of 200mA for example could destroy your transistor.
So just to be sure add a 47k resistor from FAN_PWM or Gate to GND to avoid any floating.
another thing:
If the PWM output is high before being addressed by the software the fan will be on full power.
If you want to stop that you need to add a capacitor, a resistor and a diode.

Cap 100nF in series between FAN_PWM and R4,        
resistor 47k between Cap--R4 to GND                                
diode 1N4148 parallel to 47k resistor with anode to GND              
« Last Edit: August 19, 2020, 09:27:16 21:27 by vern » Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2294

Thank You
-Given: 736
-Receive: 592


Top Topic Starter


« Reply #4 on: August 19, 2020, 10:04:28 22:04 »

this is how things should be. according to vern, zener is not required., also 100nF still I don't understand where is should be placed, also do I need a diode across the load?

Posted on: August 19, 2020, 11:35:01 23:35 - Automerged

this is ridiculous, I am looking at this white paper https://noctua.at/pub/media/wysiwyg/Noctua_PWM_specifications_white_paper.pdf, why bother with the MOSFET driver
Logged
optikon
Cracking Team
Hero Member
****
Offline Offline

Posts: 771

Thank You
-Given: 892
-Receive: 1926


« Reply #5 on: August 19, 2020, 10:46:19 22:46 »



Cap 100nF in series between FAN_PWM and R4,        



AC couple the drive? No that doesnt work. For high PWM duty cycles, a significant DC is present and needs to drive the gate. You cant AC couple it.

Logged

I can explain this to you. I can't comprehend it for you.
FTL
Junior Member
**
Offline Offline

Posts: 78

Thank You
-Given: 149
-Receive: 32


« Reply #6 on: August 20, 2020, 12:05:58 00:05 »

PicKit2: I question your use of C1.

I don't see how it will keep the gate at ground to keep the FET off, unless it has higher leakage current than the FET gate.

Having C1 in parallel with the gate will significantly slow the switching speed of the FET. The gate is effectively a capacitor. It must be charged and discharged quickly to turn the FET on and off quickly (spend the least amount of time possible in the FET's linear region). Adding capacitance to the gate will slow that down, since the current (that is limited by R1), will take longer to change the gate voltage.

Having R1 at 10K will make for somewhat slow switching. Assuming a 5V signal from the MCU, that would limit peak charge and discharge current to 0.5ma. Metal's updated schematic shows R4 at 100R, which might be a bit small allowing currents of 50ma, which is probably a bit too much for an MCU pin.

In Metal's updated schematic, it would make more sense to me to have R? connected directly to the gate since its purpose is to keep the gate at ground with a high-impedance MCU pin. It does not really matter though as it is much larger than R4 so the result is that the gate is grounded through either 10,000 ohms or 10,100 ohms (the difference is probably smaller than the tolerance on R4). D? is extra safety for the MCU pins, but in most cases the MCU pins already have zeners to ground and Vcc in their static protection circuits (you shouldn't really count on them, but some designs do so successfully).

Another design consideration I have not seen mentioned yet is: What is the PWM frequency? The important thing is to make sure the FET switching time is at least an order of magnitude less than the PWM period so it spends the majority of its time either on or off (low power dissipation states) vs in linear switch mode where the power distribution is high.
Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2294

Thank You
-Given: 736
-Receive: 592


Top Topic Starter


« Reply #7 on: August 20, 2020, 03:11:20 03:11 »

I would think the FET should have a protection diode on the die.
the FET is more voltage than current so you could go higher
the resister to ground is in the wrong place, I like a small cap gate to ground.
it keeps the fet off at start up. I have used this in the past from memory you just have
to make sure the gate voltage is held below max allowed for device.

You mean I should not exceed max Vgs?


Another design consideration I have not seen mentioned yet is: What is the PWM frequency? The important thing is to make sure the FET switching time is at least an order of magnitude less than the PWM period so it spends the majority of its time either on or off (low power dissipation states) vs in linear switch mode where the power distribution is high.

it is 25KHz, this suits both, fans that have PWM input and those without it. I have actually removed the MOSFET fan driver circuitfrom the schemtic, till I have this discussion complete, I have not thought it was more serious than it looked.

You are right, this is why I found many threads by people complaining about the heat dissipation, although there should not be any real heat dissipation.. this will make selecting the MOSFET a bit tedious. apparently the MOSFET I chose is a fail.
« Last Edit: August 20, 2020, 03:27:13 03:27 by metal » Logged
sadman
Hero Member
*****
Offline Offline

Posts: 507

Thank You
-Given: 1352
-Receive: 1720



« Reply #8 on: August 20, 2020, 06:29:27 06:29 »

Dear Metal

have look here PWM based DC motor controller

http://picprojects.org.uk/projects/ppc/index.htm
Logged
PM3295
Active Member
***
Offline Offline

Posts: 141

Thank You
-Given: 138
-Receive: 58


« Reply #9 on: August 20, 2020, 07:37:55 07:37 »

At 25 kHz, you definitely need some sort of gate drive circuit to switch the gate fast enough to keep losses low. Below is an example. I could not find a spice model for the FET you used, but this one is close enough in specifications.

The dissipation is only 106 mW with a 50% duty cycle, with the drive frequency at 25 kHz.
Logged
Xwing
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 443
-Receive: 1471



« Reply #10 on: August 20, 2020, 11:16:06 11:16 »

Hi metal, if you use a noctua fan, or similar with PWM input (four pin connector), you can directly apply the signal from the processor gpio as it does not have to supply current, it is only a control signal.
Logged
vern
V.I.P
Active Member
*****
Offline Offline

Posts: 120

Thank You
-Given: 7
-Receive: 34


« Reply #11 on: August 20, 2020, 01:08:45 13:08 »

PM3295,

Quote
At 25 kHz, you definitely need some sort of gate drive circuit to switch the gate fast enough to keep losses low. Below is an example. I could not find a spice model for the FET you used, but this one is close enough in specifications.

the Mosfet has an input capacitance of 240pF, I don't think you need a driver with a standard MCU output at 25kHz.
240pF at lets say 2 mA drive current yields a RC constant of about 0.4us, which is fast enough.

Optikon,
Quote
AC couple the drive? No that doesnt work. For high PWM duty cycles, a significant DC is present and needs to drive the gate. You cant AC couple it.
of course it works. That's why the diode is necessary, it keeps the level referenced to Ground. And since it's a Mosfet you only need to drive the gate capacity, which in this case is only 240pF. No more drive current after that.
With the 47k from gate to GND and the 100nF coupling capacitor you get a time constant of about 4.7ms, which is plenty compared to the cycle you need to gap at 25kHz which is 40us max.
Logged
PM3295
Active Member
***
Offline Offline

Posts: 141

Thank You
-Given: 138
-Receive: 58


« Reply #12 on: August 20, 2020, 04:07:07 16:07 »


the Mosfet has an input capacitance of 240pF


You can never work with the gate input capacitance value alone. The moment the device starts to turn on, other parameters like Coss and Crss come into play, which results in a much larger value of gate capacitance seen by the drive source. It is normal practice to look at the total gate charge Qg and determine what peak driving current will be needed to charge/discharge the gate in a certain time.

You can read more about this in the discussion in this link, so I don't have to type it here.
https://electronics.stackexchange.com/questions/83712/gate-capacitance-and-miller-capacitance-on-the-mosfet

"The Miller capacitance (reverse transfer capacitance) is usually the smallest but it can have a serious effect on performance".

« Last Edit: August 20, 2020, 04:26:08 16:26 by PM3295 » Logged
optikon
Cracking Team
Hero Member
****
Offline Offline

Posts: 771

Thank You
-Given: 892
-Receive: 1926


« Reply #13 on: August 20, 2020, 05:45:44 17:45 »


Optikon,of course it works. That's why the diode is necessary, it keeps the level referenced to Ground. And since it's a Mosfet you only need to drive the gate capacity, which in this case is only 240pF. No more drive current after that.
With the 47k from gate to GND and the 100nF coupling capacitor you get a time constant of about 4.7ms, which is plenty compared to the cycle you need to gap at 25kHz which is 40us max.


An AC coupled gate with a driver duty cycle of 100% (Which is *DC*) doesnt work. So NO.
Logged

I can explain this to you. I can't comprehend it for you.
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2294

Thank You
-Given: 736
-Receive: 592


Top Topic Starter


« Reply #14 on: August 21, 2020, 01:45:04 01:45 »

I worked yesterday on the PCB. I removed the PWM criver circuit for the moment, as I still don't know if the final design will have it or not, nevertheless I might want to add the PWM driver to support fans without PWM control input. may be experts have sth to say about DC/Short protect circuits.
Logged
vern
V.I.P
Active Member
*****
Offline Offline

Posts: 120

Thank You
-Given: 7
-Receive: 34


« Reply #15 on: August 21, 2020, 09:46:25 09:46 »

optikon,

Quote
An AC coupled gate with a driver duty cycle of 100% (Which is *DC*) doesnt work. So NO.

you are right of course, but PWM for Fans is never 100%, it may be 1% or 99% duty cycle, but never 0% or 100%


Posted on: August 21, 2020, 09:38:26 09:38 - Automerged

PM3295,

Quote
other parameters like Coss and Crss come into play
you are right, but those values are neglible compared to Ciss.
Even if they double the switch  on / off timing it would still be less than 1us, which is totally ok with such a small drain current.
Logged
~5
Newbie
*
Offline Offline

Posts: 7

Thank You
-Given: 14
-Receive: 0


« Reply #16 on: August 21, 2020, 02:40:27 14:40 »

PicKit2: I question your use of C1.

I may be wrong but I'm also not convinced that C1 is necessary.
Logged
PM3295
Active Member
***
Offline Offline

Posts: 141

Thank You
-Given: 138
-Receive: 58


« Reply #17 on: August 21, 2020, 03:40:42 15:40 »

you are right, but those values are neglible compared to Ciss.

It may be small, but its effect can cause the total gate input capacitance to appear up to 4 x larger than published Ciss during switching, depending on the application. The effect also increases with applied drain voltage.

I always put a small driver in when driving MOSFETS at higher frequencies, because you never know when you will need a bigger fan and/or a stronger MOSFET. The two bjt's are a few pennies and takes very little board space. It is a pain to hack the board later on.
« Last Edit: August 21, 2020, 03:54:02 15:54 by PM3295 » Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2294

Thank You
-Given: 736
-Receive: 592


Top Topic Starter


« Reply #18 on: August 21, 2020, 07:27:19 19:27 »

I believe I will go your way then, thank you all

I will start another thread for the PCB thing
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC