Anyone knows how to properly hook up Neopixels to an Arduino Due?

fastled-support
gplus
(Franck Marcotte) #1

Anyone knows how to properly hook up Neopixels to an Arduino Due? I have an external 5V PSU. The Due’s operating voltage is 3.3v

(Andrius Milinis) #2

You need to use some kind of level converter from 3.3 to 5. Easiest way to use some level converter IC like this. http://www.ebay.com/itm/2Pcs-4-Channel-IIC-I2C-Logic-Level-Converter-Bi-Directional-Module-5V-to-3-3V-/321525848046?hash=item4adc6f17ee:g:L4AAAOSwRLZUGQRk But in your case, you need only one channel, so, you may do some converter by your self. The ways, how you can do it: https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide

(Franck Marcotte) #3

Ok so if I’m outputting from 40 pins I need every pin to go through that? Thank you Arduino for making the Due 3v -_-

(Jeremy Spencer) #4

I’ve successfully used a Due without a level converter. Many of the ws2812 LEDs are capable of being controlled with 3.3v.

(Daniel Garcia) #5

Whether or not you need the level shifter seems to depend on a bunch of things. I’ve found that making sure that the voltage going into the 2812’s is below 5.2v can help (note many 5v power supplies put out 5.2-5.4v)

(Scottie D369) #6

Get a different board.

(Franck Marcotte) #7

@Scottie_D369
Can you recommend a board? I couldn’t find anything as powerful with 40 pins+

(Scottie D369) #8

What do you need 40 pins for? All you need is 1 data line to control them!

(Daniel Garcia) #9

@Scottie_D369 to merely call your comment unhelpful would be charitable at best.

The sam3x8e in there is a fine arm chip, and for the longest time was second only to the k26 in the teensy 3/3.1 for me as far as preference, and the due (and its variant, the digix) board is one of the better options out there for massively parallel led driving. I was running over 3000 2812’s at over 100fps with it.

It is certainly a far better arm platform than many of the cortex m0 things running around.

(Daniel Garcia) #10

@Scottie_D369 why use more than one pin? Parallel output - greatly reduces the time to write out a frame of led data.

(Franck Marcotte) #11

The reason why I need all these pins is because the project I’m working on has an octopus like structure and very limited space to work with. Daisy chaining would be a massive mess and is out of the question. I could work with maybe half the RAM and Flash but I need a pretty powerful core. The MEGA has enough pins but lacks power. Teensy has enough power but lack the pins.

(Daniel Garcia) #12

@Franck_Marcotte feel free to ping me about using the parallel output to get faster write times as well.

(Scottie D369) #13

Well every LED is addressable soo I would say daisy chain the data line too.

(Daniel Garcia) #14

@Scottie_D369 there are layout reasons to not daisy chain with a star (or octopus) shaped arrangement running the data line from the end of one arm to the beginning of the other can be a pain and can also cause signal issues that require being dealt with. Not to mention the aforementioned benefit of driving multiple outputs in parallel.

(Scottie D369) #15

Ok then all I can say is good luck.

(Daniel Garcia) #16

Back to advice that is actually useful/helpful, @Franck_Marcotte if you can get a hold of a digix - there’s some better pin layout stuff that can get you more pins in parallel.

Right now what I have checked in is 3 sets of 8-way parallel output, but I can probably spin up some 16-24 way output for the digix (I have 12 way output working on the teensy 3.1, and going from 8 to to more pins is pretty straightforward) - I had a single 24-way driver running for driving locus off of a digix.

If you are still flexible on which pins you are using I can make recommendations on the pins that are best to use for the parallel output.

They 84mhz cpu and 96k of ram is fantastic for driving this many LEDs.

(Franck Marcotte) #17

What exactly is parallel used for? To mirror the strips?

(Daniel Garcia) #18

No - it’s an efficiency thing. The timing for neopixel is 30us per led pixel. This makes writing out led data slow. With the parallel output I’m writing out (different) data to 8-24 strips but at the same time - so it’s not for mirroring, it’s just for writing out the data 8-24 times faster :slight_smile:

(Franck Marcotte) #19

Wow that’s amazing. I have no idea how you manage that under the hood, but is there a difference for me as a user? Do I need to adapt my code?

(Jeremy Spencer) #20

I’m not an expert, but the parallel output system is fantastic. There is an example with the library which shows how to use it. How many legs does your octopus have?