Heart Matrix Kit

Views: 25640 Difficulty: 2 Status: Complete

Two LED matrices give 70 LEDs to light up a necklace with messages.

Write messages and show animations on this palm-sized heart-shaped LED display. Works seamlessly with Arduino, and requires only three pins to control. Want a heart matrix of your very own? You can buy this DIY kit for $17.95 on the product page.
How does it work? Three shift registers control two LED matrices, each with 35 LEDs. To make it light up requires connecting power and ground, and the 3 wires to speak the shift register protocol (data, clock, and latch). Need to learn more about shift registers before you try this? Check out our shift register tutorial. You'll need an Arduino or another micro-controller to write messages on the heart matrix. We supply Arduino code and an Arduino library below. Are you ready to build your Heart Matrix? Jump to the step-by-step instructions.
We have a ton of tutorials showings fun projects you can do with your Heart Matrix! Make a sound-sensitive necklace, or connect it to twitter, or control the LED display wirelessly with an XBEE, or turn the Heart Matrix into a real time alarm clock. The Arduino library we supply gives direct access to each of the LEDs so the possibilities are endless! Don't have an Arduino? No worries, we developed the Heartduino, it is a standalone Heart Matrix, built on top of a heart-shaped Arduino clone.


Here you see the entire heart matrix kit contents. Including 1 heart-carved, artisanal Printed Circuit Board (PCB), 3 74hc595 serial-in, parallel-out shift registers. Dual Inline Package (DIP-16). Easy to solder, 2 5x7 LED dot matrices. A total of 70 individually addressable LEDs, 10 300 ohm through-hole resistors, 1 10uf through-hole capacitor, For exact part numbers and individual pictures check out the parts section of the tutorial.

FFW Video

Watch the Heart Matrix being made in fast forward. The process should take about 30 minutes but here you can watch it come together in just 1! If you are building this kit, heed this warning: Make sure to solder the LED dot matrices before you solder the shift registers! Otherwise you will not be able to reach the pads where the dot matrix pins go into the heart board. Follow the order in the video and the step-by-step instructions below and you will be fine. Post a comment if you have a question.

Heart Matrix in 6 Seconds

See a few the Heart Matrix' capabilities in action. Sound-sensing, text display, and time keeping.

Step-by-Step Instructions

Step 0 Insert the first LED matrix in the Correct Orientation.

The kits comes with two 5 by 7 LED matrices. Put the first one in so that the letters on the Matrix (here there is a big M and it says thailand on one side) are facing out to the right as shown in the picture. This ensures that the Cathode Column 1 (CC1) pin is in the hole labelled cc1 on the back of the heart matrix PCB. You can double check you have the correct configuration by connecting the CC1 to ground and any of the anode row pins to 5v (through a resistor). An LED in the first column of the matrix should light up.

Step 1 Insert the other LED Matrix in the Same Orientation.

Insert the second LED matrix in the same orientation as the first. The letters on the side of the matrix should be on the right side of the heart. Make sure the matrices are on the side of the heart matrix PCB that is silkscreened with circles. The rest of the component will go on the other side of the board.

Step 2 Tape the matrices down

This step is optional, but will probably make soldering much easier. We like to tape the two LED matrices to the board with some scotch tape. This way you can make sure there will be no big gaps between them after you solder them in. Also the tape prevents the matrices from falling out when you flip the board over to solder it.

Step 3 Solder the LED matrices and chop of the leads.

Now solder the LED matrices into the PCB. Make sure to have good connections, because two of the rows will get covered by the shift registers and you wont be able to go back and re-solder them. After soldering we like to chop of the metal leads with some cutting pliers. This gives more room for the shift registers we are going to insert above the LED matrix pads. Make sure to use eye-protection when cutting metal leads with pliers.. the little pieces of metal tend to go flying, and they have a high affinity for eyeballs!

Step 4 Squeeze the Shift Register DIP Packages

For some reason these 74HC595 shift registers like almost all DIP packages come with their two lines of metal legs a little too far apart. It can be a pain to squeeze them into the DIP-16 footprint on the PCB. We like to use a stapler or a ruler to press the lines of legs together, before we insert them into the PCB. Don't push too hard, just get the legs a couple of millimeters closer.

Step 5 Insert the Shift registers in the Correct Orientation

Now insert the shift registers into the back of the PCB. Make sure to line up pin one with the silkscreened 1. Pin 1 is the pin directly to the left of the U-shaped depression at the top of the shift register DIP package. Make sure the shift registers are in the orientation shown in the picture.

Step 6 Plier Pinch the Resistors

This step is also optional, but probably will make your life easier. Pinch the resistors with some pliers so that their metal legs stretch out in parallel directly from their little carbon-film bodies. This makes them much easier to slip into the PCB.

Step 7 Insert the Resistor

After squeezing the resistors they should slide easily into the slots marked 10 (for 10 ohms). Unlike the LED matrix and the shift registers, the resistors are symmetric and can be inserted in either orientation.

Step 8 Insert All the Resistors

Now put all the resistors into their slots and solder them down.

Step 9 Insert Capacitors

