Pages: [1]   Go Down
Author Topic: Unstable display with Max7219  (Read 851 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Everyone,

I feel BAD playing with my freeduino and my Max7219 to display graphics on a 8x8 led matrix. I think I got all the wiring ok, but the display is somewhat unstable. You can get a video here:

http://diceinateapot.blogspot.com/2008/12/i-feel-like-busted.html

Basically, what my code does is to light all leds on the display then wait one second, then clear the display, then wait one second and starover. It does not light all the lights, sometime its a line, sometime is only the half of the display... I really don't know what to do with this, but I feel like I BUSTED my IC because I've been wiring it badly the first time I used it. I wanted to know is someone has an idea about this before I give up  :'(

I also tried with other graphics (a dot or a line) but I get the same behavior.

Thanks!

p.s.: code of my program:

Code:
#include "LedControl.h"

// Led matrix
// Create a new LedControl.
  // Pin 2 = DATA IN-pin (1) of MAX7219
  // pin 4 = CLK-pin (13) of MAX7219
  // pin 3 = LOAD-pin(12) of MAX7219      
LedControl gMatrix1 = LedControl(2, 4, 3, 1);

// Setup function
void setup() {
  //wake up the MAX72XX from power-saving mode
   gMatrix1.shutdown(0, false);
   //set a medium brightness for the Leds
   gMatrix1.setIntensity(0, 8);
   gMatrix1.clearDisplay(0);
}

// Main loop function
void loop() {
  
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      gMatrix1.setLed(0,i,j,true);
    }
  }
  
  delay(1000);
  gMatrix1.clearDisplay(0);
  delay(1000);
}
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 505
Posts: 31343
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I haven't used that library so I am not acquainted with it.

However from looking at the video I would say it looks like the basic multiplexing is working because you can't get patterns like that if it's not. Therefore what is probably wrong is the wiring feeding the data to the Max chip, either data or clock.
I never did like bread board because it does produce these sorts of problems. Try placing your hands over the wires and chips and pressing down slightly and see if your movements can affect the pattern you see in any decernable way. In that way you can be sure you have an intermittent joint.

But the good news is I think you chip is OK. smiley
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you add the filter caps shown in this schematic?

http://www.arduino.cc/playground/Main/MAX72XXHardware

I've seen comments from people who say that these chips seem to be sensitive to noise.

I build a scrolling display with 8 of them and I'm still having problems with the last block in the chain occasionally just turning on all of the LED's and getting stuck there until I power it off and back on.
Logged

Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't see anything wrong with your code. (You could try a little delay(5) within your loop, but it should be OK.)

What value are you using for Iset? (~22K?). (Don't see it in vid.)

And yes, 10uF across the power wouldn't be a bad idea.

Post a close up pic of your board if you can.

I'll keep looking  smiley Your very close.  smiley-wink
« Last Edit: December 23, 2008, 02:40:55 pm by BroHogan » Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all, thanks for your quick respones!

Well, I missed the part about the capacitators in the datasheet... actually, don't I think I know how to read a datasheet properly  smiley-grin I'm learning in a raw fashion. I also guess I put the Rset too low (I used a 4k7 resistor). I saw in datasheet and in the doc provided by dogsop that the resistant should be higher than that.

I'm gonna start by fixing those two problems. It will surely help! I'll update this post when I get further improvments smiley-wink Thanks again!

--
BTY here are the pics of my circuit... sorry it looks like a mess since I don't get much space on the board.



--
You get more detailed pictures on the link I provided on the first post if needed.
« Last Edit: December 23, 2008, 03:21:41 pm by Guli » Logged

London, England
Offline Offline
Edison Member
*
Karma: 4
Posts: 1026
Go! Go! Arduinoooo !!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks pretty neat compared to mine !   ;D
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Horray! it seems to work now.  smiley-grin

I added the two capacitators specified in the link provided by dogsop (http://www.arduino.cc/playground/Main/MAX72XXHardware). Also, I changed the RSet value to 20k, my 4k7 was way too low. And I think the main error was due to the resistance value because Itried to remove the capacitators from the circuit and it was functionning ok. I'm leaving the capacitators there anyway, but this was a funny thing I noticed.

So everything is great, thanks everyone for your precious hints!  smiley-wink

David
Logged

London, England
Offline Offline
Edison Member
*
Karma: 4
Posts: 1026
Go! Go! Arduinoooo !!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Where did you get your LED Array from btw? Is it common anode?
Logged

Pages: [1]   Go Up
Jump to: