Maker Pro
Maker Pro

How could I convert/boost PWM frequency? 500Hz to 25kHz?

SnipeYa

Jul 4, 2017
5
Joined
Jul 4, 2017
Messages
5
Hey, First time poster, Likely to be a bunch more as I'm trying to learn more electronics. (I only have a very basic analog understanding thus far)

Anyway, I'm aiming to control multiple (6-10) 12v 4pin PWM computer fans with a micro-controller for a project I'm working on. (Currently using an Arduino but eventually moving to a Raspberry Pi so I can integrate a web server into the mix)

The first snag I've encountered is that the standard frequency an Arduino is only around 500Hz (I believe) where as the fans optimal PWM frequency is 25kHz (tolerance for between 21-28kHz).

The first work around I've tried is boosting the frequency of the Arduino's PWM signal timer, But unfortunately this comes with some draw backs that I don't think I can accommodate.

So then I thought why not make a circuit that will take PWM from the Arduino and based on that output the 25kHz PWM to the fans.

My thought was to modify this circuit that uses a 555 timer IC and Potentiometer:
PWM-circuit.png

And replace the potentiometer with some kind of PWM controlled voltage divider instead?



I'm kind of a little bit stuck and as I am only new I don't fully know of/understand all the "tools" there are to work with.

Is there a better way to do this? Were should I be looking?

Thank you for any and all help!
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Before you make things more complicated... Ditch the fact that you are working with an 'Arduino' ... because that is a 'product' and not actually the part you are working with.

Take a look here : https://www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM
Thankfully, this documentation addresses the ATmega being used in the construction of this product.

Take a look on the Arduino you have, and make note of the part number of the chip, and do a quick google search to find out how to change the PWM clock. You should easily be able to meet / exceed the timing values you require without the need to mess around with add-on boards and devices.
Ideally, you need to use 'hardware pwm' which is only present on select pins. The documentation should tell you how many (if any) hardware pwm pins/clocks are present.

If in doubt, as more questions!
 

SnipeYa

Jul 4, 2017
5
Joined
Jul 4, 2017
Messages
5
Before you make things more complicated... Ditch the fact that you are working with an 'Arduino' ... because that is a 'product' and not actually the part you are working with.

Take a look here : https://www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM
Thankfully, this documentation addresses the ATmega being used in the construction of this product.

Take a look on the Arduino you have, and make note of the part number of the chip, and do a quick google search to find out how to change the PWM clock. You should easily be able to meet / exceed the timing values you require without the need to mess around with add-on boards and devices.

The first work around I've tried is boosting the frequency of the Arduino's PWM signal timer, But unfortunately this comes with some draw backs that I don't think I can accommodate.

Adjusting the speed of those pwm pins adjusts the speed of a few other things that I need so thats no good, And ultimately I'll wanted to control the whole thing via a raspberry pi web sever so I'd like it to be a separate circuit generating the 25kHz output signal from some sort of input.
 

kellys_eye

Jun 25, 2010
6,470
Joined
Jun 25, 2010
Messages
6,470
Where do you get the notion that the fans optimal PWM is 25kHz?

You can control a standard DC fans speed at 50/60Hz (recall many domestic instances of such). A fan has a large moment of inertia and can be speed controlled at 50/60/100Hz with ease - something a software program could deal with as a matter of course.
 

Alec_t

Jul 7, 2015
3,581
Joined
Jul 7, 2015
Messages
3,581
Can you post a link to the fan datasheet?
 

SnipeYa

Jul 4, 2017
5
Joined
Jul 4, 2017
Messages
5
Where do you get the notion that the fans optimal PWM is 25kHz?

You can control a standard DC fans speed at 50/60Hz (recall many domestic instances of such). A fan has a large moment of inertia and can be speed controlled at 50/60/100Hz with ease - something a software program could deal with as a matter of course.
Can you post a link to the fan datasheet?

Fan: http://noctua.at/en/nf-a14-industrialppc-3000-pwm/specification
4pin Fan standards: http://www.formfactors.org/developer/specs/4_wire_pwm_spec.pdf
 

kellys_eye

Jun 25, 2010
6,470
Joined
Jun 25, 2010
Messages
6,470
That's what I call a 'make work'.....:D

Not only would such fans be more expensive than conventional non-integrated devices, they are, as you have discovered, more complicated to control.

A simple 2-wire fan will accomplish (I presume) what you want to do (cheaper) unless feedback of the actual RPM is an absolute requirement ???

If you're not using the '4th' pin to monitor speed then there's no real reason to use the PWM type fan in the first place.
 

SnipeYa

Jul 4, 2017
5
Joined
Jul 4, 2017
Messages
5
That's what I call a 'make work'.....:D

Not only would such fans be more expensive than conventional non-integrated devices, they are, as you have discovered, more complicated to control.

A simple 2-wire fan will accomplish (I presume) what you want to do (cheaper) unless feedback of the actual RPM is an absolute requirement ???

If you're not using the '4th' pin to monitor speed then there's no real reason to use the PWM type fan in the first place.

That's just it, I am monitoring the RPM. I already have that figured out and have working code. Unfortunately cranking up the PWM speed of the Arduino to control the fan speed also removes the ability to do the RPM calculations.

Surely there is some way to modify that circuit that uses the 555 timer ic and potentiometer, It does exactly what I want except requires manual input via the potentiometer rather than electrical input like I require. Heck I could use a servo to move the potentiometer? hahah
 
Top