A simple DIY light-up greeting card

Wednesday, February 25th, 2009

Some friends let Carly and I crash their (super-sweet) apartment in Providence a couple of weekends ago, and I decided to say thanks with LEDs.  Specifically, with a greeting card that lights up when you open it.

This is a pretty simple circuit, obviously — a battery, LEDs, and a switch could cover it.  In fact, it’s more or less a solved problem, since what I wanted to do was just a simpler version of the card in this instructable.  But I decided to look around for a more elegant switch, since moving parts are prone to failure and the one in the instructable just looks janky (plus I didn’t really have any materials to make it from).  My first and stupidest idea was to use a photoresistor to detect when the card was open.  This is stupid because a photoresistor is only going to work really well when there’s lots of light, but when there’s lots of light you can’t see the LEDs (uh-durr).  To give myself some credit, I wasn’t planning to tie the LEDs’ output directly to the photoresistor’s input — I was going to use a transistor to amplify the input from the photoresistor — but it was still a dumb idea.

But at least the failed photoresistor experiment led me to this evilmadscientist.com how-to, which turns on an LED only when it’s dark.  I realized that if I was going to avoid using the sliding switch (which closes the circuit when the card is open), I was going to have to put a contact on the other side of the card, and turn the LEDs on only when the circuit was broken.  Being pretty much a n00b (I’d never used a transistor before), I didn’t really know how to do this, but by playing around with the dark-detecting LED design, I was able to substitute a simple switch composed of a magnet and two modified paperclips for the photoresistor and basically use the same circuit.

Here’s the front of the card (the card’s admittedly corny theme is Ryan and Heather’s black cat Pirate Jenny, nicknamed “Chupacabra,” which means “goat sucker”):

The front of the card

And here’s the inside.  Here you can see the entirety of the switch — the magnet glued to the left side of the card closes the connection between the two curled paperclips on the other side.  As you’ll see on the back of the card, this diverts current from the transistor’s base, turning it off and stopping the flow of current to the LEDs.  That is, when the card is closed the lights go off.

Inside the card

And finally the back of the card and the circuit itself:

The back of the card & the circuit

You’ll notice that this looks pretty janky too.  All I can say in my defense is that I kept the lion’s share of jankiness on the back of the card.  I only had so much to work with here.

While in my opinion my switch design is an improvement, it has one noteable disadvantage to the sliding switch, which is that the circuit is always closed and drawing some power from the battery.  It should be relatively little power, though, and I think the battery should be good for at least a month.

My DIM weekend: spice racks and camera lenses

Monday, September 22nd, 2008

Finally got my hands on a glue gun today and put together the magnetic spice rack that’s been on my todo list for a few weeks.  I got the materials list from here, but it probably originally came from here.  Basically, you hot-glue magnets to the back of watchmaker tins and fill them with spices, and you get a pretty and convenient way to store your spices, like so:

Magnetic spice rack on my fridge

I’m pretty happy with it, but the instructions leave out a few important details.  First, the hot glue doesn’t bond well to the magnets or the tins if they’re cold — like the glue gun manual says, you’ve got to heat metal before you can effectively hot-glue it.  You could do this by leaving them out in the sun or under a hot lamp.  I didn’t have either option today, so I laboriously heated the magnets and tins with my soldering iron.  I also used “super strength” hot glue, which seems to work better than the garden variety.  Also, I’m no physicist, but I’m pretty sure you can’t just glue either side of the magnet to the tin — if you use the wrong side it won’t stick to the fridge nearly so well.

Also, the watchmaker tins are a clever hack, but they’re not that well suited to the purpose.  The lids are made to lift off without much resistance, so I ended up gently bending the sides of the lids in to keep them from popping off unbidden.  For this same reason, you have to be careful when pulling them off the fridge — if you grab them by the lid, Roomba will be sucking more than his share of allspice.  Screw-off lids would work better.  I would also prefer larger tins (you can get them one size larger) — these don’t hold much more than a couple of tablespoonfuls of spice, so you’ll be refilling your chili and curry powder pretty frequently.  But larger tins would be heavier and would probably require stronger magnets, which would (Catch-22) make the tins pretty tough to pull off of the fridge.

I also got fixed my camera lens, which I broke on the day I took this.  The only problem with it was that I broke two little plastic “teeth” off the lens mount (the part that connects to the camera body) when I dropped it on the floor.  It looked like an easy fix, but when I sent it to Canon they quoted me $100 for the repair.  Looking around online I found one place selling the little plastic piece I needed.  Six screws and $20 (shipped) later my lens was like new.  So I guess the moral is, if it seems like you could fix it yourself, you probably can.