Introduction: Arduino Charliplexed Heart, Just in Time for Valentines Day.

Here is an Arduino controlled Charliplexed LED heart just in time for Valentine's Day. It uses a total of 6 wires to controll the 27 LEDs. A PIC or AVR could easily be used for this, but I have Arduinos lying around and they are easy to program. Plus I want to be able to have input options later when I have time to write them.

Go here for a great explination of Charliplexing.

Update 5/20/08:
I've actually made a kit for this, and I'm now taking pre-orders on my website. I also created a flash-based animation programmer. Check them out and let me know what you think. The programmer generates the newest version of the code, so it will still be a useful tool if you make your own heart. You will just need to change out the LED array with one that maps to your own.

Update 2/12/08:
I've updated the software to v 1.3. I found a function called PROGMEM in the avr/pgmspace.h library (included with Arduino software) that allows you to write directly to the Flash ROM. That now gives about 500+ frames of animation, and is an extremely easy thing to implement. You can check out the new software here.

Two of my friends are currently working on getting a bitmath version that should increase this even further (to around 4,500 frames), but while working, it is not very easy to work with in creating animations. I'll release that once I have my Processing program up and generating the animation codes.

Update 2/11/08:
I've put the schematic on step 1. There is a direct link to it on my flickr as well.

First Animation

Second Animation

Step 1: Required Materials

- 27 LEDs I would suggest red, but these would be cool too.
- 6 resistors to match your LEDs I used 100R, but go here to figure it out yourself.
- 6+ wire cable, I used Cat5 because I had it lying around
- soldering setup
- some type of prototype PCB, I used this one from Radioshack and it fits the heart perfectly.

Update 2/11/08:
Here is the schematic as viewed from the top. You will want to review that before, during, and after building. Once it is built, you will need to test thoroughly. Each 2 wire combination to a battery should light up one, and only one, LED. If 2 light up, then something is wrong. There will be 3 combinations that won't light anything up, so don't worry, and just make a note. If more than 3 combinations fail to light up, then you probably have a short, or a fried LED.

Step 2: First Layer

Now we begin the soldering. For this step, most of the instructions are in the picture.

Basically, you are going to create 4 sets of two pairs. They will all be aligned in the same way. Then you will connect the middle sections of both the top and bottom.

Step 3: Start the Layering.

Now you will continue to solder and start layering the connections. This is where it starts to get complicated. At least you are going to just mirror your connections so far. Whatever you do on the right, you do the opposite on the left. Just be careful not to create any shorts, and give the bent wires enough room that they won't short if moved a little.

1. Top right + lead bends over left to the top right - lead.
2. Top right set's bottom - lead bends to the right to make contact with the + lead.
3. Do the same for the bottom set.
4. Bend the top set's top left - lead down to the bottom set's top left - pin.
5. Bend the lower right + lead of the top set down to the lower right + lead of the bottom set.
6. Do the opposite on the other side.

It may look bad, but you are going to end up with something that looks like two C's facing each other on each side. The top middle sections will be joined, as well as the bottom middle sections.

You then add the two center LEDs in opposite alignment of each other. You want the top one to be in the same alignment of all the others so far, and the bottom one to be the opposite. Then you connect the - of the bottom one to the + of the top one, and then to the top center connection. Then you do the opposite for the other two, and connect them to the bottom center connection.

It will be a total of 2 separate connections on each side, with the 2 in the middle. The start of the 6 total connections. Now we just need to fill in the other possible combinations (a total of 30).

Step 4: Final Layers

Here we start the final layers.

The two side pairs are going to be installed the same way as the middle pair was. But now you connect them to the C shaped connections closest to them. One to the outer, and the other to the inner of their side.

Then you install the next lower middle pair of two in the same fashion of opposite alignment, and connect them to the two middle C connections. However, I wouldn't advise you to connect the bottom most LED into it's set yet, as you are about to bend a lead under that connection.

The next two I installed aligned in the same direction on opposite sides of the bottom middle LED. I bent the + lead of the right one between the bottom center LED and it's mate. Connecting to the - lead of the bottom left LED, and the outer left C shape. You then take the bottom left LED's + lead, and bend it to the bottom right LED's - lead, and then to the opposite outer C shape.

The final LED I bent the + lead to the bottom middle's + lead, and the - lead over to the outer left C shape. You should now clip any stray leads, and make sure there aren't any shorts.

You will end up with the pairs covering all but 3 of the possible combinations that 6 solid connections will give you. So poke around with a 3v + and - wire and watch the different LEDs light up one by one.

Step 5: Connecting and Programming

Now all that's left to do it to wire it up, and connect it to an Arduino. Since I'm using Cat5, I'm going to go with that color scheme. Here is as best I can describe it from the view of the first picture.

Orange - top middle
Orange w - bottom middle
Blue - inner left C shape
Blue w - outer left C shape
Green - inner right C shape
Green - outer right C shape

You are going to want to test the connections from the other side of the cable. This makes it easy to touch random combinations to the 3v batteries.

Here is a spreadsheet I created to track the connections. If yours are different for some reason then make notes, as changes will have to be made when you load the software.

When I started out, I used a number scheme based on the columns. There were a total of 5, with the outer ones having 6 each (65556). Ignore that for programming, go with the 1-27 one, as it is much easier to address in the program. However, it is still useful while testing, as trying to remember which one is 16 can be crazy, but finding the 3rd one in column 4 (43) is easy. Both are there for you.

Here is the source code that I used for the two animations in the videos. Remember to put a resistor between your Arduino pins and your wires!!

Unfortunately there is a limitation on the Arduino's array size. I'm not sure what it is, which is why I made an array of bytes to save space. Basically you can have any two of the animations, but not all of them. If the Arduino doesn't respond, comment out some lines of the animation, and then send that over.

