I need to create a simple PWM controller using a Raspberry Pi Pico 2 to control a Arctic S8038 - 10K fan.
This is my current setup:
1. The fan’s GND and VCC are connected to my lab power supply, set to 12V.
2. The fan’s PWM pin (pin 4) is connected to GPIO 2 on the Pico.
3. A 10k pull-up resistor is added between the fan’s PWM pin and the Pico’s GPIO 2.
4. The Pico is connected to my Mac via USB for programming.
The C Code:
https://pastebin.com/5NFTsGRE
When I compile and run the code, the serial monitor shows the message "Fan set to 25% speed". However, the fan runs at maximum speed.
Arctic documentation for PWM:
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)
Does anyone know what I might be doing wrong?
Fan spec:
https://www.arctic.de/en/S8038-10K/ACFAN00279A
https://support.arctic.de/s8038-10k