An LED matrix is a two dimensional array of LEDs that can be used to display symbols, characters or even images. Based on the orientation of the LEDs in the matrix, there can be two types of LED matrices.They are Common Row Anode and Common Row Cathode.
In this project, an Arduino Uno board is integrated with an 8 X 8 LED matrix to display information (even scrolling information and images can be displayed).
- Arduino Uno board
- LED Matrix – 8 x 8 LED dot matrix
- IC1 – MAX 7219
- R1 – 10 KΩ
- C1 – 0.1 µF
- C2 – 10 µF
The project is based on the Arduino Uno microcontroller board. Out of the 14 available digital input / output pins on the Arduino Uno, we need only three pins to implement this project.
One pin provides the clock signal to the LED display driver IC (MAX 7219) while another pin is used to transmit the serial data to the IC for displaying on the LED matrix. The corresponding pins must be appropriately mentioned in the program.
An 8 x 8 LED matrix display is used in this project to display the information. LED matrices are available in different styles like single color, dual color, multi-color or RGB LED matrix.
They are also available in different dimensions like 5 x 7, 8 x 8, 16 x 16, 32 x 32 etc. Based on the arrangement of the LEDs in the matrix, an LED matrix can be either common row anode or common row cathode.
In case of common row anode type LED matrix, the current sources (high or positive voltage) are given to the rows A-D and the current sinks (low or negative voltage or ground) are given to the columns 1-4.
In case of common row cathode type LED matrix, the current sources (high or positive voltage) are given to the columns 1-4 and the current sinks (low or negative voltage or ground) are given to the rows A-D.
The LED matrix used in this project is a common row cathode type LED matrix. While developing the project, the type of LED matrix must be known and the program must be written accordingly.
IC MAX 7219
The LED matrix can be driven in two ways. They are parallel (where each row or column are sent with parallel data) and serial (where the data is sent serially and an IC is used to convert this serial data into parallel data).
MAX 7219 is a common cathode display driver with serial input and output. It is used to interface microprocessors and microcontrollers with 64 individual LEDs (8 x 8 LED matrix for example has 64 LEDs), seven segment LED displays up to 8 digits or bar graph displays.
The 8 x 8 LED matrix is connected to the MAX 7219 as shown in the circuit diagram and the data input is received from the Arduino board to the MAX 7219.
Pre-wired MAX 7219 and 8 x 8 LED matrix modules are available in the market. They can be used for convenience.
The aim of the project is to interface an Arduino Uno board with an 8 x 8 LED matrix to display information.
Even though a single 8 x 8 LED matrix with corresponding MAX 7219 IC is used in this project, multiple LED matrices can be connected in series for long scrolling display. Connect the components as shown in the circuit diagram. The working of the system is as follows.
3 of the 14 available digital input / output pins are used to control the display driver IC MAX 7219. The 3 pins on the MAX7219 IC are clock, data in and load (or cs in case of MAX 7221 IC). A maximum clock frequency of 10MHz can be applied. DIN (Data in) accepts the serial data from the microcontroller or Arduino board.
It is 16 bit long where the first 8 bits (D0 – D7) are for driving the columns (SEG A-G and DP of the MAX 7219 IC) of the LED matrix and the next 8 bits (D8 – D15) are for driving the (DIG 0-7 of the MAX 7219 IC) rows of the LED matrix.
The load pin (or CS or chip select pin in case of Max 7221 IC) latches the serial input data on its rising edge.
Another important pin on MAX 7219 is the ISET, which sets the peak current to the segment to drive all the LEDs. It is connected via a resistor (R1), which is called RSET. The capacitors filters out any noise in the supply.
When the serial data in is sent using the Arduino (through the program), the serial data is converted into segments and digits to drive columns and rows of the LED matrix. According to the data sent, the corresponding LEDs on the matrix light up and display the message.
The program written here is for scrolling text display. It might be difficult to view long scrolling data on a single 8 x 8 LED matrix. Hence, multiple LED matrices can be chained to form a long matrix. T
he no. of MAX 7219 ICs are equal to the no. of 8 x 8 LED matrices. In order to extend the display to multiple LED matrices, the Data OUT (DOUT) pin of the first MAX 7219 must be connected to the Data IN (DIN) pin of the second MAX 7219 IC. This process must be continued for multiple LED matrices.
(The positioning of the LED Matrix in the chain is important. The first LED matrix must be placed at the right of the chain.)
The program uses a library called Max Matrix. This library must be added to the Arduino IDE and the header file Max Matrix.h must be included in the program.
The use of this library file is to enable multiple MAX 7219 ICs to be integrated and also provide scrolling text. The library can be downloaded from this link.
- Arduino based 8 x 8 LED matrix display uses only 3 pins of the Microcontroller. Hence, it can be used in applications where displaying information is a part of the system in which other pins of the microcontroller can be used for other peripherals.
- LED Matrix is a basic form of display device that is used for displaying information at public places like bus or train stations.
- Multiple LED matrices can be combined to form large displays and can be used to display images with multi colors.