Meanwell Dimming with ESP32

Home Assistant automation projects, questions, etc. go here.
HydroRay
LED-Curious
LED-Curious
Reactions:
Posts: 16
Joined: Tue Feb 22, 2022 5:58 pm

stud wrote:
Sat Jan 08, 2022 2:53 pm
i have modded many diff LEDs Drivers with PWM for me and friends , some driver pwm controlers are 5V some are 10V . an ESP + Mosfet on ESPHome does the trick , i do have to scale the min/max PWM config on ESPHome , since a ESP pwm output is 3.3v max , you can also use 3.3v-5V logic driver to solve that .
I'm dealing with something similar over here and was wondering how you scaled the min/max PWM config?

Also, right now I've got my dimming wires hooked up to a pca9685 which is hooked up to a huzzah32 feather. I have a "Quad Level-Shifter 3v-5v" https://www.adafruit.com/product/1787 that's not hooked up because I thought I didn't need it... should I try to connect it?

Here's my code in ESPHome, maybe there's something in there I need to fix

Code: Select all

pca9685:
  frequency: 1220Hz
  address: 0x40

output:
  - platform: pca9685
    id: "Microgreens_Dimmer"
    channel: 1
    
light:
  - platform: monochromatic
    output: "Microgreens_Dimmer"
    id: "Micro_Light"
    name: "Microgreens Dim"
    entity_category: ""
    icon: "mdi:lightbulb"
    default_transition_length: 7.0s
    gamma_correct: 1.0
Thanks!
stud
LED Lover
LED Lover
Reactions:
Posts: 143
Joined: Wed Jun 03, 2020 4:19 pm
Location: Canada

i always use logic Level-Shifters Between my ESPs and L298N to control the speed of my AC Infinity Blowers ,
Peristaltic Pumps ( i use the same ones like @LEDG model G928 ) and Dimming LED Lights .
my pumps:

in the future , im looking to upgrade to the Atlas Scientific Peristaltic Pumps .
Samsung123
LED-Curious
LED-Curious
Reactions:
Posts: 4
Joined: Sat Nov 13, 2021 8:11 am

This is what I did for meanwell driver. I connected to the dimmer attached to the light.

I couldn't believe how easy it was, I literally plugged the blue wire into D4 and the white wire into 0 and it worked. Couldn't believe it.

Image

Image

Image

Code: Select all

esphome:
  name: esp8266-led

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:


wifi:
  ssid: 123345
  password: 123355

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "123455"
    password: "1235"

captive_portal:

    
    
output:
  - platform: esp8266_pwm
    pin: D0
    frequency: 500 hz
    id: pwm_output
    inverted: false
    

light:
  - platform: monochromatic
    output: pwm_output
    gamma_correct: 1.0
    name: "400w LED"
Shimbob
LED Wizard
LED Wizard
Reactions:
Posts: 642
Joined: Mon Nov 27, 2017 11:29 pm

An esp8266 can only output up to 3.3V on its gpio output. Without any additional hardware to raise that pwm signal to 10V, you will only get about the lower third output capacity of the driver.
Samsung123
LED-Curious
LED-Curious
Reactions:
Posts: 4
Joined: Sat Nov 13, 2021 8:11 am

Shimbob wrote:
Wed Jun 15, 2022 3:54 am
An esp8266 can only output up to 3.3V on its gpio output. Without any additional hardware to raise that pwm signal to 10V, you will only get about the lower third output capacity of the driver.
Sorry should of mentioned this is for DALI drivers.
xthursdayx
LED-Curious
LED-Curious
Reactions:
Posts: 4
Joined: Fri Jun 24, 2022 7:17 am

Shimbob wrote:
Wed Jun 15, 2022 3:54 am
An esp8266 can only output up to 3.3V on its gpio output. Without any additional hardware to raise that pwm signal to 10V, you will only get about the lower third output capacity of the driver.
What additional hardware would be needed to raise the pwm signal to 10V in this situation? A level-shifter as was mentioned above?
Post Reply