## Project notes 2023-01-15 (POC: Fan PWM control circuit and code)
Finally, all POC parts have arrived, Christmas is behind us, and I got some time to continue with the project. I have been distracted by a small Christmas project. The Talking ESP32 Clock is described in detail as an Instructable. Please, have a look and support me in the contest by loving it.;-)
Initially, I was using the ESP8266 (mainly for cost savings). However, I have gravitated more to an ESP32 as the brain in the project due to its capabilities.
DC motors are more challenging to control with PWM than fading a LED. One objective is to have a wide range of control over the fan's speed. However, one quickly realizes it is a compromise. Due to the motor's inertia, a high PWM frequency results in a narrow band of control, as shown in the graph.
Already at 100 Hz, the motor does not respond well when changing the duty cycle. On the other end, i.e., at low frequency, the available control range is increased but at the expense of the fan speed stability. About 10 Hz in the setup PWM methods was a good compromise for this fan. To measure the rotational speed, I used the mobile app RPM Meter - Strobe Light on my Android phone.
It is preferable to use an n-channel MOSFET (logic level) over an NPN bipolar transistor since it draws less current and has no problems with dissipated power. However, I tried a BJT from Toshiba (TTC04B), and it works equally well, with the only exception of the mentioned slight drawbacks.
Find the Arduino PWM sketch for the POC on GitHub and the POC PWM schematics.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.