I was hoping to get some insight from the community on an upcoming project.

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?

It MAY work, but it’s not a good idea. Connect those LED’s like you would any other WS2812 and program the toggle switches and LED’s accordingly.

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)

I was afraid that was going to be the answer. I guess I’ll go with a small arduino and control them separately. Thanks!

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

@Ryan_Shuck I think what i did in a similar situation was have my code for the separate section work with its own subset of the fastled CRGB array.

Then you can do a fastled fadetoblack on that array and it will turn them off, or do any other fastled function on that array conveniently.

I’m sketchy on the details because I’m not very good at this but someone here can probably tell you off the top of there head how I did it.

I’m thinking:

CRGB* my3leds = leds+16;

Where leds is your 19 element CRGB array.

Should be easy to do what your after with minor changes to setup of your fastled array. Easier than another arduino.