Tuesday 14 February 2017

��LED MATRIX (3X3) | ARDUINO PROJECT | DIY





This project is based on Arduino microcontroller with interfacing the led 3x3 matrix.

The component required for this project are follows:
(1) Arduino microcontroller (UNO)
(2) color led Red, Green, yellow
(3) jumper wires for connections
(4) resistors (1 k ohm)
(5) soldering iron for solder.
(6) Dot matrix pcb


Circuit diagram:

for circuit diagram please see given video.


working principle:

First we make a led matrix 3x3 cube using 9 Red, 9 Green , and 9 Yellow led. we arrange this by tow method first one by common anode and second one in by common Cathode. In this video i used common anode algorithm for controlling every led. we connect all the anode terminal in row of led patter or we can say in one layer and extract one terminal for Arduino. Other terminal of led connected in column way. this will give 9 connection in ground and 3 connection for every layer. these 12 wire are connected with Arduino. after that below given code was upload in Arduino.


Arduino Code:

int i=0;
void setup() {
  for (i=2; i<=13; i++)
  {
    pinMode(i, OUTPUT);// Assign pin 2 to 13 as output
  }

  }

void loop()
{
//this loop for assiging 8 pin of column to low and 3 layers to high
 for (i=1; i<=8; i++)
 {
  digitalWrite(11, HIGH);
  digitalWrite(12, HIGH);
  digitalWrite(13, HIGH);
  digitalWrite(i, HIGH);
  delay(500);
  digitalWrite(i,LOW);
  delay(500);
 }

 for (i=1; i<=8; i++)
 {
  digitalWrite(11, HIGH);
  digitalWrite(12, HIGH);
  digitalWrite(13, HIGH);
  digitalWrite(i, HIGH);
  delay(500);
  }

for (i=8; i>=1; i--)
 {
  digitalWrite(11, HIGH);
  digitalWrite(12, HIGH);
  digitalWrite(13, HIGH);
  digitalWrite(i, LOW);
  delay(500);
  }

for(i=1; i>=3; i++)
  {
    digitalWrite(i, LOW);
    delay(1000);
  }

}

No comments:

Post a Comment