GANESH GADGETS

GANESH GADGETS
The blog it all about DIY(Do It Yourself) projects of Arduino, Raspberry pi and IOT with tech news and tricks.

DIY 8x5 LED Matrix display

DIY 8x5 LED Matrix display

If you want to make a 8X5 led matrix display without using any other MUX with arduino,then this article is for you.
Things you needed:
1. bunch of LEDs(check before use)
2. PCB Board(Brown board)

3. Jumper Wires(Male to female)

4. Arduino
5. 100 ohms resistors
6. Soldering Instrument and Hot glue gun

Wiring up/ Circuit connections:
Before you start have brief idea about leds:

  • choose healthy LEDs only
  • do check before soldering on the PCB.
  • these needs min 1.5V and a few mA current. So accompany them with 200 or 100 ohm resistance.
All you need is connect all Anode of leds in a row together and connect all cathode of leds in a column together. The circuit diagram will clear your thoughts.

From the above diagram if the row-x is given Low state and column-y is given High state then the LED belongs to (x,y) will glow.
But in programming or using arduino the state of all other leds should be in opposite in order to Switch them off.
So the idea is to ON one led at a time and make all other leds OFF that time.

Here are some pictures while making the circuit:


  •  Do add resistances(100 ohm or 200 ohms) otherwise the leds may damage due to over current flow. Add female header pins for make it arduino friendly.

CODING:

here is the code:

int row=0,col=0;
int time1=5;
int timex=1;
void onled(int x,int y)//PASSING ROW AND COLUMN VARIABLES TO ON THE RESPECTIVE LED
{
 reset();
 if(x==1){row=2;} if(x==2){row=3;} if(x==3){row=4;} if(x==4){row=5;} if(x==5){row=6;} if(x==6){row=7;} if(x==7){row=8;} if(x==8){row=9;}
 if(y==5){col=19;} if(y==4){col=18;} if(y==3){col=17;} if(y==2){col=16;} if(y==1){col=15;}
 digitalWrite(row,LOW);
 digitalWrite(col,HIGH);
 delay(timex);
}
void reset()//THIS FUNCTION USED TO SUPPLY ANODE WITH gnd AND CATHODE WITH +5V
{
 digitalWrite(2,HIGH);digitalWrite(3,HIGH);digitalWrite(4,HIGH);digitalWrite(5,HIGH);digitalWrite(6,HIGH);digitalWrite(7,HIGH);digitalWrite(8,HIGH);digitalWrite(9,HIGH);
 digitalWrite(15,LOW);digitalWrite(16,LOW);digitalWrite(17,LOW);digitalWrite(18,LOW);digitalWrite(19,LOW);
}

void setup() {
Serial.begin(9600);  

pinMode(2,OUTPUT);pinMode(3,OUTPUT);pinMode(4,OUTPUT);pinMode(5,OUTPUT);pinMode(6,OUTPUT);pinMode(7,OUTPUT);pinMode(8,OUTPUT);pinMode(9,OUTPUT);
pinMode(16,OUTPUT);pinMode(17,OUTPUT);pinMode(18,OUTPUT);pinMode(19,OUTPUT);pinMode(15,OUTPUT);
}

void loop() {
 onled(1,1);//on led of row-1 col-1    
}
The result will look like this:







Displaying letters on this will be in the next blog,till then you can use loops for different new patterns.

Post a Comment

0 Comments