Can two Arduino MEGA 2560s power 100 LEDs together?

So… I’m trying to create this Halloween costume with an old backpack covered with aluminum hexagons about 3 inches across. I want to put and LED through a hole in each hexagon. Just wondering if two Arduino MEGA 2560s can, combined, power 100 LEDs in a lightshow? :confused: PLEASE ANSWER, SOMEBODY!

P.S. If you are wondering why I am making this so early before Halloween, it is because I don’t want to risk delays pushing the project behind Halloween. Besides, it’s better to be done earlier than later.

No, not directly.

Each I/O pin is rated for 40mA "absolute maximum" with 200mA for the whole chip.

Your best bet is probably [u]NeoPixels[/u] or [u]DotStars[/u]. These are addressable LED strips (or individual LEDs) with built-in drivers that are separately powered, and they just need 1 (NeoPixels) or 2 (DotStars) output pins to control/address an almost unlimited number of LEDs.

"NeoPixel" and "DotStar" are Adafruit brand names so you can find them elsewhere with different names but Adafruit is a good resource for information. NeoPixels have "tricky timing" so you generally need to use a library whereas DotStars are more like a regular shift register with a clock and data pin.

Or, there are serially addressed LED drivers that can also address-control a virtually unlimited number of LEDs with 3 control pins. (I have a project that uses 6 daisy-chained MAX6968 chips to control 48 LEDs using 3 pins from an Arduino Uno.)

Or if you do not want to use huge batteries to power the NeoPixels and require only single colour LEDs, you can use MAX7219 modules to drive 64 LEDs each in a matrix wiring configuration.

No need for MEGAs or more than one Nano.

Paul__B:
Or if you do not want to use huge batteries to power the NeoPixels and require only single colour LEDs, you can use MAX7219 modules to drive 64 LEDs each in a matrix wiring configuration.

No need for MEGAs or more than one Nano.

Thank you so much, Paul!

DVDdoug:
No, not directly.

Your best bet is probably [u]NeoPixels[/u] or [u]DotStars[/u]. These are addressable LED strips (or individual LEDs) with built-in drivers that are separately powered, and they just need 1 (NeoPixels) or 2 (DotStars) output pins to control/address an almost unlimited number of LEDs.

"NeoPixel" and "DotStar" are Adafruit brand names so you can find them elsewhere with different names but Adafruit is a good resource for information. NeoPixels have "tricky timing" so you generally need to use a library whereas DotStars are more like a regular shift register with a clock and data pin.

I saw the links that you sent me. I'm trying to spend as little as I can on this project, and the NeoPixels and DotStars are quite expensive, at around $4 each on average. Sorry if Im asking too much, but are there less expensive alternatives? Or I could just use the serially-addressed LED drivers that you told me about. Which one do you think would be better? Thanks, Paul.

If you are trying to do this on the cheap, then why are you planning to use the most expensive Arduino board? And why two?

You can use LED strings like this and control each LED individually for some interesting light shows for a lot cheaper than Neopixels. About $30 per 100 LEDs.

Last christmas I had 600 LEDs controlled by a single Wemos D1 mini. You can get the Wemos boards for about $3 each. And the Wemos is a heck of a lot smaller than the Mega.

I did something like that for last halloween. I like, super lazy’ed out on the costume part. I just wore one of my old trenchcoats, that my girlfriend and I had sewn rainbow colored faux-fur into for a different sort of party the year prior (people loved it at that party - but the rainbow theme, well, it gave some gay dude the wrong impression and he tried to kiss me, cause he assumed I must have been gay or bi, which was a little awkward - but it was a pretty crazy party anyway, so I didn’t let it phase me too much) - so yeah, I wore that and underneath it, I wrapped two 50-LED strings of those christmas-light shaped LEDs SteveMann posted around myself, put a controller based on a '328p (I have a custom circuit board, that builds in a pair of controls and an LCD and a '328p to drive it - but it would also run on a pro mini), and powered the whole thing with a smartphone power bank in opposite pockets, threw on a wizard hat, and said I was a party wizard. People liked it, and it was flashier than anything anyone else wore, so it wound up kind of stealing the show :stuck_out_tongue:

“brand name” neopixel and dotstar LEDs are expensive - but the generic versions on ebay use the exact same parts and are dirt cheap -

ex: 100 WS2812B’s on little circular individual PCBs if you want to do the wiring yourself so you can package it better, for like $12: https://www.ebay.com/itm/100pcs-WS2812B-Addressable-RGB-5050SMD-LED-Chips-Pixel-on-Black-Heat-Sink-PCB-5V/292794970823?hash=item442bf0b2c7:g:ymEAAOSwDaBb2DHd or for around the same price, you can get RGBW ones based on SK6812, which has 4 LEDs per pixel instead of three, the fourth one being white (they come in warm, neutral and cool whites) https://www.ebay.com/itm/Addressable-RGBW-RGB-White-SK6812-5050-LED-Module-Pixel-Light-5V-4-arduino-raspb/371078373987- no specific endorsement of those listings or sellers, just an example of pricing and the sort of thing I’m talking about.

For the strings like SteveMann linked to, search WS2811 string (they’re a diffused RGB led with a WS2811 driver chip on a little circuit board behind them), all pre-wired together for you, come in strings of 50 for $15 or so, if you dig you can find ones with all black or all white wiring.

With those, strings, you can do powering by just injecting power from a “power bank” at either end of the 100-LED string, and it’ll work fine. I wire up these kind of micro USB connectors (no specific endorsement of seller, but this is the kind you want, and about the price to expect to pay - you want the 2-wire ones, not the ones that bring out the data lines - those use much thinner wire) 10pcs Micro USB 5 Pin Female 2 Pin 2 Wire Charge Cable Cord Connectors DIY 30cm | eBay

So yeah - that’s easy, you don’t need anything nearly as beefy as a mega to drive it - I would be tempted to use a $2.50 pro mini. Simplest one to spec out, would just be 2 of those 50-strings of 2811-based LED strings, connected together, on the two ends, I’d put one of those female USB connectors onto the 2 power wires that they have dangling. Then take a 6-pin dupont cable so it could plug onto the pins on the end of the pro mini, and get a JST-SM-3 connector with the wires on it, and solder the 5v and Gnd to the wire going to pro mini’s Vcc and Gnd pins, and the pro mini’s TX pin connected to the signal line, and have my sketch not use serial, and just program it, then unplug from the serial it was using to program, plug into that dupont to JST-SM adapter, which was tied to the light strings, plug into the power banks, and glow all night long. That kinda outfit is already a hit, and what I described would run under $40 for the parts, and another $15-25 each for decent power banks that’ll keep you lit up until the break of dawn - could back off on the powerbanks if you kept the average brightness lower, or didn’t stay out until it started to get light out… And there’s a good chance you already have power banks, and if you don’t, they’re good to have anyway, both for their standard purpose, and for powering things like this…

DrAzzy:
People liked it, and it was flashier than anything anyone else wore,

"Flashier"!

Well, it would be "flashy", wouldn't it? :roll_eyes: