Go Down

Topic: pwm control for computer fans (Read 591 times) previous topic - next topic

4321

I found the following post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1215675974/all

I was a little unclear on the outcome.  Can the arduino output a 25khz PWM signal from 0 to 100% duty cycle?  One of the responses to the question in that link mentioned that the resolution would not be very good.

Here is the pwm spec again:

PWM Frequency: Target frequency 25 kHz, acceptable operational range 21 kHz to 28 kHz
Maximum voltage for logic low: VIL = 0.8 V
Absolute maximum current sourced: Imax = 5 mA (short circuit current)
Absolute maximum voltage level: VMax = 5.25 V (open circuit voltage)

RuggedCircuits

Yes, it can. You can use Timer 1 in Fast PWM mode and set its upper count limit (the ICR1 register) to 639 (16 MHz / (639+1) = 25 kHz). Then the duty cycle is controllable with a resolution of 1/640 = 0.16% increments. The output will be available on pin D9 or D10 (OCR1A or OCR1B).

--
The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected


Bobnova

You can do it on Attiny85's too, I have 25.5khz output on two pins (separate duty cycles too) at the moment.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy