I'm trying to figure out what is going on with with a new fan. I have a Noctua NF-A20 PWM (200 mm fan) that is only partially responding to the PWM signal when I set the PWM to 0, but I also have four Noctua NF-A4x20 PWMs (40 mm x 20 mm fan) that responds properly to the same signal. I can even put a NF-A4x20 PWM and NF-A20 PWM on a y-splitter cable, and the NF-A4x20 PWM will stop while the NF-A20 PWM only slows down when the PWM signal is set to 0 (I checked the RPM for the NF-A20 PWM, and it drops from ~1300 to ~500). I can hook the two fans up to my computer motherboard with the Y splitter, and both fans will stop when I set the fan RPM there to 0, so I know that the NF-A20 PWM is able to respond to that signal. I can also physically stop the fan, and after a second, it starts spinning again. I don't know if I need to add anything extra to my code or to the wiring for this fan to control it, but I am stumped about why my four other fans will all stop with this code but the NF-A20 PWM won't.
I am using an Arduino Micro for this project and I have set the timers to 25 kHz for the fan. This is for a battery operated ventilation system. If it helps any, here is the Noctua PWM specifications white paper. Any idea what is going on?
This is my code for the timers (the problem fan is on pin 5, which I believe is COM3C1 in this code for the timer and OCR3C ISR):
void setFanTimers(){
// Configure Timer1 (for Pins 9 and 10) to 25 kHz PWM
TCCR1A = (1 << COM1A1) | (1 << COM1B1) | (1 << WGM11);
TCCR1B = (1 << WGM13) | (1 << WGM12) | (1 << CS10);
ICR1 = 640; // Set TOP for 25 kHz frequency
// Configure Timer3 (for Pins 5, 11, and 12) to 25 kHz PWM
TCCR3A = (1 << COM3A1) | (1 << COM3B1) | (1 << COM3C1) | (1 << WGM31);
TCCR3B = (1 << WGM33) | (1 << WGM32) | (1 << CS30);
ICR3 = 640; // Set TOP for 25 kHz frequency
}
As an example of the code to make the fans stop (it's fan 5 that I am having problems with):
void startFan(){
analogWrite(fanPWMsignalPin1, 0);
analogWrite(fanPWMsignalPin2, 0);
analogWrite(fanPWMsignalPin3, 0);
analogWrite(fanPWMsignalPin4, 0);
analogWrite(fanPWMsignalPin5, 0);
delay(1000);
}
And I do set the pins to output:
// Fan PWM signal pins
pinMode(fanPWMsignalPin1, OUTPUT);
pinMode(fanPWMsignalPin2, OUTPUT);
pinMode(fanPWMsignalPin3, OUTPUT);
pinMode(fanPWMsignalPin4, OUTPUT);
pinMode(fanPWMsignalPin5, OUTPUT);