How far from the processor can I run my LEDs?(SOLVED)

I bought a bunch of 12V WS2811 Strings for Christmas decorating, and I have a few questions.
I should add that I am just learning to use fastLed.h and RGB LED strings.

I am using a 15A PS, so a few 50-LED strings should be no problem. The sample sketches all run fine on the Wemos D1 Mini using a single 50-LED string. For these tests I am running the firstlight.ino sample sketch.

So, some questions:

  1. From various tutorials and forum postings, I have seen a resistor in series with the data line with values ranging from 220-Ohm to 22K. Is there a spec or is it just a guess?

  2. How long can the data line be from the Wemos to the LEDs? I have a one-meter line from the Wemos to a single string, and I can run the sample sketches just fine. But when I change it to a 15-foot LED cable, (3/18), nothing. Not one LED lights. Any ideas?

I suspect the problem is in my data line because the voltage at the end of the two 50-LED strings is still 11.28-Volts. (It’s 11.99-Volts at the start of the string).

So, what am I doing wrong? How do you run 100 or 200 LED strips from a single processor?
SOLVED)

FirstLight.ino (3.33 KB)

You don't the processor simply does not have enough power. If you want long lines consider using RS485 as the method of sending date, simply on off, or PWM. Per channel simply configure one to be transmit only the other to receive only. This will give you the ability to run the lines several thousand feet. The Wemos simply goes goes to the transmit pin the leds go to the receive. Plan on running a ground with the RS485 signals and connect them at each end, be sure the 120 ohm terminators are connected. They are on the cheap boards from ebay. With the appropriate led drivers and power supply at the leds it is almost unlimited to the number you can drive.
Good Luck & Have Fun!
Gil

You mean like this?

RS485.jpg

I am surprised that 3 meters is a problem with the data, but I understand that the timing is pretty critical.

I want to keep the Wemos indoors, about 20 meters from the display because getting to it for adjustments to the programming will be difficult when there's a few feet of snow on the lawn.

Will the 485 UARTs be fast enough for the LEDs?

RS485.jpg

SteveMann:
I want to keep the Wemos indoors, about 20 meters from the display because getting to it for adjustments to the programming will be difficult when there's a few feet of snow on the lawn.

With the Wemos/ESP8266 you can use OTA - over the air update. So as long as it is connected in your WiFi you can update sketches - even without USB connection.

Thanks, part of the reason for using the Wemos was the need for memory to run a few hundred lights. As I understand OTA, my program can't take more than 50% of the available memory.

I am surprised that 3 meters is a problem with the data,

It is the cable capacitance that kills fast signals, so the length you can get will depend on how much capacitance your wiring has. Twisted pair has a lot, ribbon cable has less.
The resistor value is not critical and is there to absorb signal reflections, anything from 100R to 479R will be fine. It also protects the first LED if you apply a signal without there being power on the strip.

my program can't take more than 50% of the available memory.

No that is not the case.
Memory for a program and memory for data are two different sorts of memory. On these machines there is no limit on one imposed by the limit on the other.

Thanks Mike. I suspected as much because I2C has the same restriction on wire length. I will experiment with the OTA library again- it's been more than a year since I tried using it on other ESP boards but I recall that once the sketch size exceeded 50% of dynamic memory, OTA would fail. But I don't mind trying again.

Do you have any opinion of using the RS485 UARTs from the control location to the lights?

Search for DMX

You could try using a few sections from the string as "boosters". I assume you can cut the strip every 3 leds? You could cut 2 sections from the strip and link them with 5ft of cables, i.e. Arduino-->5ft cable-->Resistor-->booster strip-->5ft cable-->Resistor-->booster strip-->5ft cable-->Resistor-->rest of strip. If you don't want to see the light from the booster strips you could hide them inside black heat-shrink sleeve.

When I have tried to run ws2811 from Wemos, I found I had to use a signal level shifter. I was only running a 50-led, 5V string, with only 1~2m of cable between the Wemos and the first led. I used a 74HC14 to shift the signal from 3.3V up to 5V. It might be worth trying this idea first with your 15ft cable before you try my first suggestion.

Search for DMX

The problem with DMX in this situation is that it is a low speed interface that expects a bit of intelligence at the far end.

I suspected as much because I2C has the same restriction on wire length.

Normal I2C speeds are about 10 times slower than a WS2812 requires.

Do you have any opinion of using the RS485 UARTs from the control location to the lights?

RS485 is a half duplex differential protocol, it might work if you wire it for one direction only.

When I had to do something similar I used an RS422 driver / receiver, the AM26LS31 for the driver and the AM26LS32 for the receiver. And I managed to get them in a through hole package rather than surface mount. They use a differential signal over twisted pair wires. I used them to wire up signals for the LEDs and other signals on this project:-


Note the small things at the bottom right are people. The electronics were in a small space behind them.

PaulRB:
You could try using a few sections from the string as "boosters". I assume you can cut the strip every 3 leds? You could cut 2 sections from the strip and link them with 5m of cables, i.e. Arduino-->5m cable-->Resistor-->booster strip-->5m cable-->Resistor-->booster strip-->5m cable-->Resistor-->rest of strip. If you don't want to see the light from the booster strips you could hide them inside black heat-shrink sleeve.

When I have tried to run ws2811 from Wemos, I found I had to use a signal level shifter. I was only running a 50-led, 5V string, with only 1~2m of cable between the Wemos and the first led. I used a 74HC14 to shift the signal from 3.3V up to 5V. It might be worth trying this idea first with your 15m cable before you try my first suggestion.

I saw something like this- using one LED from the string as a "repeater". As I understand it, the data output from the first LED module will be 5V. I have a dead string (it arrived DOA) that I might be able to cut a good module from to test this.

SteveMann:
I recall that once the sketch size exceeded 50% of dynamic memory, OTA would fail.

Dynamic memory? You mean flash.

Presumably to update a program (sketch), you need sufficient space to upload it, then (only) once it has been successfully uploaded, you can copy it over the original, thus you need sufficient memory for the original, the replacement plus the code to perform the transfer, totalling twice the program size.

If you were using RAM to hold the update, then the program size would be primarily limited to a little less than the RAM.

But OTA program (code) updates are a bit of a party trick. For a working program, you should only be wanting to upload a data block.

Solved. (mostly).

I did order some RS485 UARTS to try that later.
Adding a single WS2811 culled from the mostly dead string to the start of the 15-foot wire did the trick for my test setup.

RGB-LED-String-Extension.jpg

I did get OTA working on the Wemos, so that's an option. Except that I realized a new problem. Plan A was to have the Wemos inside the basement, about 50 ft from the display. Plan B, because getting the data to go that far without assistance made Plan A questionable was to put the Wemos at the display and use OTA. The box that I was planning to put the power supply and Wemos into was going to be on the ground. Potentially under two or three feet of snow. WiFi won't connect through the snow. So, back to redesign the display to get the Wemos above the snow line. (Plan C).

Plan D: I may try putting a single WS2811 every 15 ft along the length of the run to the display since one worked. Those lone pixels will be set to Black to minimize current drain from those LEDs.

RGB-LED-String-Extension.jpg