100 Leds with only Arduino

Hello,

I Always find the solutions for my issues here, but this time I couldn’t, so It’s the first time to post here

I hope I find a solution to my issue. According to my university, I have a project using Arduino UNO and it’s required to make a 10*10 led matrix but only by using Arduino UNO and 100 led and basic gates like or, xor. I searched a lot to find the solution but all videos use different chips to handle the issue of pins number. So I want to know the best way to implement the requirement and how to control each led separately. I will attach a photo of the requirement and you can see it for more details.

Thank you in advance!

|500x94

|500x336

Look up "Charlieplexing".

First off, Thank you for ur reply I don't know this method but I searched it and I think I will find the way to connect the LEDs together, but what about control each led separately? can you explain the idea of the code or giving me a link for it?

which one of the 29800 search results do you want to get explained?

noiasca: which one of the 29800 search results do you want to get explained?

I just want to find a video or something else explaining the concept to be familiar with it and to start implementing it. I found how the connections can be made, but what about controlling the LEDs separately using the code? If there is an easier way please inform me.

Thank you for your understanding and consideration.

According to my university, I have a project using Arduino UNO

So this is a marked assignment and you want us to do it all for you?

We have told you about one technique, and the magic word "charlieplexing".

I just want to find a video or something else explaining the concept

When I was a University Lecturer ( known as a Professor in the US ) then I would have expected a student to do their own research to find out how it works. After all as they say "the answer's out there".

This is your project, you have to put some effort into it. A University project is all about researching and understanding what you find. Oddly enough it is not asking for the exact paper you need to read. Asking for help is one thing, wanting to be spoon fed is another. Please don't cheat.

Thank you for your understanding and consideration.

I think maybe I understand too much for you.

taisonmomen:
First off, Thank you for ur reply
I don’t know this method but I searched it and I think I will find the way to connect the LEDs together, but what about control each led separately? can you explain the idea of the code or giving me a link for it?

OK, so we do this on the main thread, not by way of PMs. :astonished:

Here is the diagram of the Charlieplexed matrix:

The horizontal lines - marked Bn in this diagram - connect to your Arduino pins. If you track it through, making any one LOW and any other one HIGH will - through a resistor - light just one LED. The other lines must not be either HIGH or LOW, they must be set to INPUTs. You can - and should - however light more than one LED by driving more than one line HIGH while a particular line is LOW.

Note that Charlieplexing allows you to drive n(n-1) LEDs with n pins.

The other concept you need to know is display multiplexing.

OK, there’s a whole lot for you to study - and to build your first Charlieplexed matrix to test - I suggest just as many LEDs as shown in this diagram to start with. Use 1k resistors. :grinning:

If you can use basic logic gates, there is nothing to stop you from making a shift register or a multiplexer. Everything that has ever been designed in digital electronics can be made from a collection of NOR gates ( or NAND gates ).

I think that would be the "for extra credit" version!

I did something a little like that way back in Digital Logic and Systems when the homework was to demonstrate a parity and a majority function from five inputs so over the weekend I turned up with the solution on paper using multiple-input gates and EX-ORs as well as an alternative using only 4001s and a home-made PCB implementing the actual exercise with purely the 4001s, five slide switches and two LEDs. (7 resistors)

Of course I still have it in my trophy cupboard though the instructor did borrow it for a few other classes. :grinning:

I think that Charlieplexing is in this case by far the more practical approach. :roll_eyes:

Paul__B:
OK, so we do this on the main thread, not by way of PMs. :astonished:

Here is the diagram of the Charlieplexed matrix:

The horizontal lines - marked Bn in this diagram - connect to your Arduino pins. If you track it through, making any one LOW and any other one HIGH will - through a resistor - light just one LED. The other lines must not be either HIGH or LOW, they must be set to INPUTs. You can - and should - however light more than one LED by driving more than one line HIGH while a particular line is LOW.

Note that Charlieplexing allows you to drive n(n-1) LEDs with n pins.

The other concept you need to know is display multiplexing.

OK, there’s a whole lot for you to study - and to build your first Charlieplexed matrix to test - I suggest just as many LEDs as shown in this diagram to start with. Use 1k resistors. :grinning:

Thank you for ur help :slight_smile:

I will try to use it and still searching for other alternatives. I made a lot of projects or tasks like that but the problem was with switches and I could handle them through using resistance with different values to differentiate between switches. This time, I have the same problem but it is for the output pins, so I posted here. I knew the Arduino this semester only and I’m trying to do my best. :slight_smile:

Grumpy_Mike: If you can use basic logic gates, there is nothing to stop you from making a shift register or a multiplexer. Everything that has ever been designed in digital electronics can be made from a collection of NOR gates ( or NAND gates ).

Thank you for ur reply and consideration :)

Can you kindly tell me how I can handle this If I used the design of the 10*10 LEDs matrix?

Because I tried it before searching for another solution but I found that I had to connect 20 pins while I only have 19 pins :D

Can you kindly tell me how I can handle this If I used the design of the 10*10 LEDs matrix?

You use logic gates to make a couple of 10 bit shift registers with latches and use them in the conventional way to address a matrix. You only need three pins per shift register.

Or you use them to make a latch to give you extra output pins.

Slightly OT, but what is this mania for 'watching videos'? Reading and re-reading a written work is far superior to watching some wannabe TV star waffling on. With written material, one can read and re-read, print excerpts and thoroughly digest it anywhere, even in the bath. It can also be done without irritating everyone else in the room. ;-)

+1 audio out

What’s that for?

[Optional] Voltage source

Optional?

PaulRB: What's that for?

It's required to generate a sound when the user enters any number or press a key for emoji

Optional? [/quote]

yes, someone wants to add it to the design, so the prof added it for the things we can use through the assignment

taisonmomen: It's required to generate a sound when the user enters any number or press a key for emoji

Ah, that requirement wasn't included in the part you shared.

taisonmomen: yes, someone wants to add it to the design, so the prof added it for the things we can use through the assignment

Others wanted to run Arduino and led matrix without a voltage source? They should be at Hogwarts!

What Paul is getting at is that a power supply is never optional. Without one, your project can do nothing.

You could also use strips of WS2812Bs LEDs, then just need 1 IO pin to control them all with the Adafruit Neopixel library, or the Fastled.h library.

But read the original attachments which I displayed in #1.

So you can use the gates to make yourself some shift registers?
Like 100 quad 2-input NAND chips?