(after I deleted this same post from "Software Interfacing" :-[ )
Hello!
Ive been able to scrap out a 5x5 matrix from an old toddler toy I found at a local thrift store. I also just received my Arduino 2009 at the end of last week.
Since it's been quite some time since I played in small electronics, I have a few questions:
( The Matrix has no readable part numbers/etc as it was filled in the back with a epoxy type substance which is likely due to childproofing concerns.)
the power supply for the toy was 3 AAA batteries. Can this be driven with the 5v Supply?
The 5x5 matrix has a total of 10 pins, (5 on the left, 5 on the right) and I have identified the set of pins which are the Cathodes, as they had small surface mounted resistors attached. What size resistors (couldnt tell from the surface mount) should I look into getting to play around with this matrix?
Can the Charlieplexing theory be applied to this matrix so that I can drive the entire thing without any added hardware?
what are the possible implications of attaching this matrix without the resistors? Im stoked to have it, yet have no resistors accessable tonight.
I'm a bit of a newbie myself but I'll give you some input nonetheless:
Yep, as long as you've got the correct resistors (http://mikmo.dk/misc/led_hook_up.pdf) ...however if I were you, I'd fill the powerpack of the toy with the 3 AAA batteries and then on the output of the battery pack, measure how many volts you're getting. It'll either be 4.5 (more voltage, same amp hours) or 1.5 (same voltage, more amp hours).
As per question 2, depends on your power supply but by the sounds of it, you've got 5 rows of 5 LEDs in series (see the PDF above). Otherwise I'd assume you'd have 25 pins. Can't measure the SMD resistor with your multimeter?
At any rate, let's assume you have a 5v power supply. You've got 5 LEDs. If they're 1V LEDs, you wouldn't need a resistor. If they're 500mV LEDs, you'd go....(5V - (5 * 0.5)) / Current. Current is an unknown, but even if they were tiny and only drew 0.01A...you'd need about a 250Ohm resistor. Start with something too big and come back from there until it gets reasonably bright but not too bright. You'll have to make an educated guess unfortunately.
Charlieplexing could be applied, and maybe it is wired up like that. It's probably a bit late for you now, it's already made and hermetically sealed. You'll find out soon enough.
Depends on how many volts they require. Got any other loose LEDs lying around? You could stick another 2 or 3 in series behind it to steal some more current. Same theory as described in 2.
I may not be 100% correct on some of this, just trying to give you some thoughts. Some other bright sparks here will re correct any of my whoopsies
Long time since any said I was bright, but this is my 1,000 th posting.
If they're 1V LEDs, you wouldn't need a resistor.
you ALWAYS need a resistor (or some other current limiting device) with and LED. Even if you have LEDs in series (which you don't have here) the voltage / current curve goes through the roof once an LED turns on. By the way the LED turn on voltage is a consequence of the semiconductor material used to make it. This is normally 1.7V for red and about 2V for other colours, white can be up to 4V.
I am not convinced that a 5 by 5 LED can be driven using charliplexing but I haven't looked into it. But to control individual LEDs you will need to multiplex it.
The problem with driving a matrix directly is that all the LED current for one column has to be sourced from the row driver. So with 40mA max current per output you will have to select a resistor that supplied 40 / 5 = 8mA. This is not so bright (unlike my spark apparently) but it will be visible. The best bet would be to use a driver, transistor or darlington drivers for the rows, the columns can be sunk directly as only one LED will be on at a time. In that way you could increase the LED to the normal 20mA.
Search the playground for LED multiplexing examples.
Congrats on the 1000th post. And what a post it was!
Okay, I just read that PDF again. I was about to ask, what resistor do you use if you had a 6V power supply and 3 x 2V LEDs in series. But then it says (which I didn't notice previously)..."this should not exceed 80 percent of the supply voltage".
Even if you have LEDs in series (which you don't have here)
Whoops. I now realise that the 5 pins each side allows you to access each LED individually with multiplexing. Thinking back, I can't even see how I got that part wrong. Tsk tsk tsk.
Looking at Grumpy_mike's response, the only question I have left is whether or not I should just wait on the MAX7219 I have coming and try to drive it with that (even though it's for an 8x8 -- cant find a 5X5 Driver) or should I try and source a resistor, direct driving the 5x5 like the 8x8 matrix example in the playground? (The resistor on the board the matrix WAS hooked to was 221ohms )
sigh I wish I still had the box of junk laying around I used to have, if I did, finding a simple set of resistors wouldnt be this difficult.
It appears Im not gonna be playing with this thing for a while :-/
the only question I have left is whether or not I should just wait on the MAX7219
Well I would try running it directly as adding the MAX chip only introduces another layer of things to go wrong and doing the multiplexing yourself will be instructive even if you leave it to a chip to do later on.
The 8X8 example is a good one to follow and will scale down nicely, in fact the software will work as is and then you can test your understanding on trimming out the stuff you don't need.
I am not sure what country you are in but many places offer a mixed bag of components (or lucky dip) to get you started. I recommend getting one of those as the basis of your junk box.
I'm in the US, more specifically Virginia... a little town with almost 0 resources for component level things....
being as the board it WAS plugged into (which I ultimately destroyed in my excitement, however I believe now to have been a serial controller board which I should have tried to salvage as well) had 221 ohm resistors on one side (which I believe to be the cathode) and 222 ohm resistors on the other(which I believe to be the annode) should I attempt to reconstruct these values, or should I base it off of my driving voltage of 5v with 40mA max?
I guess the hardest part Im having is not knowing the rating on the LEDs... I would ASSUME the typical 3.3v white LEDs are contained, however Im unsure, as I am Still quite unsure of the maximum potential voltage of 3 AAA (1.2v) batteries as a supply. (And knowing pullup resistors could be used to increase the potential to a level higher than that which would be supplied)
I read somewhere that simply having ANY resistor in line (within reason) would be sufficient, but this kind of blanket statment concerns me
I would ASSUME the typical 3.3v white LEDs are contained,
I would have thought they were red LEDs, white matrices are expensive. So assume that the LEDs take 2V across them when they are on. For a 5V supply that means you will drop 5 - 2 = 3v across the resistor. The resistor value with 3V across it will give you the current which should be in the 10 to 20mA range.
Any resistor between 100R (ohms) and 1K should be fine.
(And knowing pullup resistors could be used to increase the potential to a level higher than that which would be supplied)
You can't / should not pull up to anything higher than the supply.
awesome. I'll do that. I got it to work by rolling back to version 11, but I will plan to make the changes inside 12 tonight.
Im concerned though, when I went through and changed everything to scale down to my matrix, I get 2 rows by 5 columns lighting up, with 2 of the columns showing some sort of shifting motions.
I have figured out which pins control the row and column, and have been able to move 1/2/3 dots up and around the matrix using that information (which is really neat) but I must be missing somethign on the scaling down from 8x8 to 5x5
So I think I might see where I may have a false thought in my mind.....
I have determined which side of the matrix has the pins for the cathode, and which side is the annode...
My (I think) incorrect assumption was that the pins which determined which row light up were the cathodes, and which column the light was in were all the annodes...
Looking at the diagram for the 8X8 in the playground, this doesnt appear to be the case.
Case in point: Row 1 in the picture says it is controlled via pin 9 on the arduino - which is connected midway through the top pins coming from the matrix.