Introduction: LED Dot Matrix Display

In this project, you shall again use two sets of shift registers. These will be connected to the rows and
columns of the dot matrix display. You will then show a simple object, or sprite, on the display and
animate it. The main aim of this project is to show you how a dot matrix display works and introduce the
concept of multiplexing because this is an invaluable skill to have.

Step 1: Things Required

for this project you will require -:

1. 1  LED matrix
2. 8  resistors 1k ohm
3. 8 557 transistors
4. 1 ULN2803 IC
5  Arduino
6. 2 74HC595 shift register
7. 2 Bread board
8. Connecting Wires

Step 2: Working

Dot matrix units typically come in either a 5x7 or 8x8 matrix of LEDs. The LEDs are wired in the
matrix such that either the anode or cathode of each LED is common in each row. In other words, in a
common anode LED dot matrix unit, each row of LEDs would have all of their anodes in that row wired
together. The cathodes of the LEDs would all be wired together in each column. The reason for this will
become apparent soon.
A typical single color 8x8 dot matrix unit will have 16 pins, 8 for each row and 8 for each column.
The reason the rows and columns are all wired together is to minimize the number of pins required.
If this were not the case, a single color 8x8 dot matrix unit would need 65 pins, one for each LED and a
common anode or cathode connector. By wiring the rows and columns together, only 16 pins are
required.

However, this now poses a problem if you want a particular LED to light in a certain position. If, for
example, you had a common anode unit and wanted to light the LED at X, Y position 5, 3 (5th column,
3rd row), then you would apply a current to the 3rd Row and ground the 5th column pin.
The LED in the 5th column and 3rd row would now light.

Now let’s imagine that you want to also light the LED at column 3, row 6. So you apply a current to
the 6th row and ground the 3rd column pin. The LED at column 3, row 6 now illuminates. But wait…the
LEDs at column 3, row 6 and column 5, row 6 have also lit up.


This is because you are applying power to row 3 and 6 and grounding columns 3 and 5. You can’t
turn off the unwanted LEDs without turning off the ones you want on. It would appear that there is no
way you can light just the two required LEDs with the rows and columns wired together as they are. The
only way this would work would be to have a separate pinout for each LED, meaning the number of pins
would jump from 16 to 65. A 65-pin dot matrix unit would be very hard to wire up and control because
you’d need a microcontroller with at least 64 digital outputs.
Is there a way to get around this problem? Yes there is, and it is called multiplexing (or muxing).


Multiplexing is the technique of switching one row of the display on at a time. By selecting the column
that contains the row that contains the LED that you want to be lit, and then turning the power to that
row on (or the other way round for common cathode displays), the chosen LEDs in that row will
illuminate. That row is then turned off and the next row is turned on, again with the appropriate
columns chosen and the LEDs in the second row will now illuminate. Repeat with each row till you get to
the bottom and then start again at the top.
If this is done fast enough (at more than 100Hz, or 100 times per second) then the phenomenon of
persistence of vision (where an afterimage remains on the retina for approx 1/25th of a second) will mean
that the display will appear to be steady, even though each row is turned on and off in sequence.
By using this technique, you get around the problem of displaying individual LEDs without the
other LEDs in the same column or row also being lit.

By scanning down the rows and illuminating the respective LEDs in each column of that row and
doing this very fast (more than 100Hz) the human eye will perceive the image as steady and the image of
the heart will be recognizable in the LED pattern.
You are using this multiplexing technique in the Project's code. That’s how you’re to display the
heart animation without also displaying extraneous LEDs.

Step 3:

you have to calculate the value of the resistors you can use 
You should first get some specs on your LEDs, you should know their forward voltage and forward current, you can get this info from the datasheet. The circuit operates on 5V so your Source voltage is 5V which can be obtained from a 5v adapter

Download the original file to see the schematics better.(press the "i" icon in the top left corner of the picture)

Step 4: Making It Work

I have a made the program that displays sentence from the arduino serial monitor on the matrix, my code is very basic .I have made an android application to make the font for the display. Please visit the following page to install the app https://play.google.com/store/apps/details?id=com.androidtutorialpoint.leddotmatrix

Step 5: All Done !!!!!!!!!