Almost done! Just add the two capacitors to their slots and all the components will be in. The yellowish capacitor is 0.1uf and the blue capacitor is 10uf, but in this circuit it doesn't matter which slot you put them in. In truth, you could probably get away with not inserting the capacitors at all. They are just there to smooth out any power fluctuations int the circuit driving the heart matrix.

Step 10 Connect the Headers or Wire

Before doing this step think for a second about how you want to drive your heart matrix. If you are going to plug it into a breadboard, then you should probably solder the breakaway male headers included in the kit. However, if you know you will be driving the heart matrix from an Arduino or a circuit that is far away from the heart, you may choose to solder hook-up wire to the five pin interface.

Step 11 Done!

If you made it this far, then great your are done! Your heart matrix should look like the picture, and you are ready to test it out. Got an Arduino handy? Connect the three signal wires (Data In, Latch and Clock), to three pins on the Arduino, and give the heart matrix power and ground. In the sample code which you can grab below, we connect the data pin (the one next to the 5V) to pin 2 on the Arduino, the latch pin is connected to pin 3, and the clock pin is connected to pin 4.

Heart Matrix Sample Code

Here is some code to get you going with your heart matrix. Connect your heart matrix data, latch and clock pins to 3 pins on the arduino. We use pins 2, 3 and 4 in the code. Connect the ground and 5V Heart matrix pins to the 5V and ground on the arduino. To make a heart matrix object just write:
 HeartMatrix hm = HeartMatrix(2,3,4);
To change the displayed message use the function:
 hm.set_message("Your message Here.."); 
This code uses the mstimer 2 library, as well as our Heart Matrix Library, both downloadable below in the downloads section!
/* LucidTronix write messages on the Heart Matrix.
 * For instructions details and schematic, See:
 * Connect the data, latch, and clock pins
 * to the corresponding pins on the heart matrix

#include <MsTimer2.h>
#include <HeartMatrix.h>
// dataPin is on 5, Latch is on 6, and clock is on 7
HeartMatrix hm = HeartMatrix(5,6,7);
void displayer2(){
void setup() {
   hm.set_message(" Your Message Here ");
void loop() {


Here is some older sample code which uses the FrequencyTimer2 library for the interrupt function (It will not work on Arduino Leonardos so we prefer to use the MSTimer2 library demoed above. You will also need our Heart Matrix arduino library which you can download below. Our Heart Matrix uses this nice 5 by 7 font, no need to download it though we put it in cpp file.
/* LucidTronix write messages on the Heart Matrix.
 * For instructions details and schematic, See:
 * Connect the data, latch, and clock pins
 * to the corresponding pins on the heart matrix

#include <FrequencyTimer2.h>
#include <HeartMatrix.h>

// dataPin is on 2, Latch is on 3, and clock is on 4
HeartMatrix hm = HeartMatrix(2,3,4);
void displayer2(){

void setup() {
   // Set refresh rate (interrupt timeout period)
   // if things break try making this number bigger
    // Set interrupt routine to be called

void loop() {
   if ( millis() > 5000) hm.set_scroll_wait(50);
   if ( millis() > 10000) hm.set_message("I Love LucidTronix");

Heart Matrix Library

Download the arduino Library and example code here.
Click Here to Download: Heart Matrix Library

MS Timer2 Library

We use the MS Timer2 library to run the Heart Matrix display function as an interrupt function so that the LED matrices get updated quicker than your eye can make out the individual columns of light. The library is the excellent work of Wim Leers, and we host it here for your downloading convenience :).
Click Here to Download: MS Timer2 Library


Title Description # Cost Link Picture
Heart Matrix PCB The heart shaped PCB holds the shift registers and LED matrices. 1 $7.0 Link Screen_shot_2013-01-17_at_10.01.22_pm
LED Dot Matrix Displays Dot Matrix Panel 35LED Green Row CA Column CC 12-Pin DIP Value: 2.8v Green 2 $0.99 Link 2005497
Shift Register IC 8-BIT SHIFT REGISTER 16-DIP Serial to Parallel Tri-State 2 V ~ 6 V Value: 74HC 3 $0.63 Link Screen_shot_2012-12-28_at_7.40.34_pm
Capacitor Ceramic Capacitors CAP CER 0.1UF 50V 20% RADIAL Value: 0.1µF 1 $0.24 Link Screen_shot_2012-12-28_at_7.39.17_pm
Resistor RES 100 OHM 1/4W 5% CARBON FILM Value: 100 10 $0.08 Link Screen_shot_2012-12-28_at_7.27.43_pm
The heartduino is a heart-shaped arduino clone complete with onboard sensors and a 70 pixel LED matri...
Connecting the MCP79410 real-time clock chip and our Heart Matrix you can show the time with love....
Combine an electret microphone, Arduino and a heart matrix for a sound-sensitive wearable device....
Standalone programmable Heart-Shaped LED display....
Control the Heart Matrix LED display wirelessly, using XBEE radio modules....
A QWERTY keyboard you build yourself....
Keyboard kit using CD4021 shift registers and big through hole buttons....
RGB Flashlight, wearable sound art, rainbow lamp....