My Arduino controlled Pixel tree

elnino

Full time elf
Joined
Aug 1, 2014
Messages
142
Hi all, I've finally got my WS2812b strips and can put them to use!


I built my mega tree (well, more of a 'medium' tree as it's only 2m tall) using 20mm Conduit into some 45mm PVC pipe at the bottom. The tops have been screwed to a strip of aluminium bent in a slight arc.


The strips are 60p/m I bought in 4m lengths, cut in half and looped over. Each 4m is driven by my Arduino based pixel controller - These ones are actually generic Arduino+Ethernet but the final revision will be using ENC28J60 Ethernet modules with Pro Minis. I just happened to have enough of the wiznet based ones around.


I'll be posting my complete code for both the Wiznet and ENC28J60 Ethernet modules very soon.

2014-11-02 22.21.08.jpg




View: http://youtu.be/h0Cqzan1uDU



Also - Some dumb RGB spots I made up - The halogen spots were $10ea from Bunnings, gutted them and replaced with 2 X 3w RGB leds in each. Total cost is only about $13 each and are perfect for lighting up garage doors etc.
2014-10-25 09.29.46.jpg 2014-10-25 09.30.13.jpg 2014-10-25 09.30.32.jpg
 

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
im using the arduino for certain elements, but im finding that the mini's cant do more than 1 universe..
so im looking at testing the code on a mega or Due, to see if they can handle the 4universe's nicely
 

elnino

Full time elf
Joined
Aug 1, 2014
Messages
142
I have had similar experiences. The Atmega328 based arduinos can only do about 1.4 universes. Possibly more but not a lot.


I even tried my other code which was technically able to do 2 universes worth of pixels but spread over 4 universes and it didn't really work so i've scrapped that idea but anyone else can feel free to give it a shot.


I considered using a Mega for the tree since it's the SRAM that causes the limitation (2k vs 8k) - It probably has enough RAM to handle the whole tree but then I was concerned with ethernet/SPI bandwidth being the next bottleneck. I've got a Mega here - Maybe one day...
 

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
elnino said:
I have had similar experiences. The Atmega328 based arduinos can only do about 1.4 universes. Possibly more but not a lot.


I even tried my other code which was technically able to do 2 universes worth of pixels but spread over 4 universes and it didn't really work so i've scrapped that idea but anyone else can feel free to give it a shot.


I considered using a Mega for the tree since it's the SRAM that causes the limitation (2k vs 8k) - It probably has enough RAM to handle the whole tree but then I was concerned with ethernet/SPI bandwidth being the next bottleneck. I've got a Mega here - Maybe one day...

i know what you mean, so many projects so little time.. im wondering how these due's will stack up.. even more ram than the mega's an a faster processor . but then you could be right with the bottleneck of the ethernet side.
one person discovered a bottle neck of receiving e1.31 an trying to run a config webpage, it just did'nt like it.
but thats the hole idea of the arduino's.. its a hobby board only
 

elnino

Full time elf
Joined
Aug 1, 2014
Messages
142
Theoretically you'd be able to do 10 universes with room to spare on a Mega:

5120 bytes of LED array data
640 Bytes in E1.31 Packet buffer
~1000 bytes of variables from the libraries and main code.


Perhaps i'll give it a shot on the tree and see how it performs.
 

elnino

Full time elf
Joined
Aug 1, 2014
Messages
142
smartalec said:
im looking at testing the code on a mega or Due, to see if they can handle the 4universe's nicely


Well, I tested the code with a standard Arduino Ethernet shield and a Mega 2560 and could not even get 3 universes. I think the problem is now the SPI port or purely processing time. It's just too much data for the Arduino to process in such a short time, then on top of that transmitting the entire LED array across the strip, it just runs out of steam.


In short, I doubt it will ever work controlling so many LEDs with an AVR based Arduino via E1.31.


However, you may find it works fine on plain old RS485 DMX or with the Due.
 

keithsw1111

Senior elf
Joined
Oct 11, 2012
Messages
936
Location
Kellyville, NSW
It is not explicitly stated here. Are you connecting all universes to one arduino output pin? Or are you using multiple? With the port command you can write 8 pins at a time. I drive 19 strings of 50 bulbs off an arduino mega at about 10 frames per second. I don't however do e131 which would add overhead. I do have a 256kbit SRAM chip which helps with memory.
 

Jamie

Lighting up the night.
Joined
Dec 16, 2010
Messages
399
Location
Warwick
keithsw1111 said:
Here is the video. This is hammering the Arduino hard and is very optimised. As I say I do have an SRAM chip which i do temporarily store some data in. I also have an SD card which is where my pattern data comes from.


:( Won't open..
 

elnino

Full time elf
Joined
Aug 1, 2014
Messages
142
keithsw1111 said:
It is not explicitly stated here. Are you connecting all universes to one arduino output pin? Or are you using multiple? With the port command you can write 8 pins at a time. I drive 19 strings of 50 bulbs off an arduino mega at about 10 frames per second. I don't however do e131 which would add overhead. I do have a 256kbit SRAM chip which helps with memory.


The problem is not controlling the amount of pixels themselves - as you have demonstrated, the AVR handles it ok. The problem is processing so many Ethernet packets of data in such a small amount of time. It may be a tad better with the Ethershield over the ENC28J60 ethernet but I doubt it's going to make too much difference.


From what I can tell the buffer was overflowing quicker than it could process the packets and was messing things up totally.
 
Top