Congratulations your 8x8 led matrix is ready . You can display anything you would like .Now U can play with it and make  8x8 led matrix by manually soldering the Led`s or 16x8 matrix and so on !!!!!!

Comments

author
MissIchuC made it! (author)2016-11-24

Somebody explain to me what shall I supposed to do if I have a 40h*80w LED matrix

author
moj9999 made it! (author)2016-09-16

how stop scrolling text!!

i want show character in center and fix

author
MuhammadW25 made it! (author)2016-07-29

I made it, but how to add more column??

author
MirzaE made it! (author)2016-06-11

sir i did this but instead of letter all leds lighting up

author
Electo4fun made it! (author)2014-01-13

Good Job :D.

I did this but instead of the letters lighting up the entire matrix lights up and the letters don't.

author
Electo4fun made it! (author)Electo4fun2014-01-13

Ah I fixed it... In the code you must remove the '~'.

author

Thanks for reply. can u please tell in brief. i am confuse to remove the '~'.

author
MarioK1 made it! (author)2014-10-03

Oh man, your article is sooo nice but in my opinion your Sourcecode could have had some more comments or plausible variable names :P Specially if you try to port this to an other language / platform... Im trying to find some solution for my special Industrial Dot Matrix Display (TIP: There they added the seperate Column Transistors to the last shift register so you can control everything over the serial shift) ... But thanks anyway !

author
dinesh.maharjan.94064 made it! (author)2014-09-08

Thanks for the schematic and code. In that code only 2 time text message display. but i want to display text message for a long time until another serial moniter send next text message. So please help me. my id is dinfrnpal@gmail.com

author
RileyPankratz15 made it! (author)2014-04-10

Am I able to use s8050 d331 transistors from Texas Instruments? I got them from a kit and I'm wondering if they will substitute nicely or not?

author
zeeroo made it! (author)2013-12-23

The picture shows TO-92 NPN transistor but the parts list says 557 wich is PNP
looking at the schematics it should be PNP transistor
right ?

author
zeeroo made it! (author)zeeroo2013-12-25

sorry i meant should be NPN not PNP

author
petros9 made it! (author)2013-09-24

How much time do the LED lamps need to turn ON? What is the refresh rate?
How much time is it needed to scan a column/row and also to switch from one column/row to another?

Thanks in advance

author
msemtd made it! (author)msemtd2013-11-07

I haven't read the authors' Arduino code by the way, but I would recommend performing the refresh of each row in a timer interrupt (have a look on the Arduino playground for help on using timer interrupts).

You want to choose a refresh rate that looks smooth to the human eye so something over 50 updates (of the entire display) per second – i.e. 50Hz. Let's say we chose to refresh one row per millisecond. That equates to 1000 row updates per second or 1000/8 full display updates per second on this 8 row display. That is a 125Hz refresh rate.

We could easily halve this rate to a nice smooth 62.5Hz by updating a row every 2 milliseconds (for a 16 pixel high display at 62.5Hz the 1ms is ideal). The duration for which the LEDs are left on during that 2ms row-scan time will dictate how bright the display is!

The Arduino will take a little time to clock the data for each row into the shift register(s). For longer pixel displays the shift registers are chained together and more bits need to be shifted in. Thankfully the 74HC595 has a latch so the data can be clocked in for the next row while the previous row is being displayed on the LEDs!

Smartly coded timer interrupts will allow the Arduino to do other jobs whilst maintaining a solid refresh rate. I will post up some code when I've had a chance to try this out on an Arduino. BTW: on of my jobs is to write firmware for scrolling LED matrix displays :D

author
layal_1 made it! (author)2012-10-11

Can I do this project but without Arduino ?

author
angel 6120 made it! (author)angel 61202013-06-13

if you found this project without using Arduino . could you please help me ??

author
knexpert1700 made it! (author)2012-08-30

I have some questions about the parts list, I've been looking at an 8x8 led rgb display on ebay for $6.95 and I'm wondering if the resistor is ULN2803 IC like you said or is it ULN2803A IC like what I've been seeing online. Also, I think you should change the register to resistor in the parts list.

author
knexpert1700 made it! (author)knexpert17002012-08-30

Sorry, I meant to say transistor! :P

author
ProBodger made it! (author)2012-08-04

excellent

author
kapil gupta made it! (author)kapil gupta2012-08-05

Thanks buddy !!

About This Instructable

163,527views

118favorites

Bio: I am the Technology lover always doing intersting and innovative stuff. Subscribing to me = fun + excitement !!!!!!!!!. Please check my Website if you want to learn ... More »
More by kapil gupta:LED Flash Light Android Application RC MOOD LYTELED Dot Matrix Display
Add instructable to: