Introduction: Arduino 8x8 DOT_Matrix

Wassup Guys!!

In this instructable, I'm going to show you how to Interface with LED Dot matrix using an Arduino and MAX7219 IC. This project can be used to make low-resolution images using LEDs. This project is very simple to build and it also serves as a basic to getting started with controlling a large number of LEDs using the Arduino Uno.

Step 1: Components Needed

Here is the list of components required to build this project.

  1. Arduino Uno
  2. 8x8 LED matrix with MAX7219
  3. Breadboard
  4. Header Wires
  5. 5V power supply
  6. Arduino IDE

Step 2: Circuit

For this project, we will be using the MAX7219 which is display driver IC, which works with SPI communication. An 8x8 LED matrix has 64 Pins in total if all the cathodes are connected together. While an Arduino has only 14 digital pins, and the Arduino is not capable of providing 64 LEDs with enough current so we use the MAX7219, which needs only four Arduino pins to control the LEDs.

The connections are very simple, no soldering skills required.

The Connections are:
Max7219 CLK = Arduino digital pin10

Max7219 CS = Arduino digital pin9

Max721 DIN = Arduino digital pin8

Max721 GND = Arduino digital GND

The VCC pin from the LED matrix should be connected to an external 5v power supply (5v 1A recommended), each pin of the Arduino is capable of providing a max current of 40mA. And the 5V regulator is capable of providing a max current of 200mA. The led matrix requires higher operating current.

Step 3: CODE

The code can be found below, this is the code to generate a Smiley on the LED matrix. The code is simple to understand and you can change the patterns of the LEDs in the code.

#include <LedControl.h>

int DIN = 12; int CS = 11; int CLK = 10;

LedControl lc=LedControl(DIN,CLK,CS,0);
void setup(){

lc.shutdown(0,false); //The MAX72XX is in power-saving mode on startup lc.setIntensity(0,15); // Set the brightness to maximum value lc.clearDisplay(0); // and clear the display }

void loop(){
byte a[8] = {0x3C,0x42,0xA5,0x81,0xA5,0x99,0x42,0x3C}; printByte(a); delay(1000); }

void printByte(byte character [])
{ int i = 0; for(i=0;i<8;i++) { lc.setRow(0,i,character[i]); } }

Step 4: Library Setup

Before you get started with coding you need Arduino IDE.

To download Arduino IDE and for Arduino setup, you can check my previous instructable. And for this Instructable you need LedControl Matrix LIbrary, you can download it from the link below.

"LED Control Library"

Ok, let's begin with coding.

Step 5: Generate Paterns

To generate patterns you need Pixel to matrix converter. The converter file is attached below, you can download and use it.

The patterns are generated by editing an array in the code to the required hex array, this hex array can be generated by downloading the converter and using the tool to generate hex strings, after you have generated the string you can copy and paste the string in the sample code from the previous step to generate custom patterns.

Step 6: OUTPUT

That's all viewers.

Hope you enjoy by trying various patterns.

Thank you.


About This Instructable




Bio: I love DIY Electronics
More by teamlighthouse:Andhra Style VadaIndian Style Onion Bonda Cucumber Crocodile
Add instructable to: