Hi I have some problems with controlling a MAX7219 powered RGB matrix from my arudino
(sorry about that, needed one post before I could post links..)
Hi
I've been trying to get my arduino duemillanove to work with a MAX7219 led driver, unfortunatelly without luck!.
The RGB matrix comes from Seeed studio.
The code I've been using is from this arduino playground article :
Arduino Playground - Max7219. I have connected the LOAD, DATA and CLOCK exactly as specified in the tutorial. The matrix is powered by the arduino (+5v) and ISET is connected with a 1k OHm resistor.
Here's an image of my wiring, the RED, GREEN and BLUE lines is just to show how the rgb matrix is wired internally. So far I have only connected the BLUE leds of the matrix to 1 MAX7219. I'm planning to cascade more IC's but I need to get one to work first. Perhaps something is wrong with my wiring?
I have tested the MATRIX manually (+3v to color pins and 0v to columns) and all the leds seem to work properly. I have even tested with another MAX7219, but the matrix remains black. The only modification I've made to the code is to set maxInUse=1 and uncommented this:
maxSingle(1,1); // + - - - - - - -
maxSingle(2,2); // - + - - - - - -
maxSingle(3,4); // - - + - - - - -
maxSingle(4,8); // - - - + - - - -
maxSingle(5,16); // - - - - + - - -
maxSingle(6,32); // - - - - - + - -
maxSingle(7,64); // - - - - - - + -
maxSingle(8,128); // - - - - - - - +
I hope to get some help on this, I've been fiddeling with this for a long time with no luck.. not even 1 led lighting up :).
Thanks!.
It looks to me like the display you bought is a common anode.
Is this your display?
http://www.seeedstudio.com/depot/60mm-square-88-led-matrix-super-bright-rgb-p-113.html
The MAX7219 is designed to drive common cathode displays.
In addition, I don't know of anyone getting a 3 color matrix to work with a MAX7219, though it may be possible. (I've only gotten 2 color common cathode matrixes to work with no problems -Arduino Playground - MultiplexMAX72xx)
You might want to look into other ways to drive that display.
BTW, how did you calculate the value of Iset? Seems low. (I used 22K)
Hi
Im only a beginer & used LEDControl library but noticed 2 things.
In the image above at the top of the max chip you are using data out, should that be data in? could just be a mistake in the image.
Also i tested my max chip with a single colour green matrix & iSet required a resistor of 27k so 1k seems a little too low, LEDs were 2v,20mA.
Bro beat me to it ;D
Thanks for replying.
I discovered a bug in my design, LOL. When I was testing the RGB Matrix to figure out how it was wired, I had switched the red and blue wire on my power source :). ;D So the wires going from segDP-segG sould go from dig0-dig7 instead.
Now the matrix lit up!. Unfortunatelly only some of the leds worked. 1/2 of the columns worked and approx. 1/3 of the rows lit up, any ideas?. (I tested all the leds manually and they all work).
Do you have any suggestions as to how I could drive the display?
Originally I used a 20kohm resistor, based on calculations from this site (http://www.hebeiltd.com.cn/?p=zz.led.resistor.calculator) but when none of the leds worked, I tried to juice it up a little to see if that would work..
Read your datasheet for your matrix. (If you don't find a datasheet at your vendor, google for the word "datasheet" and whatever numbers you see printed on the side of the part, exactly as shown.)
Most LEDs I've seen are fine in the neighborhood of 220 ohms for a 5V potential. Use a 1.0K if you're not sure, but 20K ohms is almost certainly way too limiting to see the matrix at all.
The matrix I have uses red LEDs that are safe at 220 ohms but are just too bright in balance so I have specified 330 ohms instead.
halley,
The resistor we have been discussing (Iset) is not used is series with each LED. It is a single resistor that sets the current for all LEDs in the matrix. As such, there is not a 1:1 relationship to the values that you normally use for current limiting. 22K - 27K are nominal values for Iset.
Thanks, BroHogan. I missed that. It's the internal reference for each of the constant-current gates.
@ Desibel
Have you got the datasheet for the max chip?
It has a table that shows what value resistor to use for Iset based on the current of the LEDs.
Also i seem to remember that the pins on my matrix were not in any logical order & different to the datasheet so had to make a note of what pins were ground/positive & for which LED, maybe just check that some are not reversed.(guessing)
The RGB Led matrix from seeed studio is a common anode type matrix, and cannot be driven by a max7219 chip.( thanks to BroHogan). I should have read the datasheet properly first.
Do you know of a common anode led driver I can use to control the common anode led matrix from the arduino?. Or perhaps where I can get a common cathode led matrix?. sparkfun has a RGB matrix, but I think it's too expensive.