First of all I must say that I am new to arduino and circuitry for that matter, but I have researched this matter prior to asking this question. I am attempting to wire the Sparkfun LED Matrix (sparkfun.com/commerce/product_info.php?products_id=682) with two 74HC595 8 bit shift registers(sparkfun.com/commerce/product_info.php?products_id=733) and one Darlington SInk Driver(sparkfun.com/commerce/product_info.php?products_id=312) to an Arduino Duemilanove. I have wired the circuit according to the schematic at tinkerlog.com/2008/08/31/led-matrix-projector/, yet after several rewirings the matrix still does not function. After trying several pieces of code, I have been able to get various LEDs to somewhat randomly light, but not as the code specifies. I believe that I have the Matrix itself and the sink driver connected correctly to the arduino, and I believe that the shift register connections are wired incorrectly. I have reviewed the schematic as well as the data sheets for the shift registers to no avail. Any assistance would be greatly appreciated.
Just had a look at it and it is a really poor circuit because it can't provide enough current for the LEDs. The shift registers can only safely supply 40mA and that is not enough if many LEDs are on at the same time.
However to test it out, remove the shift registers and connect one of the resistors to +5V. Then you should be able to control a row with inputs to the darlingtons. Then remove the darlington and connect one of the darlington outputs to ground, leave the others floating (not connected) replace the lower shift register (IC2) and clock in a one and load it each time separated by a long delay. You should see a column grow on the display with each clock. that will test out one shift register, now put the other one back and see if you can get all 16 LEDs lit up. If you want to see how to do a real LED matrix then see:- http://www.thebox.myzen.co.uk/Hardware/Econo_Monome.html Here you have replaced the 74LS42 with your shift register but otherwise it is the same idea.
Edit Sorry looking back at this it is a bit hard core, please ask again if you want it a bit more pedestrian. :)
Well,I believe that I have the shift registers more or less attached correctly(still according to the original circuit). Yet only the first column lights up fully. All of the other columns are barely on if at all, yet if i connect all 8 of the column wires in the same place as the first(pin 18 of the darlington driver or simply to arduino digital pin 11,12, or 13), they all light up equally. Why would this be? Also, I read the page you suggested and I am confused about what is different/better about that circuit.
Also I tried removing the shift registers and connecting 5v to various of the resistors but that produced nothing.
Finally, what would be a good bit of code to test all of this?
UPDATE So I tried that again with some different code and this time I do get a result but it is only individual LEDS.it seems as if the darlington driver may not be set up correctly.
I am confused about what is different/better about that circuit.
Different - I use a 74LS42 multiplexer in place of a shift register
Better - I use P-channel FETs to supply the current for the rows. That way the LEDs can be at full brightness.
Start with just one row and connect it to 5V.
Now write some code to simply output a blinking light on one of the darlingtons. You should see just one LED blinking.
Then extend this so two and then three are blinking (maybe at different rates) and eventually for the whole row.
Change the row connected to 5V and the row blinking should change.
Now wire up the shift register and write code to just put one of the rows on. That is clock in all zeros and just one one. Each time this is clocked and the latches loaded you should see a different row come on.
When you have reached this stage you can then speed things up to make it look like all the LEDs are on at the same time.
It would help if you could post the code (use the hash icon and paste between the brackets) so I could have a look at what it is trying to do as it is not quite clear from the links
Never mind. I figured out the necessary wiring for the project and part of the problem was a bad breadboard. Thanks for all the help. And if anyone needs a schematic for the LED matrix I can provide one. Just send me a message.
What P-channel FETs do you recommend for that purpose, Mike?
The ones I’ve been finding at my favorite surplus dealers all seem to be high-voltage ones that really want at least 8-10V of Vgs to be happy.
I may have have to (shudder) buy from Mouser or Digi-key, but I’m not sure what to shop for.
I just used what I could get in my Monomes but a search of Farnell reviles lots:-
If you are asked to sort them it the gate voltage at which Ron is measured that is the key parameter. However for such low currents (by FET standards) usually means they are in surface mount packages.
Thanks, Mike: that was a big help.
I found a couple that are good for about an Amp, modestly priced (25-30 cents if you buy a dozen or two) at Mouser and Digi-Key, in SOT-23 packages (not through-hole, but manageable even for oldpharts like me).
They’re both from On Semi: NTS2101PT1G and NTR1P02LT1G. The first one costs a few cents more, but probably worth it for many tinkerers, because it has half the RDSon, so there’s less heat to dissipate from a package that may not be mounted in a way that provides good heat sinking.
Hello again. So the shift registers are up and working great, but I can't seem to figure out the darlington driver. First of all im not sure why, but only pin 13 on the Arduino gives out full brightness no matter which cable is connected. Do i need an external power source or something??? (BTW the ground wire is connected to pin 9 on the driver right? do i need to connect power to pin 10 on the driver?)
do i need to connect power to pin 10 on the driver?)
No that only connects the flyback diodes to the supply. This would be useful if you were switching inductive loads but not for LEDs.
First of all im not sure why, but only pin 13 on the Arduino gives out full brightness
That is a curious statement as that pin has a 1K series resistor and LED attached so that is the one that normally gives people trouble.
Hey, I'm learning all the time. I forgot to use pinMode to set the rows to output.(Wups). Thanks for all the help Grumpy_Mike. I think everything is in order now.
Just had a look at it and it is a really poor circuit because it can’t provide enough current for the LEDs. The shift registers can only safely supply 40mA and that is not enough if many LEDs are on at the same time.
But when the display is scanned on the rows as intended, it doesn’t matter because only one row (and therefore only one LED per shift register output) is active at a time. If you were using the shift registers to scan the columns, then it’d be a problem, but that’s not what the circuit is intended to do.