This display is based on an 9*9 green LED Matrix. The display is driven just with one Arduino board (Duemilanove in my case).
Why do we use a matrix and we don't light's up the leds individually?
Basic :
A led have 2 pin's: anode & cathode.
So even we put the led's with the common cathode, we will still have 81+1 pin's, the arduino board isn't enought for this.
In a matrix we can put the columns to the cathode and the rows to the anode of the Led's, so here we will have just 9+9 pin's, better then the other but a little tricky on the programming stuff.
Remove these ads by
Signing UpStep 1Basics
- 81 green LED's (or other color)
- an test PCB
- and an arduino board
next we need the schematics :
Matrix hardware
I have build the matrix like next :
- the columns have the cathode's of the LED's
- the rows have the anode of the LED's
Arduino Pin's :
Now we will have to connect the matrix to the arduino board :
the rows :
- the row 1 to digital pin 0
- the row 2 to digital pin 1
- the row 3 to digital pin 2
- the row 4 to digital pin 3
- the row 5 to digital pin 4
- the row 6 to digital pin 5
- the row 7 to digital pin 6
- the row 8 to digital pin 7
- the row 9 to digital pin 8
the columns :
- the column 1 to digital pin 9
- the column 2 to digital pin 10
- the column 3 to digital pin 11
- the column 4 to digital pin 12
- the column 5 to analog input pin 0 (there is no problem we can use it like a digital one, i'll show you later)
- the column 6 to analog input 1
- the column 7 to analog input 2
- the column 8 to analog input 3
- the column 9 to analog input 4
| « Previous Step | Download PDFView All Steps | Next Step » |















































#define R1 0 //digital pin C stands for colums
#define R2 1 //digital pin R stands for rows
#define R3 2 //digital pin
#define R4 3 //digital pin
#define R5 4 //digital pin
#define R6 5 //digital pin
#define R7 6 //digital pin
#define R8 7 //digital pin
#define R9 8 //digital pin
#define C1 9 //digital pin
#define C2 10 //digital pin
#define C3 11 //digital pin
#define C4 12 //digital pin
void setup() {
pinMode(R1, OUTPUT);
pinMode(R2, OUTPUT);
pinMode(R3, OUTPUT);
pinMode(R4, OUTPUT);
pinMode(R5, OUTPUT);
pinMode(R6, OUTPUT);
pinMode(R7, OUTPUT);
pinMode(R8, OUTPUT);
pinMode(R9, OUTPUT);
pinMode(C1, OUTPUT);
pinMode(C2, OUTPUT);
pinMode(C3, OUTPUT);
pinMode(C4, OUTPUT);
}
void loop() {
digitalWrite(R1, LOW); //here all the way till the first delay
digitalWrite(R2, LOW); //i set the anodes and cothodes opposite
digitalWrite(R3, LOW); //so that they are all off
digitalWrite(R4, LOW);
digitalWrite(R5, LOW);
digitalWrite(R6, LOW);
digitalWrite(R7, LOW);
digitalWrite(R8, LOW);
digitalWrite(R9, LOW);
digitalWrite(C1, HIGH);
digitalWrite(C2, HIGH);
digitalWrite(C3, HIGH);
digitalWrite(C4, HIGH);
delay(500);
digitalWrite(R6, HIGH);
digitalWrite(C1, LOW);
delay(1000);
}
but would it still work if i put a resistor
So what the usb has 5v, the internal resistance of the controller reduces the voltage, measure it, the only I/O that has 5v is I/O 13, tested. If you put a resistor of course will work, the resistor limits the current delivered to the led.
so ur saying that the voltage that comes out of the pins is less then 5V?
Yes, i've seen this to the newest boards, the older ones have 5v, but the newest around 2.5v, exception at I/O 13.
By the way, thanks for this post, its been very helpful!
Is this caused by an LED itself or you messed up the soldering?