CONTROLLING MULTIPLE NEOPIXEL STRIPS WITH MULTIPLE PINS ON A

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
DanMan1185
 
Posts: 4
Joined: Fri Aug 08, 2014 8:20 am

CONTROLLING MULTIPLE NEOPIXEL STRIPS WITH MULTIPLE PINS ON A

Post by DanMan1185 »

Hello Everybody,

I am working on a lighting project for my BANNED. My vision is to have 12 of the 60 LED per meter NeoPixel strips hanging from the ceiling. These strips would hang in a 4 by 3 grid with 2 meter spacing. A have made a rough sketch of my vision here. This project is very similar to the Immersion art project posted by Adafruit customer ramien

Before I set out to do this, I have a few questions:
  1. Is there a library that allows the Mega 2560 to communicate to multiple strips using multiple output pins? I ask this because it will be a real pain to run the output of one strand back up the strip, across the ceiling, and to the input of the next strip. I am worried about clutter as well as the signal losing strength. Do you have any ideas?
  2. Do you suspect I will have issues with loss of strength of my digital signal? If the Mega is in the middle of the 3 X 4 m grid (and I can communicate on multiple output pins), the digital communication line may need to about 3 meters in its longest run before reaching the input of the furthest strand. If I cannot communicate on multiple output pins, then I will have to run the output of one strand up to the input of the next. That's a 1 meter up the strand, then 2 meters to the next strand 12 times over, so about 36 meters of non-strip wire! Any ideas on how can I mitigate signal strength problems?
Thanks so much!
Danny
Last edited by DanMan1185 on Sun Aug 10, 2014 8:20 am, edited 2 times in total.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: CONTROLLING MULTIPLE NEOPIXEL STRIPS WITH MULTIPLE MEGA

Post by adafruit_support_bill »

1 - yes, you simply declare multiple strips and assign each one a different pin.

2 - 1 meter seems to be the practical distance limit for Arduino to neopixel or for spacing between pixels. Beyond that, you need some sort of buffering. One trick is to use a 'blind' pixel as a repeater. Others have had luck using RS485 line drivers over longer distances.
http://forums.adafruit.com/viewtopic.ph ... 3&p=249621

User avatar
michaelmeissner
 
Posts: 1821
Joined: Wed Aug 29, 2012 12:40 am

Re: CONTROLLING MULTIPLE NEOPIXEL STRIPS WITH MULTIPLE MEGA

Post by michaelmeissner »

In terms of the signal length, etc. it might be easier to have cheaper microprocessors handle each strand, and have them communicate with a master processor for assignments. If you use i2c, you might be able to do it with your brain processor in the middle, and separate cat-5 cables to carry power/i2c to each processor (max i2c distance is about 6 meters). Something like a 5v trinket would work.

Otherwise you might need a radio solution like nRF24L01+, which adds to the cost (radios, plus beefier slave processors to handle nRF24L01+).

User avatar
DanMan1185
 
Posts: 4
Joined: Fri Aug 08, 2014 8:20 am

Re: CONTROLLING MULTIPLE NEOPIXEL STRIPS WITH MULTIPLE PINS

Post by DanMan1185 »

First off, there was a terrible typo in my original posting title. It says "Controlling Multiple Neopixel Strips with Multiple Mega 2560s." It should have said "Controlling Multiple Neopixel Strips with a Single Mega 2560."

adafruit_support_bill, now that the title of my post is adjusted, can you confirm that I can run multiple pins as outputs simultaneously to control multiple strips? My goal here is to make the structure more like a "spiderweb" rather than a long continuous line of LEDs. I imagine some pseudocode would be would look something like:

Code: Select all

loop
send LED status command 1 to 60 LEDs on strip A using pin 4 //this would function identically to the Adafruit_Neopixel.h library
send LED status command 2 to 60 LEDs on strip B using pin 5
send LED status command 3 to 60 LEDs on strip C using pin 6
and so on
I definitely thought about pairing each strip with its own microcontroller and then having a master "conductor" microcontroller send i2c commands to each of the cheaper microcontrollers. That might be the best way to go, but whenever I want to update my library of blink patterns, I would have to reprogram all the cheaper microcontrollers.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: CONTROLLING MULTIPLE NEOPIXEL STRIPS WITH MULTIPLE PINS

Post by adafruit_support_bill »

can you confirm that I can run multiple pins as outputs simultaneously to control multiple strips?
Yes. You can control multiple strips from multiple pins on the same processor. Just declare them with different pins and give them different names:

Code: Select all

Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(60, PIN4, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(60, PIN5, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip3 = Adafruit_NeoPixel(60, PIN6, NEO_GRB + NEO_KHZ800);

User avatar
DanMan1185
 
Posts: 4
Joined: Fri Aug 08, 2014 8:20 am

Re: CONTROLLING MULTIPLE NEOPIXEL STRIPS WITH MULTIPLE PINS

Post by DanMan1185 »

Wow, great! I will give it a go once my strips come in :)

User avatar
DanMan1185
 
Posts: 4
Joined: Fri Aug 08, 2014 8:20 am

Re: CONTROLLING MULTIPLE NEOPIXEL STRIPS WITH MULTIPLE PINS

Post by DanMan1185 »

FYI: this article on FastLED's GitHub page solved my problems!

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”