This is only the first version. I've already written something in process that I can use to plan the animations, and once I've got it generating code to work with my program, then I'll release that too. I'm also working on a second version of the software with multiple animations and interactive controls. I'll make sure to update once I've got some of that working. Subscribe to my blog for any updates.


BashA1 made it!(author)2016-12-15

sir jaypee can you tell me about the materials or components to be use for this and group are interested with your adruino charliplexed heart..

mbravo10 made it!(author)2015-09-30

Hello, I have the new version of your heart, but i can't find the schema for the pin of the arduino ? Can you tell me this please ?

RenalsH made it!(author)2015-03-22

Ok so on the schematic- that is "viewed from the top" so I am assuming that is meaning from the side where the LED light shines from? So when I am on the back side soldering leads the image should be mirrored so that all connections match up correclty?

monroe07 made it!(author)2015-01-31

Hey could you mark on the schematic where you connected the wires respectively? your pictures of the wires are not very clear. Thanks

zamanm made it!(author)2014-12-23

nice job! do you have a regular schematic for this project that has the arduino and the leds together.

nickdudego3 made it!(author)2014-10-02

What size LEDs did you use?

I can buy a pack of 5mm LED's but I want it to fit

dgs made it!(author)2010-08-20

dgs made it!(author)2010-08-20

Made one of my own on PIC12F675 (coz i'm into PIC mcu world :] ). Driving 16 LEDs on 5 pins. Take a look here:

mertaxoy made it!(author)2010-08-14

hello jaypee 4227 are you sure that your schemantic is correct ?? i have built the same and something is wrong :-/

moosebumps made it!(author)2009-03-03

Fun project! I built this for my valentine and it dazzled her so. Turns out she's a demanding ladyfriend and wanted to see the project go further. So as per her request it now pulses along to the music. Soon it will all get stuffed into a yo gabba gabba plex doll. Your polished code was quite an asset. Thank you! flickr vid: www.➡.ws/念

jaypee4227 made it!(author)2009-03-04

Wow, that's really cool. Your link was broken, so I had to look you up. Here is the link:
I'm going to do a writeup of this on my blog. Do you have a copy of the code online?

Great build!

moosebumps made it!(author)2009-03-04

Wow! thanks for the blog feature and fixing my poor link. I will get the code posted this evening and drop you a comment. Thanks again.

akatsuki666 made it!(author)2009-02-06

and for your answer i used his improved program he has listed above with a breadbord so i can put as many leds as a want hope that answers your question

akatsuki666 made it!(author)2009-02-06

finaly i found a program that works with no errors ty vm!

Maniacy made it!(author)2008-11-12

Great project. I don't really see the C shapes, could you mark the positions somehow on the schematic or give the numbers of the LEDs with pin to which to solder?

jchord made it!(author)2008-11-09

what size are the leds you used?

randName made it!(author)2008-10-18

I suggest using the I/O port registers for setting the state of the pin. It uses less cycles and would be faster, thus improving the quality of animation.

GorillazMiko made it!(author)2008-02-14

Really cool Instructable! Very nicely done, it's really cool. And awesome job winning the random prize! :P

Bongmaster made it!(author)2008-02-09

looks kool.. got a schematic? the photos are a little confusing on thier own :)

jaypee4227 made it!(author)2008-02-11

Just added it to step 1. Here is a direct link:

craig3 made it!(author)2008-02-09

you could add this to a nice box with an on/off switch as well, instead of the normal gray project box, why not try to put it inside of a jewelry box lid

jaypee4227 made it!(author)2008-02-10

I've actually got a plan to make a PBC for this, so that it could function as a broach, or be pined onto a bag easily enough. I'll update my project blog once that stuff is done, but between school and work, my time is limited. This is just the prototype, and I uploaded it early because of the "Get the LED out" contest.

Chris+Tucker made it!(author)2008-02-10

I've actually got a plan to make a PBC for this, so that it could function as a broach, or be pined onto a bag easily enough.

Avoid Logan Airport here in Boston. The natives are a simple and ignorant people, easily frightened by glowing lights on one's clothing.


jaypee4227 made it!(author)2008-02-10

I actually live in Somerville, where that whole ATHF thing happened (1-31-07 nevar forgit!), and I remember when the whole Logan thing happened as well. Somerville is actually generally pretty cool about such things, and the thing about the city being paralyzed for a while isn't really true. They closed the Sullivan T stop for about 2 hours while they tried to determine what the device was, and then the media took hold of the story and ran with it. I guess it's more sensational when people are "paralyzed with fear". As for Star Simpson, the stories I've read seem to convey that it wasn't as much the device, but her confronting officials asking her basic questions. However, I've not spoken with her directly, so I'm not going to pass any kind of judgement. Once I get this thing finished, I'll be sporting it around town, and I doubt I'll get anything other than "wow, where can I get one of those?"

Chris+Tucker made it!(author)2008-02-10

I'm in Mattapan myself. I was listening to the police scanner, and I heard the following on one of the media feedback channels: "Aqua Teen Hunger Force? What the hell is that?" I then knew instantly what was going on. My only regret was that the weather had been so filthy for a while, that I wasn't doing my usual walking about the city. My usual routes lead me past two or three of the sites where these things were. It would have been easy to snag one!. BTW, nice job with the thing! The videos are impressive.

cr0ybot made it!(author)2008-02-09

Added to the Arduino Group! ;D

jaypee4227 made it!(author)2008-02-10


About This Instructable




Bio: My name is Jimmie Rodgers, and I like to dabble with hobby electronics for fun. Visit my project blog for more things I've done ... More »
More by jaypee4227:Arduino Charliplexed Heart, just in time for Valentines Day.
Add instructable to: