Introduction: Circuit Board Ceiling Lamp W/ Blinkenlights
The lamp itself I created quite a few years ago from a spare halogen lighting kit and several defective circuit boards plus other random junk. What was missing all that time were some totally gratuitous, but fancy, Blinkenlights. Since I learned a bit about Arduinos recently and acquired two of them in the process, the time had finally come to address this lack.
Step 1: The Lamp's Design
Let me explain a few things about the idea and the making of the lamp first. You are of course free to see it as a spaceship about to land on the ceiling, but other interpretations have been offered. The circuit boards are merely used as raw material for the body of the lamp. They have only structural and no electric or electronic purpose. As you can see in the photos, they have been fastened using plain hardware store screws and nuts. In some cases I used the boards' mounting holes, in other cases I drilled new holes. The "neck" is a thin metal bar and the "head" is the chassis of an old cassette recorder.
For the halogen lights I used the standard 12 V power supply from the kit (it's even dimmable) - the white block on top. The three halogen spots are connected with insulated speaker cable. That's about it. You can still replace each of the halogen "bulbs" when they fail, but I found them surprisingly durable.
It took a moment to trim the whole thing such that it's balanced horizontally without extra weight when hung from one point. This mainly consisted in finding the proper spot for the transformer which is clearly the heaviest component.
Step 2: The Arduino
The Arduino is a "Diavolino" (little devil), which is an Arduino Duemillanove/ATmegaXX8 compatible board produced and sold by a company named Evil Mad Scientist Laboratories for a few bucks. It has several power supply options (USB, 9-12 V DC, 3 x 1,5 V batteries), but you have to solder the components to the board yourself.
Step 3: Six Orange LEDs
Now for the blinking orange LEDs. I just mail-ordered a pack of ten based on their specs (wavelength/color: 610nm, diffuse, 5 mm diameter, voltage: 1.8 - 2.3V, current: 20 - 30mA). The Arduino's output pins emit 5 V DC. I played around with a breadboard first, finding that putting pairs of two LEDs in line without extra resistor worked best, producing a bright orange blinking. At least as long as you intend only to have them blink intermittently.
I then put the LEDs in their corner spots on the lamp. This time I only used existing mounting holes in the boards. The LEDs are merely "stuck" in by bits of duct tape wrapped around their "legs", which conveniently also provides insulation. (Duct tape of course also scores on the McGyver scale :-)
Some of the connecting wires were soldered onto the LEDs "on the ground", but I also had to do some soldering in place i.e. on the lamp. The wires are from an old phone line and they fit precisely into the Arduino's upright input/output connectors.
Update: Slightly worried by rafununu's comments I did the tiniest bit of research on Arduinos, LEDs and resistors. Although I am the proud owner of a digital multimeter I resolved at least to try to understand the physics first. I found this post the most helpful http://electronics.stackexchange.com/questions/32...
My Diavolino board has an ATmega328P-PU microcontroller and I run it at 5 V. The graph in its datasheet for the internal resistance of the controller's outputs looks quite similar to that in the post, so I assumed 25 Ω here, too.
My LEDs take 1.8 - 2.3 V, which reduces the output's 5 V to 1.4 to 0.4 V as I have put two LEDs in line. According to U = R * I or rather I = U / R that would result in a current from 1.4 V/25 Ω to 0.6 V/25 Ω. Thats a range from 56 mA to 16 mA. If we assume 2 V voltage drop per LED this results in 40 mA.
Since the maximum current specified is 30 mA for the LEDs and 40 mA for the Arduino, there is indeed a risk of damaging either without adding an extra resistor.
Now for the practical part: The multimeter gives me only about 4.7 V on an ouput pin and 28 mA with two LEDs in line. Without any voltage spikes on behalf of the controller - which I found nothing about - this should be well in the range of what all components can handle.
I might still go ahead and add tiny - say 20 Ω - resistors just to be on the safe side, but it does not seem a terribly urgent matter. Remember, my LEDs only blink a few times every 15 minutes. So lots of time to recover from thermic stress.
On the other hand, it looks like you should definitely add a resistor when hooking up LEDs, which consume less than 4 V, to Arduino ouputs at 5 V. Please correct me if I'm still wrong somewhere, but that's my current understanding.
Note: There are lots of free LED resistor calculators online, e.g. this one: http://www.ledcalc.net
Step 4: Arduino Power Supply
The power supply for the Arduino is through the 220 V AC power line, a plug, an old iPhone power supply with an USB plug. Instead of the standard battery pack I cut an old USB cable and soldered it's power and ground lines onto the Arduino. So currently the blinking only happens, while the lamp is on. But with the power supply through USB I guess I could hook up a power bank to act as a battery buffer, such that the LEDs could blink all day.
Step 5: Conclusion and Outlook
I played around with some blinking patterns and ended up with the morse code for my daughter's name (the lamp's currently in her room) once every quarter hour. Obvoiusly, the Arduino could do much more complicated things, but for a start, I'm quite content with the effect.
If I ever get to add another level, it would probably be some sort of remote control. Fit the Diavolino with a Bluetooth or WiFi shield and let it blink out messages you write or patterns you define on your phone or something along those lines. We'll see ;-)
Participated in the
Make It Glow! Contest