3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

LED matrix using shift registers

Step 3The control hardware

The control hardware
«
  • Sch-Matrix_Controller.png
  • 12 - Control hardware.JPG
We need to control the columns and the rows of our LED matrix. The matrix has been constructed so that the Anodes (voltage side of the LED) constitute the rows, and the Cathodes (ground side of the LED) make up the columns. This means our row driver need to source current and our column driver needs to sink it.

In order to save on pins I am using a shift register to control the columns. This way I can control an almost unlimited number of columns with just four microcontroller pins. It is possible to use only three if the Enable Output pin is tied directly to voltage. I have selected the HEF4794 LED driver with shift register. This is a better option than a standard 74HC595 as it can easily sink the current present when all 8 LEDs are on at one time.

On the high side (current source for the rows) I am using an mic2981. The schematic shows a UDN2981, I believe these two are interchangeable. This driver can source up to 500mA of current. Because we are only driving 1 row at a time this gives a lot of opportunity for expansion, up to 33 columns for this chip (more on that in the "modular concepts" step).

Building the Control Hardware


For this instructable I have just breadboarded this circuit. For a more permanent solution you will want to either etch your own circuit board or use prototyping board.

1. Row Driver
  • Place the mic2981 (or UDN2981) in the breadboard
  • Connect Pin 9 to Voltage (This is confusing in the schematic)
  • Connect Pin 10 to Ground (This is confusing in the schematic)
  • insert 3k3 resistors connecting to pins 1-8
  • Connect from Port D of the ATmega8 (PD0-PD8) to the 8 resistors
  • Connect the 8 row control wires of the LED matrix to pins 11-18 (note that I have connected the lowest row of LEDs to Pin 18 and the Highest row to Pin 11).
2. Column Driver
  • Place the hef4794 in the breadboard
  • Connect Pin 16 to voltage
  • Connect Pin 8 to ground
  • Connect 220 ohm resistors to Pins 4-7 and 11-14.
  • Connect the 8 column control wires from the LED matrix to the 8 resistors you just connected.
  • Connect Pin1 (Latch) to PC0 of the ATmega8
  • Connect Pin2 (Data) to PC1 of the ATmega8
  • Connect Pin3 (Clock) to PC2 of the ATmega8
  • Connect Pin15 (Enable Output) to PC3 of the ATmega8
3. Clock Crystal
  • Connect a 12MHz crystal and load capacitors as shown in the schematic
4. ISP
  • Connect the programming header as shown in the schematic
5. Filtering Capacitor and Pull-up resistor
  • It is best to filter the voltage supplied to the ATmega8. Use a 0.1uf capacitor between Pin 7 & 8 of the ATmega8
  • The reset pin should not be left floating as it can cause random resets. Use a resistor to connect it to voltage, anything about 1k should be good. I've used a 10k resistor in the schematic.
6. Make sure you are using +5v regulated power. It's up to you to design the regulator.
« Previous StepDownload PDFView All StepsNext Step »
6 comments
Jul 11, 2011. 12:36 PMaxeman911 says:
instead of mic2981 would a decade counter work, or could we just out the pins directly on the arduino?
Jun 18, 2011. 6:30 AMAvadhut.Deshmukh says:
Atmega16 ?code Help PLZ
Jan 9, 2011. 7:13 AMshanakaplus says:
I'm using cad-soft eagle software. I could not find hef4794 shift register . can you help me to find in eagle?
May 11, 2011. 6:30 PMavanner77 says:
or, if they dont match up, you can make your own part with this tutorial:
http://www.sparkfun.com/tutorials/110
May 9, 2011. 1:54 PMavanner77 says:
if you check the datasheets for the hef4794 and the 74hc595, you can see if they have the same pinout and just use the eagle part for the 595
Aug 3, 2010. 12:45 AMSuresh.D.M says:
can we add shift registers to the column and shift the bit
Jan 17, 2010. 5:51 AMrammbo69 says:
Both are 20 pF.
Sep 16, 2009. 2:32 AMroketlights says:
what are values for c2 and c3 ????? im relying entirely on this!! please? i got everything but this part and the programing part. please help!!!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
41
Followers
6
Author:barney_1