Can a 12-LED WS2812B ring fry an ESP32 board? Node doesn't connect anymore to WiFi and USB

Hey, morning everyone,

after setting up a 12-LED WS2812B ring with my DOIT Devkit V1 board, it worked perfectly fine for 15-20 minutes (including HA integration, changing colours and brightness, switching it on and off etc from the UI). When I then wanted to add an effect to the YAML, the esphome commandline wasn’t able to connect to the board via USB anymore after compiling. The board also showed up as unavailable in HA and my router showed it as offline (no IP assigned), and therefore I also cannot connect to it via WiFi (anymore).

I found a lot of examples on the web where in small projects the power for the LEDs comes directly from the ESPs, and additional power source was mostly used for big project with multiple meters of LED strips, but I’m now still wondering if my setup fried the ESP board.

My wiring looks like this:
Power for the ring comes from the VIN pin, this one is connected to the 5V line of the USB connector with a SS12 diode inbetween. I use this setup for another project where the dedicated 3.3V are not enough, with a 433mhz sender and receiver, there it works like a charm (but obviously with way less current draw).
Ground is the pin right next to it, and for Data I use pin 25.

The YAML looks like this. The working version was exactly this, without the last 5 lines for the effect. But as mentioned: I wasn’t even able to flash the last version because the connection to the device doesn’t work anymore.

  name: terrarium
  board: esp32doit-devkit-v1
    type: arduino
# Enable logging
# Enable Home Assistant API
  password: ""
  password: ""
  ssid: "XXXXXXXX"
  password: "XXXXXXXX"
  # Enable fallback hotspot (captive portal) in case wifi connection fails
    ssid: "Terrarium Fallback Hotspot"
    password: "XXXXXXXX"
  - platform: neopixelbus
    type: GRB
    variant: WS2812X
    pin: 25
    num_leds: 12
    name: "LED ring 1"
    id: led_ring_1
      - addressable_twinkle:
          name: "Twinkle"
          twinkle_probability: 5%
          progress_interval: 4ms

The USB2Serial bridge still does pop up in the windows device manager of my laptop when I connect the board, but I wasn’t able to get any log output from COM4. I only tried the Arduino serial monitor for that though. I manage all my ESP nodes via the esphome commandline on a windows laptop, no usage of the esphome dashboard within HA.

Oh, I just realised one additional difference to my usual ESP setup: with my previous projects, I flashed the first YAML to the ESP board, and after booting/WiFiconnecting, HA showed a notificication that a new device was discovered. With this project I didn’t get a notification, so I manually added a new esphome integration and gave terrarium.local as the host address, then it worked like always. So there was at least a small difference to how I did it so far. All my boards are the DOIT devkit V1 boards from the same supplier.

Taking the 50mA per LED, the ring would sum up to 600mA max consumption, so I don’t see how that would kill the whole ESP board, especially as the VIN pin is more or less directly connected to the USB 5V line.

About the setup “in the room”: the board and the ring sat on the table the whole time without me touching them or changing anything to the wiring. The only connection was the USB cable to the laptop, and that worked fine for the whole testing time.

I’m really a bit lost here, and it could very well be a faulty board, but I would like to rule out anything else before I fry the next one :wink:

Thanks a lot in advance, Cheers!

= smoke.
Without a schematic, we are just guessing, but probably.
I wouldn’t try to power more than 5 LEDs from the Vin pin of any processor board.

Which ESP32 board are you using? I rarely need an ESP32, but I don’t recall that any of them have a Vin pin.


Your circuit descriptions mean nothing to an engineer. Schematics are what we speak. (And please, no Fritzing crap. A hand drawn schematic is better than any Fritzing picture).

Thanks for getting back to this @stevemann, let me add some details.

So this is the setup overall:

I’m using VIN, GND and GPIO25, in line with this pinout:

The internal schematic should be this one (at least for the power supply part, some of the peripherals are off), I marked the VIN pin and the diode it’s going through from the USB port:

