LED Brightness
Grab an optocoupler like a PC817 with an appropriate resistor, and an ESP32. Set up the ESP32 through ESPHome for PWM control and hook the PWM output and ground of the ESP32 into the optocoupler input side, then hook up the output of the optocoupler to the 2 dimmer leads on the mean well type B driver.
Want to Support the Site?
Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
Looks like the forward voltage of the IR LED in the PC817 is 1.2V and we want around 5mA flowing through it so 3.3V from the ESP minus 1.2V = 2.1V/.005mA = a resistor around 420 ohms. 470 ohm is a pretty common resistor so that’d work fine.
Want to Support the Site?
Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
-
- LED-Curious
- Reactions:
- Posts: 18
- Joined: Wed Sep 02, 2020 3:48 am
I've been using the ShellyRGBW2 to control a 4ch all meanwell elg-240. They Dim to off so, you can you the brightness to shutoff the lights without a relay. Also, the signal is inverted so 0=100% and 100%=off.