I used 16 matrices to create the QR code that is pictured here. You may purchase the kit to build an 8x8 panel from Jameco.
LEDs are not included to give you the freedom to choose your own size and color.
Step 1: Requires
Soldering iron and solder
LEDs (10mm recommended)
Wire cutters and strippers
LED Matrix Kit Includes:
LED Matrix PCB
47 Ω resistors
Control Board PCB
150k Ω resistor
Pan head screw, 4-40x3/8"L
2x8 female header
Hex spacer, 4-40x7/16"L
1k Ω resistors
2x8 male header
Hex standoff, 4/40x3/8"
1.5k Ω resistors
Step 2: Install Pin Headers
Temporarily install a few spacers on the control board and stand the board pair on one side so both boards are square to each other. Tighten the spacers. This has an added benefit if you are building multiple matrices. They will all sit nicely flush next to one another.
Step 3: Install the Resistors
R1 - R8 = 1k Ω (brown-black-red)
R9 - R16 = 47 Ω (yellow-violet-black)
R17 - R24 = 1.5k Ω (brown-green-red)
R25 = 150k Ω (brown-green-yellow)
Step 4: Install the Capacitors
C1 = 10μF electrolytic capacitor and is polarized. Note the stripe indicating the negative side. The silkscreen shows a "+" sign for positive. Solder the capacitor with enough space that you can bend the capacitor over to lay flush with the board.
Step 5: Install Transistors
Q9 - Q16 = 2N2222A. Make sure each transistor says 2N2222A. (If it's something else, it could cause the opposite action to happen once programmed.
Helpful Tip: Solder one lead of each transistor at a time. This holds them in place and allows you to make minor adjustments. It also allows the transistors a brief period to cool before you solder the next lead.
Q1 - Q8 = IRF9Z34N. These transistors must be placed in the correct orientation. The sliver of a rectangle on the silkscreen indicates the backside of the transistor. Bend the leads back 90 degrees so the transistors will lay flat on the PCB when installed. You may also choose to leave a slight gap between the back of the transistor and the PCB for airflow to keep components cool.
Step 6: Install Socket and ICs
Step 7: Install the LEDs
Step 8: Install the Spacers and Standoffs
Step 9: Complete Wiring
Step 10: Program Your Arduino
Connect the jumpers from the control board to the following pins.
DIN = DataIn (pin 12 on Arduino)
DOUT = DataOut (connects to next module's DIN, if applicable)
CLK = Clock (pin 11 on Arduino)
LOAD = Load (pin 10 on Arduino)
V+ = 5V pin if your power supply to the Arduino is greater than 5V, or connect it to VIN if your input power supply to the Arduino is 5V.
GND = Ground
If you are connecting additional panels, you will need to daisy-chain them as follows.
• DOUT from first control board (the one connected to the Arduino) connects to DIN of next control panel
• CLK connects to CLK on the next board
• LOAD connects to LOAD on the next board
• V+ can be connected together, but it is strongly recommended to supply power to each board's V+ independently to limit the amount of current flowing through the board
•GND can also be connected together, but for optimum operation, it is best to run independent ground lines to each board.
Step 11: Additional Programs and Patterns
The spreadsheet tool (Excel file near the bottom of the page) assumes there are 16 panels arranged 4x4, and the order as the Arduino sees it is left to right from top to bottom. Just place an "X" or other character in the cell you wish to light up, then click the "Build Code" button and it will create the code for Arduino and copy it to your clipboard. (Note: Your Macro security settings in Excel may need to be lowered to allow the button to run its function of creating the code.) The best method I found for the QR codes is to create one on another website, import the image and scale correctly so each dot has its own cell. Using the Picture tools, you can select the white cells as the "transparent color" that way you can see the grid of cells behind it. Use the keyboard to navigate between cells because the mouse will just click the image. Place an "X" everywhere you can see the cells and leave the black cells blank (OFF), and there you have it.
SAMPLE CODE FOR ONE 8x8 LED MATRIX
//This code below will turn on every dot of the matrix to test that all LEDs work.
***** These pin numbers are for the Atmega328P
* with Uno bootloader *****
* LedControl (name)=LedControl(DataIn,CLK,LOAD,number of Max7219) *
* pin 12 is connected to the DataIn to first cluster of 8
* pin 11 is connected to the CLK
* pin 10 is connected to LOAD
* number 1-8 up to 8 matricies
//we have already set the number of devices when we created the LedControl
//we have to init all devices in a loop
/*The MAX72XX is in power-saving mode on startup*/
/* Set the brightness to a medium value (1-15) */
/* and clear the display */
/* To determine which LEDs will be on, think of the row as having 8 positions with a specific number attached to each
(128, 64, 32, 16, 8, 4, 2, 1)
If you want every other dot ON in the row starting with the first, add the numbers located in the position you want ON.
(128 + 0 + 32 + 0 + 8 + 0 + 2 + 0) = 170. Use the number 170 in place of 255 below to turn on every other.
All the LEDs on in the row would be (128 + 64 + 32 + 16 + 8 + 4 + 2 + 1) = 255.
lc0.setRow(0,0,255); //255 sets all LEDs in the row to ON