Neopixel Project

Hi there !

i´m going to build a large ( i think so ) WS2812 project.

Target : 32m LED-Stripes ( 5m+3m+3m+5m , 5m+3m+3m+5m) with 60 Leds/m
=> 1920 Leds => max. 100A Supply :slight_smile:

i´m planning to use 8 Nano´s (one for each stripe) to control the Stripes, connected as slaves to a Raspberry Pi with webinterface(Lan,Wlan).

Each Nano reads it´s I2C Address via IO-Ports.

Now there are a few questions :

  1. Power supply.
    I bougth 5V/10A supplies from Meanwell. I read about multiple supply (every 2m)
    how should i connect the supply in the middle of the stripe ?
    Can i connect two supplies to a stripe ( each on the end of the stripe ) ?

  2. Broadcast messages
    Is there a possibility to send broadcasts from the Raspi ( Addr. 0 should be the broadcast address )
    Does the Wire.h library accept broadcasts or do i have to adapt it ?

  3. Nano i tested the WS2812 with a 3m stripe, everyhing was fine. Setting the Number of LEDs
    to 360 ( what i need for the 6m (3m+3m) part ) the sotfware stopped to work.
    Is this a memory Problem ? (3 Bytes/LED * 360 => 1080 bytes for the LED-Array)

thanks for your help ...

you can connect that many lights with one teensy and a ws2811 Octoboard. It will make the system much simpler.

If you use multiple supplies you cannot connect the positive voltage together between strips. However, you shoul connect all the grounds together. Lastly at 100 amps you should definitely be thinking about fusing your strips, as the risk of fire is very real when your dealing with high amperage applications.

I would use one supply for each of the five meter strips, and one supply for each of the two meter strips. Connect the grounds together close to the strips, and put the psu' as close to the strips as possible. Then, for the positive connection, I would connect +5v to each end and in the Middle of the 5m strip, and to each end of the 3m strip.

I would keep those leads as short as possible also, and protect each run with a 6amp glass fuse or even better, a Polly fuse.

Do not connect +5v from multiple psu' together.
Do connect the grounds
Do provide over current protection

Hi telematic,

telematic:
3. Nano i tested the WS2812 with a 3m stripe, everyhing was fine. Setting the Number of LEDs
to 360 ( what i need for the 6m (3m+3m) part ) the sotfware stopped to work.
Is this a memory Problem ? (3 Bytes/LED * 360 => 1080 bytes for the LED-Array)

This would depend on what version your Nano are and which is selected in the IDE. Does it have the ATMega168 or ATMega328?

If it has ATMega168, that version only has 1K of SRAM and you have possibly ran out of RAM space. If you have the correct version selected in the IDE, it will give you a warning and stop with an error when you exceed the memory limits. However, if you have an 168 version and you have the 328 version selected, it will not give you an error because you are telling the compiler your Nano has more memory than it actually has and that will cause BIG problems with your sketch and it may crash.

If you do indeed have the 328 version, you may be also running out of RAM due to overhead the compiler cannot see due to how your program is running. One extra call to a function could overflow memory and cause a crash. Without seeing your code I could not tell you what is happening. Try backing the number of LEDs down to see at what point is stops working.

Before you dive into code, verify which Nano you have and make sure you have that version selected in the IDE when you compile.

If you do have the correct version selected (168 vs 328) then try the backing down the number of LEDs to see at what point it fails. Then you will have to start looking into the code to see where that extra RAM is being eaten up. If you are calling functions that call other function that call other functions, you might want to rethink your coding to reduce how far your call stack goes. Each time you call a function, RAM has to be allocated for the parameters and the static variables in the function. The compiler will keep track of globals and static variable allocation, but it cannot anticipate RAM usage while the program is running.

If you still cannot figure that out, post your code so we can take a look and give you some advice on how to reduce RAM usage.

Hope that helps you! :slight_smile:

Hi,

I am currently working on an ArtNet/sACN WS2812 driver using a Nano and its Enc28J60 ethernet piggyback board

I have most of the code written, including a webpage interface for adjusting IP/Universe/Etc..

The sACN code is very very minimal, and I am going to attempt what seems like the impossible

-> to make number of pixels required NOT related to the amount of ram available

Most pixel drivers (like FastLED and Neopixel) require an array to be built up for the string/matrix of LEDs, so if you want 170 leds= 510bytes, 340 leds = 1020bytes etc

I have written some very simple and efficient assembler code that will output WS data, its only requirement is you tell it how many bytes and where the data starts in memory

Therefore, the data could be in the receive buffer from the Ethernet Library - so why copy it to another array before outputting it ? just use what is there ALREADY in RAM !

You only output it once and the data wont be used again
Once the WS data is written the WS devices will hold the values (just like a write-only memory)

So as long as you can receive and decode the data, you can output it
Block A can be directed at Pin X
Block B can be directed at Pin Y
Block C can be directed at Pin Z
and so on....

The only downside to this is NOT being able to concatenate blocks one after another on the SAME string of LEDs

But there is a solution there too...

The LEDs will only latch the values you have just written to them when the WS_Data line goes LOW for a period of 50us or more...

So.. if at the end of a 510byte WS write you hold the final bit of the final byte high, the data wont latch..
Then go and get the next block of 510bytes, write to WS, and hold the final bit high, and still dont latch it..
Then write the final block of 510bytes, and finish by pulling the WS Data line low for more than 50us

In that example, you could output over 1500bytes to WS without a SINGLE extra byte of ram usage

But that could be 3000 bytes (1000 Pixel LEDs).. or more...

There is possibly one downside : The last bit from the last byte will ALWAYS be a ONE, but this is the least significant bit of the blue byte, so it may not be noticable

NANO... ETHERNET... 1000 or more PIXELS !

Just a few thoughts to play with.....

A slight addendum to the above..

It appears that WS2812 will internally correct timing errors (to some extent) and that over stretching the ONE bit will only end up in resolving it back to normal anyway

See

Very interesting article about stretching/reducing signal widths

In conclusion, my 'concatinating' approach (post above) will only work if you can get to tack new data onto the end of the old data WITHIN the 50us period, if you dont get there in time, the data WILL LATCH !

But.... its still worth a try ! :wink:

Ok, so I may have over-exaggerated with the number of LEDs, and here is the maths..

If you have 510 bytes that you want to send to WS LEDS, that will take ~5ms
If you want to animated your display then you will need to run at ~25Hz (40ms refresh)

You could safely get about 3000 bytes to WS within 40ms (allowing for other calculations/comms etc)
So that is only 1000 pixels (3 bytes per pixel), and that is probably the MAXIMUM

Still, a fair amount !

Unless you were making static displays, or running at lower refresh rates which might look a bit pants !