The LED on the ESP lights up, when I connect it, windows10 sets up the usb2com port, but nothing else is happening. Using esphome logs doesn’t give any output. So I guess the serial bridge is still being powered, but either the powersource for the ESP chip or the ESP chip itself doesn’t work anymore.

Here is an example schematic of my other ESP which does all my 433mhz devices, this one works like a charm for weeks now, but the current drawn from by the sender and receiver moduls is obviously way smaller there:

Assuming I did fry (or “half-fry”, as the LED still lights up) the board by overloading the VIN pin, my plan B would then be to get a micro usb splitter cable, attach it to the power source (1,5 amps, 5V), and power the ESP board from one USB connector and hook up the 5V of the ring to the other USB connector. Do I miss any pitfalls with that approach?

Thanks for your help here, highly appreciated! :slight_smile:

You won’t fry the ESP from sourcing the LED’s the way you do. You are sourcing the LED ring directly from the USB supply which also power the ESP through the LDO (U3). 1.5A should be OK for this application but even in a case where it wouldn’t be enough and the voltage dip - the worst thing that should happen is that the ESP resets.
Your pictures suggest that the ESP board has an LED. That’s not shown in the schematic so could there be other difference that would be of importance?
If the LED on the board is powered from U3 there is a high likelihood that the LDO is OK (though I would check with a scope or multimeter. Also - if you can measure the current going to the board (without the LED ring) it might tell you something as well. If it’s 0 mA and you know that 3.3V is present there is a high likely hood that your ESP is dead. If the current immediately settles at a fixed level and doesn’t change when you press Reset I also would expect that the ESP has died.
If current fluctuate and change when you press Reset there would be some sign of life and I would check R3/R4 and the signals TX/RX to see if they are OK.

Thanks for hints, will get the multimeter to work later :slight_smile:

About the 0mA to look for: plugging in the board still lights the LED, so there would always we SOME current flowing. Sorry for the probably a bit of a beginner question: how would I check TX/RX? I don’t have an oscilloscope, so all I can do is use the multimeter.

Yes the LED would draw some current. Is there a resistor in series with the LED and connected to GND? That could help you estimating how much current the LED would consume.
Without a scope all you could do is to check voltage on each side of the resistor or measure the resistance and compare to the schematic.

Won’t work. It’s not an LED it is a WS2812 LED String. The series resistor is only for impedance matching, and not required.

If you can still flash the ESP, then it isn’t “fried”.

This is what your attached schematic shows- as I said, I only have one ESP32 NodeMCU and I don’t recall it having a Vin pin. The ESP32 is overkill for this project. I use the Wemos D1 Mini ($5 each on Amazon).

Have you tried powering the LED ring separately?

Go to the Dollar Store and buy a USB cable. Cut off the micro USB end, strip the cable jacket, then cut the white and green wires- you don’t need them. Now solder the red and black wires to the LED ring. Use this to power the ring independent of the processor board.


At the moment in none of my tests the WS2812 is connected, this was about the red led on the board itself. It lights up when I connect the board, so the power regulator isn’t broken.

That’s the whole point: I can not. I compile the code, and when I then choose the option to flash via USB2serial, it does 2 tries and then gives up.

←[32mINFO Successfully compiled program.←[0m
Found multiple options, please choose one:
  [1] COM4 (Silicon Labs CP210x USB to UART Bridge (COM4))
  [2] Over The Air (terrarium.local)
(number): 1 v3.2
Serial port COM4

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit:
←[32mINFO Upload with baud rate 460800 failed. Trying again with baud rate 115200.←[0m v3.2
Serial port COM4

A fatal error occurred: Failed to connect to ESP32: No serial data received.

So the power regulator still works, the usb2serial still works, but it sounds as if the esp itself (sitting behind the usb2serial) doesn’t answer anymore.

And when you flash - you do press one of the buttons while reseting the board? ( I always has to google this as I don’t remember the which button to press and hold while reseting)

I did try that, although with my 3 previous boards (same source, same model) I never had to do that. But even when trying it with this one it didn’t help.

One thing I was now wondering: the GPIO of the ESP are 3.3v, the “data in” of the WS2812B ring is “officially” 5V. I mean, during the 20 minutes where it worked it didn’t seem to matter, but I’m now thinking: can it happen that the LED ring drew too much current from a GPIO pin that is only providing data?

Oh, okay, while I was writing this I googled a bit, and I think I found something, in the documentation of the WS2821B chipset:

If I read that correct, then the voltage used to control the chipset via DIN can only be max 0,5v higher or lower than the voltage used to power the LEDs. With my setup I have the 3.3v from the ESP GPIO vs. the 5V (or 4,7ish after the diode) of the ESP VIN, which makes at least 1.4v difference. Ouch. Which would then explain why the power regulator and the usb2serial are still alive, and the esp behind them not.

I guess next step is a level shifter then. Never used one of those, but well, seems to be for cases like these…

No. the data line is high impedance and draws a maximum of 1uA.

No. You are reading the spec wrong.
The spec you are looking at is the absolute maximums. (Do not exceed voltages).
What you want are the electrical characteristics.

2812 specs

The input voltage level is 0.7Vdd for a high and 0.3Vdd for a low.
This says that a data high (Vih) is assured at a minimum of 3.5V (0.7 x 5) and that a data low (Vil) is assured at or below 1.5V (0.3 x 5).
So anything between 3.5V and 5.5V is a safe logic high.

I have driven WS28xx chips with the 3.3V from an ESP device many times. The only time I have had an issue was when the wire from the ESP to the first LED was more than a few inches. Since 3.3v is already out of spec, a few feet of wire will drop it another .05 to .1Volt. If you need more than a few inches between the ESP and the LED, then you have to bump the data to 5V.

There’s no reason from your description that you fried the ESP, but if you can’t flash it, you probably did. At least the cp2102 UART. So buy a few Wemos D1 Minis and try again. (Bonus, you don’t have to press a flash button on the device).

I guess I will indeed just try another board in the next days. I now got the usb cable with two connectors, so I can cut one off and get the power wires for the LED ring. That will take the VIN pin out of the equation next time.

Just for the sake of completeness: I measured a few points on the board with the multimeter while plugged in, these are the results:

Input at the power regulator: 5,13V
Output of the power regulator: 3,25V
VIN: 5,12/5,13V (which seems weird as everything I found around powering something off of VIN mentions that the diode causes a measurable voltage drop, I think some examples mentioned 0,3 and 0,4V)
Power input directly at the chip: 3,25V
TX and RX directly at the chip: 3,25V (no idea what that says, or if at all. I don’t have an osci to see if that is actually a proper signal)

And one thing where I unfortunately don’t know if it was like that when I unpacked it, or if that is a result of my “testing”: one side of the usb2serial bridge and the adjescent area of the breadboard have a transparent “blob” on it. Could very well be that the whole thing was faulty from the start, and I was just lucky with the first 20 minutes of operation…

Okay guys, I think that’s it for now. Thanks for your help with boucing this a bit back and forth!

As I said, the board schematic you provided does not have a diode between +5 and Vin.

That does look strange, but unlikely to be related to the problem.

D1 on the schematic is hooked up between Vin and VBUS.
There are a couple of ways that you can supply power to the board.
One is with a USB cable connected to the USB connector. This in turn will deliver the same voltage (less the diode drop) on the P1 connector as well as on the Vin terminal on the board.
Another way is to supply 5V to the Vin pin or 5 V at the P1 connector. In the later case the diode will prevent 5V from Vin or P1 to conflict with VUSB in case a USB cable is also attached.
No matter what way you supply power to the board you will have 5V available on Vin and on the P1 connector and you can use this supply to power other circuits - as an example the LED ring. Only thing to keep in mind is that the total current used by the board and any external circuit can’t exceed whatever your power supply can handle.
The blob does look. Is any of the terminal on the serial converter shorted? I can’t see even when I zoom in on the area. If that is the case you might want to clean that up