Hey.
Just a quick question: Is it safe to just give a LED strip of WS2812B’s GND + DATA without 5v? I just a switch that just connects the 5v to the circuit, but the LED’s are lighting up a bit with red even without 5v. Is it safe?
It happens quite often, that the first LED die, when the power to the data line is higher then the power to “+” and “GND” . So it’s defenitely not save!
From Adafruit’s Neopixel Uberguide:
Avoid connecting NeoPixels to a live circuit. If you simply must, always connect ground first, then +5V, then data. Disconnect in the reverse order.
If powering the pixels with a separate supply, apply power to the pixels before applying power to the microcontroller.
Yeah - I have seen strips attempt to pull power through the data line - with a long enough set of strip this ends up burning out the MCU (or, at least, the port of pins on the MCU that you were connected to).
I drop a 470 ohm resistor in series with the data line before the first LED to limit the current through the substrate diode and prevent damage to the MPU/LED.