Need help getting a lighting project off the ground!

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
TheRageTater
 
Posts: 2
Joined: Sun Mar 14, 2021 2:03 am

Need help getting a lighting project off the ground!

Post by TheRageTater »

I'm big into scale modeling and would like some help getting this off the ground. I'm not sure where to start as I'm basically a beginner here.

Long story short, small scale expandable nanoleafs. I plan on using these https://www.adafruit.com/product/1758 to get the job done, but I'm not sure where to go from there. I read you can basically chain 5 of them without worry but my issue I'm bumping into is this: what microcontroller to use? does it really matter?

And the follower up, I'd like to make them seamlessly scalable without worrying too much. My thoughts were using magnetic connections at the base plate of the two connecting pieces. I'll figure out the wiring and everything but I guess my main question is can I chain microcontrollers and run LEDs off of each of those?

Something like Microcontroller Pin X > leds, Pin X2 > magnetic connector > microcontroller > Pin X on second microcontroller to more LEDs, rinse and repeat until something lights on fire (or ideally doesn't)

It doesn't need to be a crazy microcontroller, I can get away with the likes of a Pi Pico for the very rudimentary code I'm gonna be running on it if that helps.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Need help getting a lighting project off the ground!

Post by mikeysklar »

Since you are interested in packing these into groups of 5 then scaling those into longer connections it seems like using addressable NeoPixels setup would make more sense. That would give you color mixing and get you out of which pin are these connected to game since it is only two pins necessary to drive them. They come in many forms.

https://www.adafruit.com/?q=neopixel&sort=BestMatch

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Need help getting a lighting project off the ground!

Post by adafruit_support_mike »

TheRageTater wrote:I read you can basically chain 5 of them without worry
Point of vocabulary: in electronics, 'chain' usually means 'put devices in series'.. the tail of one connects to the head of the next.

Multiple LED Sequins work in parallel: all the heads are connected together, and all of the tails are connected together.

The 'connect 5' idea involves powering the LED Sequins from a microcontroller pin. Boards like the Arduino Uno can send about 20mA through each GPIO pin, which divides out to 4mA per LED for a set of 5 connected in parallel. If you use something that can deliver more current, like a 200mAh LiPo, you could power hundreds.
TheRageTater wrote:but my issue I'm bumping into is this: what microcontroller to use? does it really matter?
First, you only need a microcontroller if you want to turn the LEDs on and off with a microcontroller. A slide switch would work just as well if you're willing to turn them on and off by hand.

Using a microcontroller is reasonable even if it isn't strictly necessary. You can think of it as a little switch-flipping robot.

Assuming you do want to use a microcontroller, the exact kind doesn't matter too much. The main design questions are how many LEDs you want to control at the same time, how many groups of LEDs you want, and what kind of external circuits you're willing to use.

If you want to control the LEDs directly from the microcontroller pin, you'd want an 8-bit microcontroller like the Arduino Uno's. Those can deliver about 20mA per pin. 32-bit microcontrollers, while having more computing power, are often limited to a maximum of 3mA (one LED Sequin) per pin.

That's not such a terrible limit though. 3mA from a microcontroller pin can control a transistor like the PN2222:

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

which, in turn, will control about 300mA of power to a group of LEDs. A single microcontroller pin can also control a dozen or so power mosfets:

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

each of which could run 10,000 to 15,000 LEDs (but would require a huge power supply).

You also have the option to use devices like the MCP23107 GPIO expander:

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

It has 16 GPIO pins, each of which can deliver about 20mA, and all of them can be controled through an I2C connection. Better yet, you can connect up to 8 MCP23107s to the same I2C bus, for a total of 128 GPIO pins controlled by two pins (SDA and SCL) from a microcontroller.

User avatar
TheRageTater
 
Posts: 2
Joined: Sun Mar 14, 2021 2:03 am

Re: Need help getting a lighting project off the ground!

Post by TheRageTater »

adafruit_support_mike wrote:
TheRageTater wrote:I read you can basically chain 5 of them without worry
Point of vocabulary: in electronics, 'chain' usually means 'put devices in series'.. the tail of one connects to the head of the next.

Multiple LED Sequins work in parallel: all the heads are connected together, and all of the tails are connected together.

The 'connect 5' idea involves powering the LED Sequins from a microcontroller pin. Boards like the Arduino Uno can send about 20mA through each GPIO pin, which divides out to 4mA per LED for a set of 5 connected in parallel. If you use something that can deliver more current, like a 200mAh LiPo, you could power hundreds.
TheRageTater wrote:but my issue I'm bumping into is this: what microcontroller to use? does it really matter?
First, you only need a microcontroller if you want to turn the LEDs on and off with a microcontroller. A slide switch would work just as well if you're willing to turn them on and off by hand.

Using a microcontroller is reasonable even if it isn't strictly necessary. You can think of it as a little switch-flipping robot.

Assuming you do want to use a microcontroller, the exact kind doesn't matter too much. The main design questions are how many LEDs you want to control at the same time, how many groups of LEDs you want, and what kind of external circuits you're willing to use.

If you want to control the LEDs directly from the microcontroller pin, you'd want an 8-bit microcontroller like the Arduino Uno's. Those can deliver about 20mA per pin. 32-bit microcontrollers, while having more computing power, are often limited to a maximum of 3mA (one LED Sequin) per pin.

That's not such a terrible limit though. 3mA from a microcontroller pin can control a transistor like the PN2222:

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

which, in turn, will control about 300mA of power to a group of LEDs. A single microcontroller pin can also control a dozen or so power mosfets:

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

each of which could run 10,000 to 15,000 LEDs (but would require a huge power supply).

You also have the option to use devices like the MCP23107 GPIO expander:

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

It has 16 GPIO pins, each of which can deliver about 20mA, and all of them can be controled through an I2C connection. Better yet, you can connect up to 8 MCP23107s to the same I2C bus, for a total of 128 GPIO pins controlled by two pins (SDA and SCL) from a microcontroller.
This has been an insurmountable amount of help. What about my idea with the magnetic connectors? Would that still work here? I'm looking to be able to place in new pieces with LEDs and remove them as easy as possible

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Need help getting a lighting project off the ground!

Post by mikeysklar »

magnetic connectors are reasonable to use for these purposes assuming you are keeping the current within their rating level.

Take a look at the ones we carry to get an idea:

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

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

Return to “Microcontrollers”