The finished product will look like this:
I used the sparkfun button pad pcb to build my 4x4 led matrix because this is the first step in a longer project I'm working on that involves backlit buttons. However, you can build your own 4x4 led matrix pretty easily on a breadboard, and I'll provide schematics that will show how to do that. My parts list is given below:
Parts List:
SPARKFUN:
(1x) Button Pad 4x4 - LED Compatible Sparkfun COM-07835
(1x) Button Pad 4x4 - Breakout PCB Sparkfun COM-08033
(1x) Arduino Uno Sparkfun DEV-11021
DIGIKEY (you could find these at Jameco):
(16x) White 5mm LED (3mm is fine too) Digikey C513A-WSN-CV0Y0151-ND
(1x) 74HC595 shift register Digikey 296-1600-5-ND
(1x) 16 pin IC socket Digikey A100206-ND
JAMECO:
(1x) 16 conductor ribbon cable Jameco 28RC16-10VP
(1x) 16 pin right angle connector Jameco 746285-3
(2x) male header pins Jameco 7000-1X40SG-R
Additional Materials:
22 Gauge Wire, multiple colors Radioshack #278-1221
protoboard with copper Radioshack #276-147
wire cutters
wire strippers
solder
Remove these ads by
Signing UpStep 1: What Is Multiplexing?
In a multiplexed array of LEDs, only one row of LEDs is on at any given time. It seems like this would limit the types of shapes we can display on the LED matrix, but it actually doesn't. This is because the arduino (or whatever is sending data to the array) is switching through each row so quickly (hundreds or thousands of times a second) that we do not perceive the flashing on and off of each consecutive row. You can read more about this phenomenon, called persistence of vision, on wikipedia.
So how do we send data to one row at a time? If we connect five volts (red) to one row and connect ground (blue) to the other three rows and cycle through each row one by one, it will look something like figure 1. Now image that while one of the rows is at +5, we connect one of the columns to ground. As shown in figure 2, this will cause the LED at the junction of the +5 row and GND column to light up. This way, we can address each of the 16 LEDs in the matrix individually using only eight leads (four to the rows and four to the columns).
Now look at the image below. Imagine if we very quickly turn on the LED in the upper left corner (position 1,1), then the LED at (2,2), then (3,3) and (4,4), and we cycle between these four LEDs very quickly (hundreds of times a second). It will appear that all four of these LEDs are on a the same time (as shown in right image in the image below). Study the diagram below and convince yourself that this is true.


















































Visit Our Store »
Go Pro Today »




One this I am a bit confused about. What is you want to light more than one LED at once.
Wouldn't this cause some other lights to illuminate unexpectedly using this method?