Build Your Own Programmable LED QR Code

New 8x8 LED matrix kit is where it all starts

By Ryan Winters
Product Manager

I struggle to resist snapping pictures of QR codes even if I have no idea where they will lead. They are addicting. QR code stands for quick response code and quick it is. Smartphones are smart enough to read them from virtually any angle or orientation before going to a webpage, dialing a phone number, displaying a message, tweeting, posting a location or even to be used as a virtual business card to quickly load data into your contact list.

QR Code But imagine taking a printed QR code a step further. I had dreams of a digital LED array that I could program with QR codes and I wanted it really big! Alas, nothing is ever easy in electronics. While I had seen some QR signs using LEDs, the individual LEDs were not controllable, thus making it difficult if you want to change the code.

If I could string together several 8x8 LED matrices, control them with some MAX7219 LED driver ICs, then all I would have to do is upload new code to my Arduino, and the QR code magically changes. At least that was the plan. An idea in the head is one thing; an idea on paper is another. Turning the idea into a real electronics gizmo is entirely different. As a test, I set up a few matrices on a solderless breadboard and daisy-chained a few of the MAX7219 ICs together. I added an Arduino and some code and – BAM – proof of concept!

My small scale uses nine 8x8 LED matrices to make a grid of dots 24x24. To have the proper contrast, a border is needed around the code, so that brings the total area up to 23x23 dots. Perfect! The matrices will sit right next to each other, which leaves very little room to access the pins. This is how I learned of wire-wrapping. There is also very little room to solder and I need to make at least 144 point-to-point connections.

My solderless prototype matrixMy solderless prototype matrix

Underside of matrixUnderside of Matrix

Several hours later, the wire wrapping was complete. On first power-up, the array of dots just scanned the lines in confusion. It was just like watching the static on a channel you don't get. Disappointed, I checked my connections and found a few missing ground connections. Once all connections were confirmed, it worked perfectly. This little 2.5-square-inch display can be scanned from as far as four feet away. Now that I know this works, I have designed some PCBs to make a larger display that can be read from further away. The DIY LED Matrix Kit will allow you to build your own 4" 8x8 LED matrix using LEDs of your choosing. It can accommodate 3mm and 5mm LEDs with 0.1" spacing, but it's really designed to use 10mm jumbo LEDs for optimal visibility from a distance.

A few rows into buildA few rows into the build.

All LEDs in positionAll LEDs in Position

The large scale QR code is built using 16 of the 8x8 modules with two sets of eight daisy-chained together and uses only six digital pins on the Arduino Uno. All of it is mounted to a nicely painted piece of plywood from a local home supply store. Using a digital multimeter, I found a single matrix draws up to 350mA of current. Multiply that by 16 and you'll discover the sign requires around 5.6A of current to run at full brightness. Because of the huge current requirement, I decided to use terminal blocks to distribute the power to each module separately rather than have the current flow from one board to the next. Last thing I need is to have my sign melt after all this time and effort!

All LEDs in position Rather than trying to figure out how to program each dot to turn on or off, I created a program in Microsoft Excel that has columns and rows in the same configuration as my giant matrix. There are some formulas in the background, but all that's required now is to just import an image of a QR code, scale it so the grid sizes are the same and choose the white pixels as the transparent color. In this case, each white dot represents an LED that is ON. Using the keyboard, place an "X" in each cell you can see and leave the black cells blank. Click a button and the code for the Arduino is automatically generated and copied to the clipboard.

When uploading the code, it is a good idea to keep the power supply disconnected as well as the Arduino power and ground pins disconnected. This will keep the Arduino from trying to power all the LEDs using the USB power, which will be insufficient. Reconnect the power and ground lines to the Arduino, reconnect the power supply and light it up! This sign can be scanned from at least 15 feet away.

Ryan Winters is a Product Manager at Jameco Electronics and a Bay Area, California native. He is mostly self-taught and his hobbies include working on cars and computers, fiddling with electronic gadgets and experimenting with robotics.