I am trying to dim a 24v led-strip with a 3.3v PWM-signal coming out of a ESP32. Currently I have this circuit:
But there is one problem. It works for dimming till ~40%. But when I turn the PWM off, the LED-strip keeps on at the ~40% brightness. When removing the connection between U1 and Q1 the LED-strip stays on also (~40%).
U1 was necessary because otherwise the PWM signal at 1.0 duty-cycle wasn't enough to fully turn the LED-strip on. It barely turned on actually. (LED strip activates at around 18v)
I'm not the best engineer when it comes to circuits, so excuse me if I am making a dumb mistake.
I would like to hear your thoughts and suggestions.