Pages: [1]   Go Down
Author Topic: Led matrix  (Read 1896 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to drive a led matrix 8X8 with a MAX7219, I put the code and save to my arduino uno, but the code runs for 1 second and all the lights go out, and they don't light up anymore. No matter the code I put, the code runs for 1 second and it all goes out. Help me clarify what's goin' on. Does anyone has any idea?
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Does anyone has any idea?

Without seeing your schematic or code? How would we?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Like I said, no matter what code I put, but I was trying to run a code from the book beginning arduino chap 21 that teaches how to drive a led display with the max 7219. Ant it starts to run, then stops. Everything stops, I thought could be some problem with the chip or with the arduino. Sometimes the code runs for one minute and it all stops all of a sudden.
Logged

Tucson, AZ
Offline Offline
Sr. Member
****
Karma: 8
Posts: 317
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Based on the data that you have given us to crunch, I would have to postulate that solar flares are the cause.
Logged

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Like I said, no matter what code I put, but I was trying to run a code from the book beginning arduino chap 21 that teaches how to drive a led display with the max 7219.

If you typed this code in yourself, perhaps you made an error while entering it into the IDE.  I know from personal experience, it's not uncommon to look at text (either computer code or normal documents) while you are typing and read what you intended to be there, instead of what really is.  Just cut and and paste the entire sketch to the forums inside of code tags (see the little button with "#" on it?) and it will allow other people to proof-read your code.  
Logged

Danger Boy
Offline Offline
Edison Member
*
Karma: 14
Posts: 1108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have the two capacitors despiking the power line as recommended in the datasheet?  What is the resistor value for your single current limiting resistor?  Maybe that is off.  Hit it with a multimeter if you have one to be sure.

Code:
                LED Forward Voltage
           1.5V   2.0V   2.5V   3.0V   3.5V
For 40mA   12.2kΩ 11.8kΩ 11.0kΩ 10.6kΩ 9.69kΩ
For 30mA   17.8kΩ 17.1kΩ 15.8kΩ 15.0kΩ 14.0kΩ
For 20mA   29.8kΩ 28.0kΩ 25.9kΩ 24.5kΩ 22.6kΩ
For 10mA   66.7kΩ 63.7kΩ 59.3kΩ 55.4kΩ 51.2kΩ
Logged

I have only come here seeking knowledge. Things they would not teach me of in college.

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I didn't put the capacitors, because it said it's not mandatory. I will buy the capacitors and try again. I attached the code of the book. I tried to modify the text in there and sometimes it runs well, depending on the text that's written. I guess there's something with the code, trying to figure out what...

* dot_matrix_lnk.ino (11.42 KB - downloaded 16 times.)
Logged

Danger Boy
Offline Offline
Edison Member
*
Karma: 14
Posts: 1108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I didn't put the capacitors, because it said it's not mandatory. I will buy the capacitors and try again. I attached the code of the book. I tried to modify the text in there and sometimes it runs well, depending on the text that's written. I guess there's something with the code, trying to figure out what...

I was more worried about the resistor values.  Because what you said sounded like it started up and then stopped.  So I wonder if there is an overcurrent protection circuit or something that was kicking in because of a too-low resistor value allowing too much current to flow.  What is your resistor value?
Logged

I have only come here seeking knowledge. Things they would not teach me of in college.

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My resistor value in the iset is 10K
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2575
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If it works with come characters and not others it is probably over current try changing this line intensity(15); to intensity(1); the leds will be very dim but if it does work with all characters then you need to increase IREF value and/or improve power supply.
Logged


USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I didn't put the capacitors, because it said it's not mandatory. I will buy the capacitors and try again. I attached the code of the book. I tried to modify the text in there and sometimes it runs well, depending on the text that's written. I guess there's something with the code, trying to figure out what...

Thanks for posting the actual code.  I've briefly looked through it and didn't notice anything that would cause the problems you describe.  However, while going through the datasheet for the MAX7219 I noticed it has a shutdown mode that blanks the display to save power.  You should look at page 6 & 7 and make sure that the data being sent isn't accidientally causing the MAX7219 to enter this mode (again I didn't see any indication it would from what you posted, but this possibility should be eliminated). 

Adding the capacitors certainly won't hurt, and might improve things.  I also think Riva's suggestion about reducing the intensity setting is probably the next line of inquire you should try.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Led 8x8 is very easy only for children smiley-sleep
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's probably lack of capacitors. The first time I hooked up a MAX7219 I had the exact same problem. They're pretty sensitive and when they reset they turn everything off.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Pages: [1]   Go Up
Jump to: