I want to drive a MOSFET (IRFZ44N) with an optocoupler (PC817) to control the brightness of an 50 W 12 V LED. The PWM is generated by an ESP8266, 1 kHz.
Following schematic is used:
In general it works, but PWM set to 10% does not result in 10% brightness of the LED. I expect it be much darker.
I have a circuit to compare with, where the brightness of the LED is as expected with 10% PWM:
Why does the circuit with the optocoupler does not get as dark (fast switching?) like the one with the two transistors?
When I understood the datasheet of the PC817 correct, it should be able to handle up to 80 kHz?
Thanks in advance!
Edit: In the first schematic (a later version of my project) I added the two capacitors at the output to get rid of the switching 1 kHz noises. The Schottky diode is there because I expect the user to use a relays as well, but then without the ability to adjust brightness by PWM.
PIC817
, is the part actually aPC817
? \$\endgroup\$