0

Power for Modular Synth-like Neopixel Toy
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Power for Modular Synth-like Neopixel Toy

by timcode on Fri Feb 15, 2019 3:16 pm

I'm working on a toy which looks like a modular synth, but will be mixing colors instead of sounds. It'll have plenty of knobs and switches and 1/4" patch cables, and a couple dozen RGB NeoPixels (probably no more than 30).

I'd like it to be battery powered since it's a toy, and would like to set it to go to sleep if not used in a while. I know that NeoPixels still draw some current when off, so QUESTION 1 is: can I power them through a small (2A) latching relay that's triggered by the board as it goes to sleep and wakes up? Is this a good approach? What relay would you recommend?

I'm thinking that I'll use a 5V board with tons of pins, like a Mega 2650 (or the Grand Central), and power it all with four C-cell batteries. I'll regulate the NeoPixels with a 7805. QUESTION 2: are C batteries OK for powering up to 30 NeoPixels?

QUESTION 3: since this is a toy with patch cables, there's a chance that two output pins will get connected to each other accidentally. But I know that this will cause damage if two outputs are connected and one is high and the other is low. If I put a resistor (like 1k) on each pin, will this keep it safe? (I plan to turn on output pins one at a time and poll the inputs to make a map of the connections. My alternate strategy is to make all the pins inputs, and change the pinMode to output for only one pin at a time).

(Side-note: I am considering using several ATmega328P chips instead of a single dev board, communicating with i2c: one to poll the patch cables, one for pots, one for main logic and neopixels... but I'm brand-new to any AVR programming and have never used i2c for chip-to-chip communication, and suspect that I might end up frying something. I feel like one big board will be safer and faster to program.)

THANK YOU FOR ANY ADVICE!

timcode
 
Posts: 8
Joined: Tue Jun 04, 2013 11:22 pm

Re: Power for Modular Synth-like Neopixel Toy

by adafruit_support_mike on Sat Feb 16, 2019 2:40 am

timcode wrote:QUESTION 1 is: can I power them through a small (2A) latching relay that's triggered by the board as it goes to sleep and wakes up? Is this a good approach?

That would be a good approach, with some slight alterations. Just using the sleep/wake state of the microcontroller to control a latching relay would be difficult, but having the microcontroller toggle the relay OFF before sleeping, and toggling the relay ON before it does anything that requires NeoPixel power, would be easy.

timcode wrote:What relay would you recommend?

This one sounds like it will meet your specs:

https://www.adafruit.com/product/2923

timcode wrote:QUESTION 2: are C batteries OK for powering up to 30 NeoPixels?

Yes, those will work.

The maximum current through an RGB NeoPixel is around 60mA, so 30 of them will produce a worst-case current load of 1.8A. Alkaline cells larger than AAs can generally deliver 2A, which is more than enough.

Our experience shows that most NeoPixel projects use around 1/3 the worst-case current, and it isn't hard to go lower if you're careful with the PWM values. C cells have the best energy density (milliamp-hours per cubic centimeter of battery) of the AA-C-D series, making them a good choice.

timcode wrote:QUESTION 3: since this is a toy with patch cables, there's a chance that two output pins will get connected to each other accidentally. But I know that this will cause damage if two outputs are connected and one is high and the other is low. If I put a resistor (like 1k) on each pin, will this keep it safe?

Yes, that will protect the pins from each other.

Generally speaking, it's better to deal with that kind of problem mechanically, using different connectors for pins that can be inputs and pins that can be outputs. You'd still use resistors to protect against really determined misuse, but they'd be a second line of defense instead of the primary defense. That may or may not work with your project, but it's something to keep in mind.

timcode wrote:(Side-note: I am considering using several ATmega328P chips instead of a single dev board, communicating with i2c: one to poll the patch cables, one for pots, one for main logic and neopixels... but I'm brand-new to any AVR programming and have never used i2c for chip-to-chip communication, and suspect that I might end up frying something. I feel like one big board will be safer and faster to program.)

The Wire library's support for ATmega328 microcontrollers operating as I2C slave devices is pretty mature at this point, and should Just Work. Go ahead and play with it using a couple of simple boards, and see how you like it.

adafruit_support_mike
 
Posts: 57106
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.