Description
I am developing a system that uses a thermal block and fan with several temperature sensors.
The core uses a PID to deal with the heat block and that works perfectly, I have a second PID that handles the fan speed however using the default frequency for the PWM the fan squeals because the PWM frequency is too low.
I tried to implement analogWriteFreq(12000) and this removes all the noise, heat block continues to work as expected but the ESP8266 crashes., sometimes just locking up and other times fires a watchdog error and attempts to reboot.
I made a simple sketch to test the fan on it own and removed the PID and have the same issues.
as soon as I use analogWriteFreq(12000) i get what appears to be random lockup's of the ESP.
I did read that you need to reduce the input range (0 - 256) normally done by analogWriteResolution(8);
however that does not seem to work with the ESP.
I have tried just sending 0254 using analogWrite but I do not get the full speed of the fan and it appears to still be wanting an input of 01024 in order to get to full speed but then this causes the system to crash.