How to control many LEDs in a single Arduino port?

Hello,

I wanna know how I can to control many LEDs in a single Arduino port? I'm using Arduino Nano.

My idea is to do as in the picture attached, but don't have any idea of programming.

Someone could please help me?

Thank you

Picture?

Publication Updated

A single Arduino port is limited in voltage and current. It may be possible to do what you requested, but without the attachment it is impossible.

Furthermore, how do you expect to use an Arduino if you have no idea of programming? You had better learn, and it is best to learn on a simple project, one that you can handle mostly by yourself.

It is bad form to change an existing posting. It makes a mess of whatever follows. It would have been better to repeat the posting WITH an attachment, rather than modifying an existing posting.

I'm create a new post updated!

You wrote that you want to control many LEDs from a SINGLE Arduino port. A single Arduino port has 8 outputs, and the picture you attached uses 9. This is not going to work.

However, you could make this work with TWO Arduino ports. It is still a little tricky since the LEDs and the resistors are unspecified, but there are possibilities. However, it requires programming.

Furthermore, the attached picture just goes off the page, so perhaps there is more that I am not understanding.

Are you asking us to program for you? I am sure that someone will do so for a negotiated fee, but they probably won't do your homework for you. Learning to program takes effort.

vaj4088,

I thank you for your comments.

Not my homework, is a personal project of mine who was just yesterday talking to my college professor and I made this drawing to explain to him what I wanted.
I fully understand that programming takes time to learn and my intention at this point is just to know where to start in the program because the physical logic I already have, I don't want someone to do my job, I just want someone to help me with a start I don't know how to start!

Anyway thank everyone's attention and I apologize if hinted that I would like someone to do my job.

Hello,

If you want to control many LEDs with a single Arduino ( Uno ) it would be best to read up on Shift Registers...the 74HC595 has come in handy for me and only uses 3 pins on the Uno. Also if you plan on using multiple inputs such as buttons, switches etc... you will need 74HC165...and also depending on what your application calls for will depend on what type of shift registers you end up using. Just my two cents.

I built this.

See those chips? They are shift registers. Each holds 8 bits of data. The trick is that you can push those bits in one by one. The second trick is that you can chain any number of those chips together. So I control 32 LEDs with two wires (data and clock) and 2 wires for power. There is also a "reset" line, but I don't really need it.

My code takes a 32-bit long and pushes the bits in in the correct sequence to get them onto the LEDs in the order I want. The sequence is forced on me by the physical space I had to solder in all that ribbon cable - but I only need to write the code once.

Only issue is that the LEDs flicker just a tiny bit as the data gets pushed in, and it's noticeable if you are updating frequently (my test app just blatts millis() out to the LEDs). So my next version will have latches :slight_smile: .

Oh sure, I could have just bought a thing that already does this - but that's not the point, is it?

I suggest that you start slowly. Try using just D1 (and its associated resistor), C1, and L1. C1 has 3 state possibilties (Low, High, and High-Z as an input), and so does L1 for a total of 9 possibilities. One of these will light an LED, one of these may damage/destroy an LED (depends upon the reverse voltage rating of the LED), and 7 will have no apparent effect.

Start there. The program is simple. If you can't make it work, show us the program.

Then move on to 2 LEDs: D1, D2 and their associated resistors, C1, C2, and L1. This is a slightly more complex program. If you can't make it work, show us the program.

Then move on to 2 LEDs a different way: D1, D6 and their associated resistors, C1, L1 and L2. This too is a slightly more complex program compared to the first one. If you can't make it work, show us the program.

Now you are ready for 4 LEDs: D1, D2, D6, D7 and their associated resistors, C1, C2, L1, and L2. Even more complex so, if you can't make it work, show us the program.

At this point you are perhaps ready to tackle all 20 LEDs.

Good Luck!

(By the way, you can also make this work with shift registers. It is more parts but fewer pins.)

Depending whether time is of the essence or whether you have a drop dead date to have this working, and considering the value and amount of time you will be investing, you might also want to consider the MAX6960. It is a bit pricey at $20-$25, but it might be another approach to consider, depending on how many LED's you wish to control.

Maxim chip price and datasheet

I also ran a Google search with the "how to control a led matrix" keywords and got many results.
This might provide you with different point of view as to how to achieve your project ....

  • dan

Duplicate post deleted.

DO NOT CROSS-POST, CROSS-POSTING WASTES TIME.

MAX7219. Wire up the LEDs in groups of 8 with a common cathode.
All anode0s get connected, all anode1s, etc. thru anode7.
MAX7219 is easy to use, it handles the multiplexing, you just need to write data to a register for each group of 8 LEDs.
8 registers, 8 groups, up to 64 LEDs controllable.