Go Down

Topic: 4x4 LED matrix problem (Read 1 time) previous topic - next topic

lookit

Hi,
I'm completely new at this sort of thing, so bear with me, plz.

I'm trying to make a 4x4 LED matrix. I've soldered the anodes together in columns, and the cathodes in rows. (I'm not sure whether this is the standard way to do it, but i thought that this way, I can make any individual LED light up.)

I'd like to use my arduino uno to control it, blinkenlights style, but I've never really gotten around to familiarizing myself with it since I got it. I don't intend to make it do anything in particular, so just making them blink would suffice, I can probably tweak it from there. (maybe I'll do some kind of animation with elementary row transformations of only ones and zeros, for any linear algebra people reading.)

Anywhoo, I've read around, but mostly just confusing myself. Any pointers code-wise? How do I connect the wires running from every row/column to the arduino? Have I messed up and need to start over?

THANKS, people.

Grumpy_Mike

Take a look at this for how a matrix works:-
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html
Generally you don't want one LED to light up at once but a whole row.

lookit

thanks a bunch, that link was great. problem solved.

I made one small 5x5 LED, using 2x 74hc164 only, also using them for the sinks.

It's not a problem at 2.4 volts (2x AA batteries), I have it running all day scrolling a text.
Except there is a little ghosting, all the LEDs will always be on a bit.

You really don't need any extra parts. And the LEDs also don't burn out immediately at 5 volts.
I doubt they get any damage, but 2.4 volts is just at the margin of the threshhold voltage for yellow LEDs. AA NiMH batteries are good in that matter they remain at this voltage for most of the charge.

I even made one other circuit where I drive + sink the LEDs directly (also 5x5), having 5 2.2 KOhms resistors. Then the brightness was so low, I installed a bypass (LCX244 octal buffer) + a small switch.
You can drive high efficiency LEDs directly from your Arduino, no problem, if you use resistors for each column.

There is a lot of explanation in the linked tutorial webpage, but my opinion is that the tutorial is by no means exhaustive.

I could even give you advice which LEDs to buy!

Back about...well maybe 2007, I made a 16 bits random number generator, and used 2 shift registers to drive 16 LEDs individually, no multiplex.

Really if you can tolerate some brightness loss, use maybe 330 or 470 Ohms for each column, and drive directly from the Arduino. If you get your code working, you can also improve the matrix.

The random number bits on the matrix were quite cool however I don't have this circuit board anymore.
I also have PIC related web domain.

Grumpy_Mike

Quote
but my opinion is that the tutorial is by no means exhaustive.

Yes it wasn't designed to be.

It was designed to be informative not a hand holding exercise where a beginner could just go through the motions and not understand anything. There are plenty of those around, this was supposed to make you think.

These CMOS cookbooks were full of schematics and explanation, there wasn't any step-by-step guide. That was what people used before the days of the internet, as a starting point.

In college it was just boring and unfortunate, spending many months elaborating the differences between TTL families, never really had one single project or experiment, just weird assignments, with even weirder* questions. We had to maintain a journal, by applying cut&paste with the sheets that were handout.

This stuff is so irrelevant now.

But reading this CMOS book really was a good helping. I only knew this TTL stuff from college, but using the book, I designed a circuit with more than 20 chips (the circuit wasn't in the book), and it really worked!

*they weren't really weird, just irrelevant a bit. We also learned to program PALs and stuff like that.

I mean it would be more interesting to hand out a stack of these logic chips, and tell the students: "Now, please design some interesting and useful circuit using these chips".
I also have PIC related web domain.

Grumpy_Mike

Quote
I mean it would be more interesting to hand out a stack of these logic chips, and tell the students: "Now, please design some interesting and useful circuit using these chips".

No students never did have the imagination or more importantly the skill to do this. Even 30 Years ago when students were good, let alone today when the obsession with 50% of the population being graduates force the standards way too low.

Go Up