Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Controlling DC FAN with PWM

Status
Not open for further replies.

drkidd22

Member
Hello,

I'm working on a small project at home and want to see if anyone can give me some ideas. I'm trying to build a circuit to control a 24VDC Brushless Fan with PWM signal from a PIC18F4520, the fan draws 1A of current at full speed.

I'm in the processes of designing the circuit and have done some testing. One of the things is that I'm not sure at what frequency I should have my PWM set for, I've seen most designs use something in the range of 22KHz to 30KHz, (what determines this, the fan?).

So my idea is to isolate the pic from the fan using an opto-isolator (4N32). I've done some work with optos in the past, but have forgotten much about it and the same goes with the MOSFET to drive the FAN.

Basically in the circuit below I'm having difficulty calculating (theoretically) what the output (Gate) to the MOSFET is going to be for a given CTR. I've always been confused with this and want to be able to get over with it. Next what voltage do I need to drive the gate of the mosfet, I know this depends on the drain current, but like on the opto-isolator I've forgotten how to do all the math. Some input or directions will be appreciated. I'm using R4 to simulate the fan, I don't have a protection diode because the Fan has internal protection already.

In reality I have a 4N32 Opto-isolator and the IRF511 to play with on my breadboard. V5 is used to simulate the PWM from the pic.
 

Attachments

  • PWM_FAN.PNG
    PWM_FAN.PNG
    13.7 KB · Views: 315
A lot of fans don't like high frequency pwm so I would start out pretty low and see if the noise bothers you. :D

I don't know what you mean by CTR? :confused:

The FET will be turned full on with 10 volts or so on the gate, but 24 is to much - the gate to source maximum is 20 volts for your fet. So You can add another 1K resistor between the collector of the opto and the +24 then you should be ok.
 
Could you not just use a high power NPN transistor?, I've currently got 4x 12v fans PWM controlled on my PC using a TIP102 driven from a 16F872 and it needed nothing more than a small clip-on heatsink to keep the temperature under control.
 
I don't know what you mean by CTR?
= Current Transfer Ratio = current available through output device divided by input current through opto-diode.
 
The motor is probably inductive so you will want a diode across the motor, pointing up, so no current flows through the diode. The diode will help protect the FET.
 
=
Current Transfer Ratio = current available through output device divided by input current through opto-diode.

Ahh, the opto..

Most are optimized and speced at 10 ma diode current. Yours is a little higher, but good. The 4N35 is a darlington so it has high transfer gain - 500% (5X) the diode current.
https://www.electro-tech-online.com/custompdfs/2013/03/4n32.pdf
So in your case with a diode current of about 15 ma. if you look at Fig 1 in the data-sheet the output will be saturated up to about 45ma of collector current - 15 ma diode I X 5(CTR) X .6 normalized for 15 ma. diode current. So you are ok with the values shown or you could drop the diode current a little so the micro doesn't have to work so hard.

PS. The 4N25 in your model is not a darlington so it may have a CTR as low as 25% so might look funny in your simulation.
 
If your particular fan proves to not like high frequency PWM you could try this method of synchronous speed control :-
https://www.electro-tech-online.com...-and-or-replacement-for-sl100-transistor.551/
It's not guaranteed to work with all BLDC motors but has been tested with a couple of PC box fan motors and also with a 24V 30W water pump. You can use your PWM signal from the micro (the frequency is not critical) to supply the input control voltage for this controller.
 
Thanks guys, a lot of good info. I got some time today to play with it a little more. Will post my results here later.
 
So I got to do some more testing. Below are my Images and current circuit setup. The issue now is that my PWM input doesn't translate equaly to my output, my input is ch1 with probe at pin1 and output at MOS1OUT ch2. I want to keep the voltage output at MOS1OUT at about 7-8V for the gate of the IRF511, which should be goog enough to drive the Fan at 1A. I don't have a 24V supply available yet, so I'm using a 15V supply for the moment and testing. Is there something I'm missing here?
 

