4

members

Easy Basics: Project 032a 8x8 dot LED matrix (64 LED digital display) Common anode and Common cathode

of Lex C in UNO

Basics: Project 032a

Project name: 8x8 dot LED matrix (64 LED digital display) 1588BS common anode and common cathode

Attachments: common anode 1588BS sketch1, common cathode sketch1library

In this project, you needed these parts :

1.Aruduino Uno R3 (you can also use the other version of Arduino)

2.Arduino IDE ( you can download it from here  )

3.Jumper cables

4. Big size or Medium size breadboard 1 pc

5. 8x8 dot LED matrix Common anode or Common cathode 1 pc

6. Resistor 8 pcs (220 Ohm each)

General

We will learn how to connect 8x8 dot LED matrix to Arduino board.

Understanding the 8x8 dot LED matrix

8x8 dot LED matrix can be single with 16 output pins or attached to MAX7219 IC driver module with 5 input pins and 5 output pins. We will speak about MAX7219 IC in other project.

8x8 means that the LED dot matrix has 8 LED rows and 8 LED columns. So, totally 64 LEDs are in 8x8 dot LED matrix.

With low-voltage scanning, dot-matrix LED displays have advantages such as power saving, long service life, low cost, high brightness, wide angle of view, long visual range, waterproof, and numerous specifications. Dot-matrix LED displays can meet the needs of different applications and thus have a broad development prospect. 

Generally, there are two types of dot matrix – common cathode and common anode. They look almost the same in appearance. But usually there will be labels for easy recognition. The one with a label ending with Ax is a common cathode dot matrix and that with Bx is a common anode one. See the figure below for how they look like. So the pins are distributed at the two ends of the matrix. Pins at one end (usually the label side) are 1-8 from left to right, when at the opposite they are 9-16 from right to left.

The internal view:

Below is the internal structure. You can see that in the common anode dot matrix, ROW is the anode of LED and COL is the cathode, while the situation in the common cathode one is opposite. Though for both types, the columns are the pin 13, 3, 4, 10, 6, 11, 15, and 16 and rows are the pin 9, 14, 8, 12, 1, 7, 2, and 5 in the dot matrix. 

To light up the first LED on the upper left corner, you need to set pin 9 as high level and pin 13 as low level in the common anode dot matrix; for a common cathode one, set pin 13 as high and pin 9 as low. If you want to turn on all the LEDs at the first row, in a common cathode dot matrix, set pin 13 as low level and ROW 9, 14, 8, 12, 1, 7, 2, and 5 as high level. In a common anode one, set pin 13 as high level and those rows as low level. See the figure below for better understanding.

The internal view:

Bx (Common anode)

Ax (Common cathode)

Pin numbering corresponding to the above rows and columns:

How to connect 8x8 dot LED matrix on half size(medium) or small breadboard

8x8 dot LED matrixes are fun to play with, but their size 37mm x 37 mm (2.1 inch x 2.1 inch) makes them difficult to use on most breadboards. See some ways how to mount 8x8 dot LED matrixe on a small or half size(medium) breadboard. Insert jumpers (can be of different colors or same color as we have in our example) in the way like we did with green jumpers - it is up to you which setup to use. It can be like on the left or like on the right. The 8x8 dot LED matrix will be inserted on top of jumpers (it has 8 x 8 pins) - the place is marked with blue line. All connections are done on the sides.

See example below (Label side towards you):

DIY 8x8 dot LED matrix

There are pre-made LED matrixes, or if you want feel free to make own matrix from 64 LEDs, using the schematic as shown above for common cathode or common anode matrixes. You can also use old LegoTechnik Bars for the Grid so you get the 8x8 dot LED matrix straight and clean if you decide to make it yourself.

See the specification of 1588BS Common anode 8x8 red dot LED matrix below.

Signals and connections of 8x8 dot LED matrix

Signals and connections of LED

The operating voltage of the LED is 1.8V and the operating current is 10mA-20mA. The Arduino Uno board can supply 5V or 3.3V power. We will use 5V for this project, so the minimum resistance of the current limiting resistor should be (5 V to 1.8 V)/20 = 160 Om. The 220 Om offered in the kit is suitable and you can also choose other resistors that meet the condition. The larger the resistance is, the dimmer the LED will get.

The code

Bx Common anode matrix

So basically to control a matrix, you connect both its rows and columns to your Arduino board. The columns are connected to the LEDs cathodes, so a column needs to be LOW for any of the LEDs in that column to turn on. The rows are connected to the LEDs anodes, so the row needs to be HIGH for an individual LED to turn on. If the row and the column are both high or both low, no voltage flows through the LED and it doesn’t turn on. To control an individual LED, you set its column LOW and its row HIGH. To control multiple LEDs in a row, you set the row HIGH, then take the column HIGH, then set the columns LOW or HIGH as appropriate; a LOW column will turn the corresponding LED ON, and a HIGH column will turn it off. Pins set to OUTPUT by use of the PinMode command are set to LOW if not otherwise stated.

Ax Common cathode matrix

So basically to control a matrix, you connect both its rows and columns to your Arduino board. The columns are connected to the LEDs anodes, so a column needs to be HIGH for any of the LEDs in that column to turn on. The rows are connected to the LEDs cathodes, so the row needs to be LOW for an individual LED to turn on. If the row and the column are both high or both low, no voltage flows through the LED and it doesn’t turn on. To control an individual LED, you set its column HIGH and its row LOW. To control multiple LEDs in a row, you set the row LOW, then take the column LOW, then set the columns HIGH or LOW as appropriate; a HIGH column will turn the corresponding LED ON, and a LOW column will turn it off. Pins set to OUTPUT by use of the PinMode command are set to HIGH if not otherwise stated.

We have attached the code examples for different types of 8x8 dot LED matrix displays in this project. The wiring is the same.

Build the circuit

It's recommended to add 220 ohm resistors to limit the current.

It doesn’t matter which pins of the Arduino board you connect the rows and columns to, because you can assign things in software. Connect the pins in a way that makes wiring easiest.

The following picture shows the needed connections with the Arduino Uno 

Step by Step instruction

  1. Open Arduino IDE.
  2. Plug your Adruino Uno board into your PC and select the correct board and com port
  3. Open up serial monitor and set your baud to 9600 baud
  4. Verify and upload the the sketch to your Adruino Uno board.
  5. You will see your text scrolled from the right to the left. You can change text in the sketch. Just need to modify some lines on the begining (it is explaned in the sketch). You can add additional symbols too.

Summary

We have learnt how to connect 8x8 dot LED matrix to Arduino board.

Library:

  • FrequencyTimer2 library used for this project. See attachement on the begining of this project description.Download it and unzip and add to libraries in your PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC. Restart Arduino IDE after you did that.

Sketch:

  • See attachments on the begining of this project description. 


Other projects of Lex C
Easy Basics: Project 057a ACR122U NFC Reader of Lex C, Not selected 17-01-2018

« Go back to category
Is this project fake? Report it!   
Recommend to a friend
Published at 16-09-2017
Viewed: 3636 times