Is it possible to "pair" addressable LED's?

Hi guys - I'm planning lighting my workshop at the moment and have a couple of questions.

I'll be running a UNO and roughly 15m of WS2812B. Primarily uplighting around the top of the workshop but I'm also building my workbenches to create a U shape around the back half of the workshop which I'd like to mount LED's under to illuminate the shelving I'll be building underneath.

I like the effects provided with FastLED and would like the desk lights to be in sync with the main uplighting. Say for example the uplighting runs on an area with no workbench underneath, on a scrolling effect it'll continue as normal then when it reaches the workbench the lights underneath will activate relative to the uplighting. At the same time I'd also like the workbench lights to be controlled as an individual zone if I code it that way so I can just use them as illumination when the effects aren't running but I'm not sure if this is possible if they have to be set up to mirror other LED's.

I'm not familiar with Arduino/FastLED yet so this may be a silly question until all my stuff arrives on Monday and I can experiment. Many thanks for any help :slight_smile:

Hi and welcome to the forum.

You didn't say how many leds per metre your strip has. Normally it's 30 or 60, but you can get 144 per metre.

Two problems with your plan. Hopefully you have considered them both.

1 power supply & cabling. You're going to need a lot of both.
2 ram memory. You are going to need a lot of that too. If your strip is 30 per metre you may be OK, but 60 per metre or more, Uno does not have enough.

To answer your question, yes, that's possible through programming.

Paul

Thanks for the reply :slight_smile:

I’m using 30/m strips as I don’t need much resolution/smoothness, just a bit of ambient light when I work through the night and under-desk lighting. I have a 5v 30A switching PSU and two 15A’s I can use so should be OK for power. As far as wiring goes I’ve yet to rewire the workshop and finish the walls so I’m doing a dry run and getting everything as it needs to be before tearing it all out and finishing everything. As you can see it’s a bit of a mess and I have two more of these workbenches to build to complete the U shape so should be cool with neat wire runs designed in.

The thing I was trying to get my head around is that as far as I could see you set a global value for the amount of LED’s you have (Say, 100) and FastLED interpolates between the start and the end point so a single LED scrolling would start at 1 and end at 100 as default. The way my brain was thinking it through was that my run (Scaled down for ease of explaination) would be 1-25 uplighting across the stretch with no workbench, 26-50 would be under bench lighting, 51-75 would be uplighting above that. So as standard the scrolling effect would follow the run and do the uplighting-desk-uplighting and ruin the “assumed” interpolated order and trying to re-code all of the demos to follow that 26 and 51, 27 and 52 etc were to light would take an age.

Is there a way to globally define the “order” so to speak? Or am I overthinking things too much and it’s going to be obvious when I come to do it? I haven’t got access to my computer at the moment so without looking at it I’m kind of assuming things blindly at the moment and trying to prepare lol :slight_smile:

04ede24887bb1dce82595d859e6d91bff80cb62a.jpg

trying to re-code all of the demos to follow that 26 and 51, 27 and 52 etc were to light would take an age

I think you are over estimating that, probably because of your level of programming experience. With help from the forum I don’t think it will be too bad.

Here are some other ways to achieve the same thing.

  1. You can cut the strip wherever you want. You will then need to re-join the power lines, obviously, and it might be a good idea to inject power from the supply at those points anyway (the conductors on the strips are thin and you get voltage drop along the strip making the leds dimer at one end otherwise). But the real reason for cutting the strip would be to redirect the data line to another cut somewhere else in the strip. So you are re-defining the order through physical wiring rather than in the code. There is a potential problem with that idea. The data signal will degrade if the re-directing line is too long, and the strip at the receiving end may not work reliably or at all.

  2. You can wire parts of your strip as separate strips. The fastLED library will allow you to control multiple separate strips attached to separate Arduino pins. Each strip is given its own specified length in the code. An advantage of this technique is that one strip can be running an animated pattern while another strip is showing a fixed pattern. The fixed pattern strip does not need updating, so the animated part can be updated more quickly.

  3. You can wire two strips in parallel to the same Arduino pin. This will cause the two strips to show the exact same pattern at all times, without needing to write any code to achieve it. It also reduces the usage of ram memory and speeds up the updating because the Arduino sees the two strips as one shorter strip.

Thanks again for the reply! Yeah I'm going to inject power at various points to be on the safe side, I've made access points in the walls so anything can be added in to the wiring nice and easily in future just in case.

Been about ten years since I done any programming but just had a quick five minute look at the software and libraries and it's a lot clearer now lol. So basically it's a lot easier if I run two strips and define them something like...

#define NUM_STRIPS 2
#define NUM_LEDS_1 100
#define NUM_LEDS_2 50
#define NUM_LEDS NUM_LEDS_1 + NUM_LEDS_2

From there I can use Fast.LED.addLeds for both The first and Second strip defining that 1 starts from 0 on pin X and 2 starts from position 50 on pin Y for example?

Thanks again for the help, makes a lot more sense now having actually looked at the system lol.