I bought a 8x8 Led Matrix including a driver board with a MAX7219CNG chip. Unfortunately this chip was not working properly. So I decided to build my own driver with the help of 2 74HC595 shift registers.
My solution is based on the "Multiplexing with Arduino and the 74HC595" instructable by "amandaghassaei" and i extended to the 8x8 led matrix and 2 74HC5959 shift registers.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Step 1 - What Do You Need
To build this 8x8 matrix driver you will need the following things:
- An Arduino Pro mini/Nano/Uno or Mega (or compatible)
- A breadboard (i used a 830 tie-points one)
- Jumper Wires, male/male (20) and male/female (16)
- An 8*8 led Matrix
- 2x 74HC595 shift registers
- Optional- a external power source to run independantly (can be run from the USB port as well)
For the power source i used battery pack (5x 1.5V AA batteries) and a breadboard power supply module (set to 5V).
Arduino PRO MINI Module Atmega328 5V 16M - €2.93
If you use the Arduino Pro mini, like I did, you will also need a FTDI breakout board to communicate with the USB port from your computer (FTDI Basic Program Downloader USB to TTL FT232 for (€5.87)).
Large Size Solderless Breadboard - €2.93
Male to Male Breadboard Wires for Electronic DIY 22cm - €1.95
Female to Male Breadboard Wires for Electronic DIY 22cm - €1.95
3MM 8 * 8 Dot Matrix Common Anode Highlighted In red - €1.95
74HC595 DIP-16 74HC595N SN74HC595N 8-Bit Shift RegIster IC Chip DIP-16 (5pcs) - €2.93
3.3V-5V Power Supply Module for MB102 Breadboard (Black) - €1.95
Note prices may vary, source http://www.lightinthebox.com, are only used as a reference.
Total costs: € 22,46 (without the battery pack and batteries)
Step 2: Step 2 - Placing It on the Breadboard
1. If you are going to use an external power source and use the Arduino Pro Mini or Nano then first place the Breadboard Power Supply on the breadboard (i did thid afterwards and i had to place backwards to get the right polarity.....).
2. Then place the Arduino Pro mini or Nano on the breadboard at the other end of the breadboard, this is not necessary for the Uno or the Mega).
3. Now place the 2 74HC595 shift registers on the board with about a 1,5 centimeters distance between them and the other components (see breadboard photo). Used pins:
4. You can now connect the jumper wires (male/male) (see the diagram photo, the male/male jumper wires are on the top side (near the arduino). dont forget the blue and grey wires....
5. There are 2 male/male jumper wires on the bottom side both are connected to ground (GND).
6. The rest of the cabling are male/female jumper wires and should be connected to the corresponding pin on the 8x8 Led matrix. See the back of the 8x8 led matrix photo for Pin 1.
Note : if you have pin 1 on the top left corner the pin setting is as follows (sometimes it is hard to see what pin 1 is...):
See the next step for more information on the 8x8 Led Matrix
Step 3: Step 3 - Connecting the Led Matrix (8*8)
See the picture for the used schematics and cable attachments.
If you want to make other patterns then this in formation (regarding the rows and columns) is needed.
Step 4: Step 4 - Programming Your Arduino
To get this going i really wanted to understand what was happening so i wrote a simple code to prove that is works (and that i could use it for other projects).
A lot of the codehas been copied and adjusted to my needs, i updated the comments to clarify what is happening.
The program turns every led on and off one by one.
Have fun with it, and try to make other patterns by altering the bitshifts.loops, etc.....
I attached the arduine INO file, just download and run it!
Note: when you run the INO file for the first time it will ask you tho create a directory for the project. If you like you can also open the INO file with a text editer (notepad or notepad++) and copu the contents to your ide in a new project.
Step 5: Step 5 - Running the Program (finished Implementation)
The video to prove that it works ;-)
Finished, hope that you enjoyed it, and will use it in your projects!
Best regards, Mark