A friend of mine got married last week. He and his girlfriend (now wife) are a really geeky couple. She is a game designer with a web comic on board games, he is a new media artist. They're both crazy creative. So when they announced they were getting married, I immediately thought I should try to build them a fitting wedding present.
Giving presents that you made yourself is really awesome. It shows the receiver you put thought (and time) into a unique present, not just money and five minutes in a store. In this case, I got to use a few techniques I had not tried before.
Only downside: I had to give away the whole thing once it was finished ;-)
If you like this Instructable, please consider voting for it in the Lamps contest by clicking on the vote banner top right of the page. Thanks!
Step 1: Materials and Tools
Here's what I used to build this 8-bit heart LED matrix:
- LED strips (30 LEDs per meter, 12 volts, addressable in segments of three LEDs; I got these)
- back panel: 350x310 mm (13.8"x12.2"), 12mm thick (.47")
- slats for the frame: two 350x40 mm (13.8"x1.6") and two 310x40mm (12.2"x1.6"); all 8 mm thick (.31")
For previous projects I had used a laser cutter, and maybe I should have this time as well for cutting out the grid and the template. The thing is, I couldn't figure out what would take more time: making a very detailed design for the entire thing in order to have it lasercut very fast, or just cut out the basic shapes and then trimming them as I went. I chose the latter approach, so these are the tools I used:
- circular saw (another type is fine too of course, whatever you can cut straight lines with)
- miter saw
- soldering iron
- drill and hole saw
- sand paper (both wet and dry)
- ruler, scissors and/or hobby knife
The power supply I used was a second-hand laptop adapter. It can supply both 12 volts and 5 volts, which came in very handy, but most Arduinos you can power with 12 volts as well. Do make sure you test the voltage on any second-hand power supply using the multimeter, to make sure it is what you expect it to be.
If you want to add an arcade style congratulations message on the back the way I did, you will also need an inkjet printer, wax/baking/freezer paper, a stapler and painter's tape.
Step 2: Making a Frame and Grid
First I figured out how many pixels were needed, by drawing a heart in a spreadsheet :-) An 8-bit heart fits in an 8x7 grid, but since the LED strip can only be cut in segments of three, it had to be 8x9. So I cut the LED strips in pieces of three segments, each 300 mm (11.8") long.
The size of the pixel squares was dictated by the spacing of the LEDs on the LED strip, and I spaced the case from there. Each square around an LED could be 33 square millimeter (1.3"). Allowing for a little space extra around the grid, plus 8 mm (.3") thick walls of the case, I figured the whole backpanel should be 350x310 mm (13.8x12.2").
The optimal height of the grid I determined by powering one segment of LED strip under a prototype cardboard grid, and holding the acrylic panel above it to see at what height the light would come out best.
The grid then consists of ten strips of plastic of 270 mm long (10.6"), and nine strips of 303 mm long (11.9"), all about 36 mm wide (1.4"). I say about, because I had to trim the bottom side where the LED strips cross them, and cut off an extra 2 mm from the top when I discovered the grid turned out to be a little too high to fit the frame. I cut small slits a little over half the width of the strips, every 33 mm (1.3"), starting at a 4 mm (.16") margin. Cutting, trimming and folding the strips together was a lot of work.
I drew the grid and where the LED strips would go on the back panel, to make sure I calculated correctly, and to check if the plastic grid I was going to make would fit each LED nicely. When it did, I glued the LED strips on the back panel (they come with double-sided adhesive tape) exactly where I had drawn them.
Then I glued the slats on the back panel, after cutting them at 45° angles to form a frame. I was a little worried that the frame would be too small to house the grid, the Arduino and the cables along the sides, but it turns out the cables push up the grid nicely and keep everything in place. From the back I screwed in a couple of small screws in pre-drilled and countersunk holes to make sure frame and back panel will also forever be joined ;-)
Step 3: Cutting Out a Heart Template
I cut a piece of black cardboard the same size as the back panel and drew in the grid. Then I cut out the right squares to get the heart shape.
Once the grid and the electronics were put in the frame, I just stuck the template between the frame and the front acrylic panel. By rotating the hobby knife, I carefully drilled holes where the screws would be between the front acrylic and the frame. I pre-drilled and countersunk these holes too. Be very careful when drilling holes in acrylic panels, because they can crack. Before drilling, put painter's tape over where the hole is going to be (and mark the spot on the tape) and if you want to be really safe, clamp the panel between two blocks of wood before drilling.
Before screwing the acrylic panel on, maybe smooth its corners and edges a little using wet sandpaper, because they can be sharp.
Next step: wiring up, and seeing first light!
Step 4: Wiring and Coding
After the frame was finished, I drilled a hole in the top left of the frame using a hole saw. Stupidly, the hole turned out bigger than the actual arcade buttons I had bought... Fortunately, instead of the red ones that would have complemented the red heart so well, I also had a larger blue one lying around. That fit perfectly, at least after trimming the large plastic nut a bit.
I soldered two wires to the arcade button pins and on the other end to pin 7 and ground of the Arduino. I used an Arduino Pro Mini which is perfect because of its small form factor.
The LED strip I bought can be addressed in segments of three LEDs, needs 12 volts and has three wires. Connect the power supply to the positive and negative wires (either using a screw terminal or by soldering) and solder the data wire to pin 3 on the Arduino. For power, put either 5 volts directly to VCC on the Arduino, or 12 volts to RAW. Connect the ground wire from the LED strip to Arduino ground.
After cutting the grid here and there, it all fit nicely between the grid and the sides of the frame. I also put in some hot glue where the cable from the power supply enters the frame, in an attempt to fasten it a little.
Upload the code to the Arduino Pro Mini; after testing, you can just unplug. The code will run every time the LED matrix is plugged in. My code is in the attached .ino file. I basically took a large chunk from the DemoReel100 example script in the FastLED library and added to it my own red heart patterns and the button control. I think I commented the code well enough, but feel free to ask any question in the comments.
The LED matrix is quite bright, even though it is hard to tell from the photos. I didn't set the LEDs to the maximum brightness of 255 though, as I wanted the 8-bit heart to be pleasant for them to look at in the living room instead of have them leave it off all the time because it hurts their eyes.
Anyway, now we're ready for the finishing touch!
Step 5: Include a Wedding Wish
It seemed like a nice idea to put a wedding wish on the back of the case. A few weeks ago I saw a technique I liked very much and I thought was perfect for this project. If you print a design (mirrored) on wax paper using an inkjet printer, you can then transfer your design directly onto the wood, which I think gives a beautiful effect.
There are manyInstructables explaining how to do it, but I have one good tip if you want to try it yourself. If you feed the thin wax paper into your printer, it will probably jam. Some tell you to tape the wax paper to normal paper, but that didn't stick in my case. What worked for me was staple the wax paper to normal paper. Be sure to put the staples in along the top edge, not vertically, otherwise they may get stuck in your printer. The normal paper also enables you to use painter's tape to fix the printed paper to the case when transferring the image on with a plastic card.
My design is the wedding date, the happy couple's names, the wish and my name, with 8-bit hearts on the sides and Mr. and Ms. Pac-Man to complete the arcade feel. I've attached the design as an xcf-file for you to edit using free image editor GIMP.
I first tried a great arcade type looking font called 8 bit wonder, but a test on a piece of wood showed that the ink from the thick black letters would run. The second time I tried with the thinner font Mozart NBP, which has the added advantage over the first font of containing asterisks, an ampersand and an exclamation mark. I am very pleased with the result.
Step 6: The Wedding (and Things I Would Like to Have Had Time For)
The wedding was beautiful. The ceremony was in a forest, and very geeky. I mean, they played The Rains of Castamere (fortunately it didn't turn into a Red Wedding) and the Star Wars theme. Conversation at the reception ranged from hacking to board games -- and there was an 8-bit wedding LED matrix :-)
But what would I have done differently in my wedding present, if I had had (even more) time to spend on it? A couple of ideas:
- I was planning on including a typical arcade-like "Press here" blinking right below the arcade button at startup.
- The LED matrix was built using a strip that can only be addressed in three LEDs segments, which prevents showing more different animations. That could be remedied using a strip in which each LED is addressable, which would also render the template unnecessary. Programming the matrix would be a lot more work, but also be a lot of fun:
- inverted heart
- moving sprites of Super Mario and Ms. Pac Man
- the couple's initials
I was also planning on making two controllers, maybe even heart-shaped, each with a red arcade button and a white cable going into the case. That seemed funny and romantic, but maybe also a bit corny.
On the one photo here you see the groom when he first plugs in the LED matrix (this photo and the other wedding picture in this Instructable courtesy of Dani’el van den Berg).
On the other it's me holding the finished product. The t-shirt I'm wearing says 'everything is better with LEDs' :-) That's something I often say, so my girlfriend put it on a shirt for me as a birthday present. Which again shows how much fun it is to make or receive a present somebody made especially for you.