Attachments

  • 4N32_PWM.PNG
    4N32_PWM.PNG
    8.5 KB · Views: 255
  • 20130303_535850.png
    20130303_535850.png
    23.8 KB · Views: 211
I'm not sure I know where ground is for the traces and what the volts per division are, but I think you may be running it to fast for the opto. The turn of time can be 100 usec. or so.
 
Im doing 25khz. The input ground traces are from the 3V regulator and the output trace from the 15V power supply, so the grounds are not from same source. I alsi noticed that if I lower my frequency to about 60Hz then the input pwm and output are much more identical.
 
Yes 25KHz is to fast for the opto, but it should work pretty good at 2500Hz.
 
ok so, I got it working now @ 1.35Khz. I used a 100K resistor to ground the base, which helps make the output waveform almost identical to the input. The only thing now is that the MOSFET (IRF530) is getting pretty hot. Specially at lower duty cycles. What's causing this? How can I calculate the power going through the MOSFET? Will lowering the frequency make it run cooler?
 
You should be able to calculate the power as P=I^2R. The resistance of the FET (If it is on all the way) is 0.16 ohms X 1 = 0.16 watts. Without a heat sink the temperature rise is 62C/watt or about 10C.
It could be your FET is not turning on fully or off fully. You can measure the gate voltage to see what it is in the on and off state.
 
the fan draws 1A of current at full speed.
But at lower speeds the back-emf will be reduced so the instantaneous current will be greater.
The only thing now is that the MOSFET (IRF530) is getting pretty hot. Specially at lower duty cycles. What's causing this?
The higher instantaneous current, probably. If it averaged, say, 3A then the FET would be dissipating on average 3*3*0.16 = 1.44W (the Rdson for the IRF530 is specified as 0.16Ω). Or the FET could be oscillating due to stray inductance of the gate/source connecting wire.
Will lowering the frequency make it run cooler?
Not necessarily (depending on the cause of the heating).
 
I think I figured it out. I had the Vgs @ about 4V, I've then increased it to 12V and it runs much better (cooler) now, can't even feel it warm, I guess increasing the Vgs lowered the Rds(ON). Also when operating at 1350Hz the transfer of duty cycle related to the fan speed or the fan's current draw doesn't translate pretty good at this frequency. For example when I was at 30% duty cycle with the PWM frequency at 1350Hz the fan was already at 100% speed and drawing 1A. I then lowered the frequency to 60Hz and the PWM duty cycle to fan speed/current draw translates much better, @ 12Vgs 60Hz PWM and 50% duty cycle the fan is drawing about 450mA which is pretty close. Any thoughs on that?
 
Last edited:
Good. ;)

yes it will be harder on with 12 volts.
I think the difference may still be the turn off time of the opto. At 1350 Hz the time period is about 750 usec so at 50% 325. But the opto can take 100usec to turn off.
Maybe a look at the output of the FET?
 
Last edited:
I've done some more testing and I think the reason why the difference i see with the frequencies is more related to the fan rather than the fall time of the opto because even at 750us period at 1350hz and 325us at 50% there is enought time for opto to fully turn off. I guess the fan is easier to control at lower frequencies. My next test I will do by bypassing the ooptocoupler and driving fet gate right from microcontroller to verify.
 
Don't forget you may need a logic level FET or a little transistor driver to run directly from the 5 volt micro.
 
So I got the below circuit to try to bypass the opto-coupler, but I'm not getting the right output (or what I expected) to the gate of the IRF530, which I need 8-10V. The micro-controller output is 3V at 50Hz to the gate of the 2N7002 and my 24V supply on the drain side I want to bring down to 8-10V. Any Ideas?
 

Attachments

  • PWM_IRF530_GateVoltage.PNG
    PWM_IRF530_GateVoltage.PNG
    42.2 KB · Views: 198
Status
Not open for further replies.

Latest threads

Back
Top