Pages: [1]   Go Down
Author Topic: pwm control for computer fans  (Read 550 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great.  Thanks
Logged

Humboldt, CA
Offline Offline
Full Member
***
Karma: 2
Posts: 223
Arduino BBB
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: