I was hoping to get some insight from the community on an upcoming project.
I am doing a build that uses 16 WS2812b LEDs, and I’d like to add on 3 additional. From a data perspective, I am sure I can just tap and continue to the next 3 LEDs. What I’d like to do though is make it possible to turn those 3 LEDs on or off, individually, via a toggle switch. If I put a toggle on the +5V line/Common line to LED #17 and turn off the power to it, will the WS2812b still pass data to LED #18 and #19?
No, it won’t - WS2812 chips regenerate the signal as it passes from chip to chip - in order to be able to do that, they need power. (There’s a chance the chips might attempt to draw power over the data line - you really don’t want it to do that, though)
It’s not a good idea to have pixels receiving data when they aren’t powered because the pixels might try to power themselves via the data signal which isn’t good.
So it would be better to toggle (break/connect) both data and power (+5V) at the same time (ground can stay connected) with a DPST switch.
Or another option would be to “virtually” switch them off. A button (or switch) can toggle a variable which then determines if the extra pixels are “on” (normally displayed) or “off” (set to black). Here’s an example:
I agree it’s best to let the microcontroller program how the LED behaves based off of switched input detection. I like your theory, the only reason I wouldn’t do is because the smart led’s seem to have issues or failures when one of the power sources is removed. Granted its the positive power your switching and shouldn’t cause issues. Note if ground is removed and positive power and data are only connected that’s not good…(pixel smoke).
If a pixel has no power then it has no way to shift the data to the next pixel so all further data shifting stops after the last powered pixel