Unplugging an plugging esp32 with pwm fans on , esp32 does not start (led blinking)

Dear friends, I have assembled two Noctua NF-A8 PWM fans and apparently everything works as expected. I can turn the fans on and off and change the speed all with an ESP32 without a TTL converter board.
I have connected them directly, 12V power supply for the fans and the 2 control signals directly from the fans to the ESP32. I use 2 different power supplies, 5v for the esp32 and 12v for the fans. I have joined the gnd of both feeders together with that of the esp32 so that everything works ( It works more or less well, from 0% to 9% the fans are stopped and from 10% to 100% the speed varied perfectly, I don’t understand this error range from 1% to 100% but it more or less meets my expectations )

I have found a bug. While the fans are spinning, if I disconnect the power from the esp32 and reconnect it, the esp32 protects itself and does not start, the esp32 feeder making noise. I have to turn off the power to the fans, wait for the esp32 to start and then plug in the power to the esp32 and everything works fine again. Another option to solve the problem is to disconnect the Output pwm pin of the esp32, then the esp32 boots correctly. It seems that some noise is sneaking through the output control pin.

It’s not a big problem but it makes it impossible for me to use a single 12v power supply for the fans with a 12v to 5v converter to power the esp32. Has anyone had this problem and how to solve it?
I would greatly appreciate the help. I have tried with some filtering capacitors connected from the output pwm to gnd pin but the operation of the fans varies although the esp32 starts correctly depending of the capacity of capacitors. Thanks everyone for your help. Kind regards

Which pins are you using for the PWM control?

Some pins prevent booting if they are in a particular state. See the table lower down on this page: ESP32 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorials

I had to look these fans up, im not familiar with them. I see a 12v version that uses 5v PWM and i see a 5v fan that specifically sais it cant be used with 12v. Is there another version that uses 3.3v pwm? Using 3.3v pwm for a device that calls for 5v is most likely the reason the fan doesnt turn on under 9%.

Using 3.3v is like using 3.3v on a transistor with a 5v gate. You can use that transistor and make it conduct but, it wont fully open or conduct its full potential. This is exactly what youve got going on here. You can only partially control the fans.

Dear friend, thanks for your answer, i use the pin 12 (output pwm) and the 11.

Thanks for your answer. I have buy a level shifter. I will test with the level shifter and i will write heare the results.

Dear friend, the pin 12 fails boot when the state is up. I change the pin to 14 and now boots correctly always. Thanks , best regards

1 Like

Dear friend, after connect and test the level shiftter the pwm works same, the pwm between 1% an 9% doesn’t work.

You can try lowering the frequency but, what your experiencing isnt unusual. Every light or device i have that uses pwm is like that too. Nothing starts turning on untill 8 or 9% as well. Do you think you will ever need to operate the fan as low as 3%? Even st 9% does that slow of speed even cool anything or does it need to run faster? My point is do you even need 1% - 8%?