LED Brightness

Home Assistant automation projects, questions, etc. go here.
Post Reply
User avatar
greenzwiz
LED-Curious
LED-Curious
Reactions:
Posts: 4
Joined: Mon Jul 20, 2020 12:57 am

How do I go about controlling a meanwell driver LED brightness in homeassistant?
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

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!
User avatar
greenzwiz
LED-Curious
LED-Curious
Reactions:
Posts: 4
Joined: Mon Jul 20, 2020 12:57 am

Thanks for the response. Do you have a schematic for the wiring? Also what size resistor would you recommend? Thanks!
rdrake
LED-Curious
LED-Curious
Reactions:
Posts: 2
Joined: Wed Jan 01, 2020 9:44 pm

greenzwiz wrote:
Wed Jul 22, 2020 7:58 pm
Thanks for the response. Do you have a schematic for the wiring? Also what size resistor would you recommend? Thanks!
I used a TLP185 and a 1k resistor.
Attachments
Screen Shot 2020-07-24 at 5.44.54 PM.png
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

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!
warmachine
LED-Curious
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.
Post Reply