Beginner question w/ LED (WS2811)

hello
I have been playing around with ESPhome, but I cant get it to work probaby. I am first thinking my calculation for the power needed is wrong.
the LED are the 5v version with 50 LED with a usage of 0.3w for each pixel (i am guessing it is for each led?)

50leds X 0.3w =15w
15w/5v =3a

Maybe I am wrong here ? but I am using am 3A wall adapter PSU can I can power the esp2811, can it seems to be connected to hass.io, since it status it connected and in the ESPhome log also say it is connected.

the code I am using is this:

esphome:
  name: lightchain
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: "xxx"
  password: "xxx"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: ""

ota:
  password: ""

light:
  - platform: fastled_clockless
    chipset: WS2811
    pin: GPIO4
    num_leds: 50
    rgb_order: BRG
    name: "WS2811 Light"
    effects:
      - addressable_fireworks:
          name: Fireworks Effect With Custom Values
          update_interval: 32ms
          spark_probability: 10%
          use_random_color: false
          fade_out_rate: 120

I am not good at coding, so I am just reading forums and the ESPhome guide and copy pasting as simple as it gets for me to build a better understanding. But I hope someone can help me locate my error. thanks.

edit:
the board is a nodemcuv3 but I cant seem to add it without the code getting an error while compiling. it is this chip I am using:

Last time I checked ESPhome didn’t have the option to use v3 as a board type, but it should work with v2. My NodeMCU’s are all v3 but I have v2 in the ESPhome code, works fine.

Thanks, I it good to know that I did not buy too cheap for a chip that were unusable. I am a bit worried that the led chain it broken, but I hope it is my bad workmanship that is the cause of no light.

Two more questions on your setup:

  • Your configuration says that you connected the LED strip to GPIO4. Are you absolutely sure that is correct? GPIO4 = D2 vs. D4 = GPIO2.
  • Have you connected the LED strip directly to the wall plug, or to the 5V of the ESP? The LED strip must be connected to the power supply directly.

hello

Edit: well I seem to have found the error. The problem seem to be cable or psu related, i guess. after a fresh install it worked fine for some minutes. so I turned it off and the lights dont work probaby but flickers a bit if a rock the cables a little. So I might have to but a better PSU. But thanks for the help and sorry for my stupid mistake. either that or the led strip is faulty, is there a simple way to check if a led strip is faulty ?

If would like to ask. If I like on the pin layout. the different datapin have extra functions. Is there a good webpage that explain the functions? I just used D2 for no other reason that I didnt think that the different datapins would make a difference.

I will of course use google but maybe some one know a specific good information homepage?
(I have been using this so far: https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/)

Also could you recommend a small PSU so i can power the ESP2866 and the led strip? I have a difficult time finding something that support usb and wire.
the eaiest solution for me would be to use an old laptop psu and a wire adapter for the led strip but is there a more all in all solution psu? so I dont need two psu running ? (one wall psu for the chip and the laptop psu for the led strip)

thanks again for all the help, and sorry for the trouble

That is the most comprehensive one I’ve found, too.

Since you were saying that you had a beginner’s question, I just wanted to make sure you are aware that on ESP8266 the label on the chip is not the GPIO number, i.e. D2 is not GPIO2. But apparently you were aware already.

I don’t have a particular recommendation, but I usually use a generic power supply (like a laptop style one) that matches the specific needs. You don’t need to power the NodeMCU via its USB port - if the power supply has 5V output you can usually connect that directly to the NodeMCU pins (PSU 5V+ to VIN and PSU 5V- to GND).

That is unlikely to work anyway with the WS2811 LED strips and an ESP because they need to share the GND connection to work.

When I use 12V LED strips I usually use a 12V DC power supply and then connect a buck converter (like this one for example) to get 5V for the ESP.

1 Like

Thanks for your reply. I am very grateful for your help. I was so tired and on the edge of going mad like in a lovecraftian story. Especially after trying to make Bruh automation LED setup work in MQTT just to find out after two days that the code is outdated and I gave up after trying to update the code after a extra day of failing. I even had a hard time writing properly yesterday I can see in my former post. Thanks for understanding my jibberish.

Thanks for the tip on that I can power the ESP2866 on the pins, I tried to google yesterday if there was an alternative power input beside the usb. It can be a bit tricky to find the correct information in my experience.

I found this 5v 3a pcu that I think I will try. then I can just use a wire splitter to give both the esp and led power from the psu. It seems small enough to be hidden in a junction box. But thanks for the suggestion of a laptop psu, I like the “lego” proces of just cutting and soldering less and just “click and play”. But still thanks for taking your time and writing all the helpful information and suggestions

Update: since I got a lot of help, I would like to post the result. Even if it is just a novice project.

1 Like