Pages: [1] 2 3   Go Down
Author Topic: 5x7 LED Matrix Issue  (Read 3967 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello!

I am fairly new to the Arduino community so I apologize if this question seems obvious..

I bought a 5x7 Led Matrix from the store where they told me it was the anode version. I have tried to get it working but all i get are results of the board flashing or turning on all the LEDs and never the specific chosen ones. I have followed ALL 4 tutorials I could find online but all warrant the same result.

Please help me smiley

LED MATRIX MODEL:    TC20-11EWA
Logged

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

Quote
I have followed ALL 4 tutorials I could find online but all warrant the same result.
Sadly we do not have access to your computer and so have no idea what these tutorials are that you have followed.

Also we don't know how you have wired it up. If like the tutorial then we would need a picture.

There are a lot of rubbish tutorials out there, some don't even use resistors, they can damage your arduino.
Logged

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

http://www.local-guru.net/blog/2009/04/03/5x7-led-matrix-on-my-arduino

I followed this tutorial specifically.
My arduino was wired per the instructions on that website

Also thank you for replying so quickly smiley
Logged

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

He said:-
Quote
i use the led matrix without any other parts as shown in the arduino playground
That is one of the bad tutorials that can damage your arduino because there are no current limiting resistors in line with the LED. The lack of resistors won't stop it appearing to work though it will just do the damage. Note on the arduino page hey do mention that.

So it looks like you have not identified the wires into your matrix correctly. What have you done to ensure that the anodes and cathodes are what you think they are?

Exactly what did you see when you ran the code?
Logged

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

I looked up the pin out on the matrix datasheet. I matched what the tutorial said.. e.g. Arduino pin 2 to Matrix pin 9

The result after uploading the code it looked like all the LEDs were just refreshing on and off if that makes sense?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 544
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

These?
http://www.kingbright.com/manager/upload/pdf/TC20-11SYKWA(Ver1292470838.7)
So presumably you are driving the 7 anodes from something with current limit resistors, and sinking the 5 cathodes one at a time to turn on one column at a time?
Or are you  driving only 1 anode high and only 1 cathode low at a time for much slower multiplexing?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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

It is this one ---> (http://www.kingbrightusa.com/images/catalog/SPEC/tc20-11ewa.pdf)

I am trying to drive each LED independently so I would be able to make a letter or number.

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 544
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, one common way to tdo that is to drive all 5 anode hi or low, and pull one cathode, then repeat that for the next 4 columns quickly.
You will define some fonts, Imagine the letter A as a 7 tall x5 wide array with 1 = LED on and 0 = LED off:

1 1 1 1 1
1 0 0 0 1
1 0 0 0 1
1 1 1 1 1
1 0 0 0 1
1 0 0 0 1
1 0 0 0 1

So assuming an unused 8th bit that is always 0, each column could be represented as
01111111 = 0x7f
01001000 = 0x48
01001000 = 0x48
01001000 = 0x48
01111111 = 0x7f

So now you write some code that sends out a byte of data and 1 cathode control bit every 1mS:
Code:
void loop(){

// column 1
if (1mS elapsed){
all cathodes off
write anodes with 0x7x
turn on cathode 1
}

// column 2
if (1mS elapsed){
all cathodes off
write anodes with 0x48
turn on cathode 2
}

// column 3
if (1mS elapsed){
all cathodes off
write anodes with 0x48
turn on cathode 3
}

// column 4
if (1mS elapsed){
all cathodes off
write anodes with 0x48
turn on cathode 4
}

// column 5
if (1mS elapsed){
all cathodes off
write anodes with 0x7x
turn on cathode 5
}
} // end loop

Can you follow that?  You are the driving the LEDs for a column at a time, and using persistence of vision to make the eye think any LED can be on at any  time.
You can see how this would fit nicely into a loop, then expand from there to have the fonts predefined in an array where you would call up the letter/number in question, then expand from there to have say 3 letters in a 15 byte array and roll along to pick 5 bytes from that array for display (0-4, 1-5, 2-6, 3-7, 4-8, etc) to give the impression of scrolling text, and put new bytes in as needed to go thru your message...

Here's a video of my 8x32 display doing similar:

http://youtu.be/hwYqgyMc5S4

Scroll test of 8x32 LED matrix. Can hold up to 233 characters in SRAM. Will be ~40 more once I push 5x8 fonts out to PROGMEM.


Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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

Really cool! thanks

could you just explain how i would wire up my matrix board to my arduino?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 544
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

7 arduino pins with 220 ohm current limit resistors to the 7 anode pins.
5 arduino pins to 5 inputs on ULN2003A, 5 outputs to 5 cathode pins. Gnd to Gnd, COM is not connected.
Driving ULN2003 input high makes the output go low - only drive 1 input high at a time.
« Last Edit: October 22, 2012, 02:55:37 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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

Quote
I am trying to drive each LED independently
No you should not be doing. The point is that you have some memory that contains the bit pattern, then you apply that memory to the hardware. The code that does the refreshing does not change no matter what you display.
Read this:-
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html
Logged

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

is this correct?


* Untitled Sketch_bb.jpg (1107.84 KB, 1815x1440 - viewed 97 times.)
Logged

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

Quote
is this correct?
No.
The ULN2003 is wired up all wrong. The outputs should go to the matrix not the inputs, the ground should go to pin 8 not pin 10.
Logged

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

could you explain why the matrix is wired incorrectly? which way should it be?
Logged

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

Quote
could you explain why the matrix is wired incorrectly?
No I said the ULN2003 is wired up all wrong not the matrix.
I also said that:-
Quote
The outputs should go to the matrix not the inputs, the ground should go to pin 8 not pin 10.
That is the outputs of the ULN2003 should be wired up to the LED matrix not the inputs of the ULN2003 to the matrix.
You should connect pin 8 of the ULN2003 to ground, you have connected it to pin 10.
Logged

Pages: [1] 2 3   Go Up
Jump to: