I struggling with how analogWriteResolution fits into the PWM equation. Looking at the docs I see this:
NOTE: The resolution also affects maximum frequency that can be used with analogWrite(). The maximum frequency allowed with current resolution can be checked by calling analogWriteMaxFrequency().
I’ll be using a PID library to drive the fan based on temp so higher resolution would be helpful but not sure what I should be aiming for. The PWM signal needs to be 25kHz which seems to be an out of the box capability since 6.0. So given I need a 25kHz PWM signal what resolution should I be using? I could also use some advice on a simple on/off circuit so the fan can be completely turned off as the fan will run at 30% as long as it has power. I found this but it seems like overkill since I only need on/off
Details on the project:
This for an enclosure for my 3D printer that will have NeoPixels, temp sensors, VOC/smoke sensors, couple of relays and a 12V 4-Pin PWM Fan. The signal to the fan needs to be 25kHz as per the Intel PWM fan specs (Intel 4-Pin PWM Spec). I have selected a 140mm Noctua fan as they are the quietest I could locate (Fan Datasheet). I have a power supply/regulator that provides 3.3v, 5v, 12v and a fourth adjustable regulator (Multi-Output Power Supply/Reg).