Arduino Mega and 60 leds

My goal is to have 60 5mm leds in a circle and have them go on sequentially ,staying lit for one full minute and then turning off and cycling to the next one.

The Arduino Mega has 54 pins so I need to add a multiplexer or a shift register for the addional six. I have no experience with either but am willing to dig through the weeds to figure it out.

I would just like to start off in the right direction to hopefully make it easier, Thanks.

Make your project much easier by using addressable LEDs such as WS2812. Each LED is individually controllable and all from a single pin

1 Like

Consider the addressable WS2812 leds

1 Like

Did you include the 16 analog pins, that can be used also for digital output?

1 Like

I have done that already and made a clock with a meter length of that stuff.

This should not be hard but I guess I will just have to see what works, ChatGPt suggested a 74HC139, which is a 2-to-4 demultiplexer...?

Okay, please take the whole design to ChatGPT. Ask it for a schematic.

2 Likes

Thanks I'll try that

If you use 60 pins, keep the total current low. 10k limiting resistors and super-efficient LEDs.

You did not ask the right question.

The 74HC595 is a common shift register for LEDs, or the TIPC6B595 if you need more current, but the addressable LEDs suggested before are generally a simpler choice. Either way, the Mega is not needed, a Nano/UNO can easily drive that many LEDs with shift registers/addressable LEDs.

it is only turning on one 5mm at a time current is a non issue I would think?

Ehh. What about the total current when all 60 LEDs are activated? I feel it would be too much unless they run at a very low current.

Please pause and post all the details. That fact should have been in the first post.

It was in the first sentence of my post,,,turning one on at a time and then cycling in order down the line each one on for a minute

If you are certain you only ever need one LED on at a time, then a common resistor could be used for all the LEDs. That way, if they all get turned on the current will not be excessive.

With only a single LED at a time, you can also wire them as a grid and only need 16 outputs (for an 8x8 grid).

1 Like

Thanks that sounds like the direction I was searcing for, format like a grid

Yes, a matrix is perfect and I have a kit that does that for the 60 LEDs... 8x8 gives you 64 with 4 spares.

In your case, you don't even need real time multiplexing, just set and forget logic.

1 Like

It's much easier to wire, too... :slight_smile:

1 Like

But, if course, nowhere as easy as addressable LEDs

1 Like

... and, available in circular sectors.

1 Like

No worries.
ChatGPT will know that you can't power 60 LEDs at full brightness from a processor.
Leo..

1 Like