My Arduino controlled Pixel tree

Discussion in 'Mega, Mini, Spiral & Pixel Trees' started by elnino, Nov 3, 2014.

  1. elnino

    elnino Full Time Elf

    Joined:
    Aug 1, 2014
    Messages:
    137
    Likes Received:
    0
    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
     
  2. mborg10

    mborg10 Michael Borg

    Joined:
    Dec 28, 2011
    Messages:
    1,446
    Likes Received:
    0
    Location:
    claremont meadows
    Looks good. Some nice effects there
     
  3. smartalec

    smartalec Im a SmartAlec what can i say! Community Project Designer

    Joined:
    May 4, 2010
    Messages:
    1,183
    Likes Received:
    7
    Location:
    S.A.
    Find Me On:
    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
     
  4. damo1271

    damo1271 Full Time Elf Generous Elf

    Joined:
    Oct 12, 2011
    Messages:
    193
    Likes Received:
    3
    Location:
    Adelaide
    Find Me On:
    Looking good. :)
    Hopefully my arduinos arrive soon and I can try this.
     
  5. OP
    OP
    elnino

    elnino Full Time Elf

    Joined:
    Aug 1, 2014
    Messages:
    137
    Likes Received:
    0
    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...
     
  6. Jamie

    Jamie Lighting up the night.

    Joined:
    Dec 16, 2010
    Messages:
    387
    Likes Received:
    1
    Location:
    Warwick
    Find Me On:
    Nice work.. :D
     
  7. smartalec

    smartalec Im a SmartAlec what can i say! Community Project Designer

    Joined:
    May 4, 2010
    Messages:
    1,183
    Likes Received:
    7
    Location:
    S.A.
    Find Me On:
    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
     
  8. OP
    OP
    elnino

    elnino Full Time Elf

    Joined:
    Aug 1, 2014
    Messages:
    137
    Likes Received:
    0
    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.
     
  9. OP
    OP
    elnino

    elnino Full Time Elf

    Joined:
    Aug 1, 2014
    Messages:
    137
    Likes Received:
    0

    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.
     
  10. keithsw1111

    keithsw1111 Full Time Elf

    Joined:
    Oct 11, 2012
    Messages:
    228
    Likes Received:
    11
    Location:
    Kellyville, NSW
    Find Me On:
    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.
     
  11. keithsw1111

    keithsw1111 Full Time Elf

    Joined:
    Oct 11, 2012
    Messages:
    228
    Likes Received:
    11
    Location:
    Kellyville, NSW
    Find Me On:
    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.


    View: https://www.youtube.com/watch?v=eWTuOKKfVdg
     
  12. Jamie

    Jamie Lighting up the night.

    Joined:
    Dec 16, 2010
    Messages:
    387
    Likes Received:
    1
    Location:
    Warwick
    Find Me On:

    :( Won't open..
     
  13. David_AVD

    David_AVD Good news, everyone!

    Joined:
    Jun 12, 2010
    Messages:
    3,340
    Likes Received:
    22
    Location:
    Victoria Point (Brisbane)
  14. OP
    OP
    elnino

    elnino Full Time Elf

    Joined:
    Aug 1, 2014
    Messages:
    137
    Likes Received:
    0

    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.
     
  15. Boof63

    Boof63 Full Time Elf

    Joined:
    Nov 7, 2011
    Messages:
    486
    Likes Received:
    7
    Location:
    Kadina
    Looks good though!!!!
     

Share This Page