For those who want a relaxing or a mesmerizing colorful light show, for either a baby room, Christmas decoration, or just for fun, here is my ambiance enhancer. I'm getting really enthusiastic responses from 6 month old babies to older kids at all ages.
The Neo Pixels LED strip (aka WS2812B) combined with an Arduino and an IR remote control make a killer combination either as a cloud lamp look, a round paper lantern look, or any other form you'd like. I've used this to substitute the existing room lamp: AC power from the existing light socket feeds the 5V power supply and an ordinary 220V light bulb which hangs below the LED lamp.
110V-220V Warning: DO NOT BUILD THIS UNLESS YOU ARE FAMILIAR WITH THE SAFETY PRECAUTIONS FOR WORKING WITH HIGH VOLTAGE.
Stuff you'll need:
- Two Arduino boards (I used the Cactus Micro Rev. 2 but you could easily use arduino nanos)
- LED strip like the WS2812B (I used 150 LEDs which suit a medium room as a night lamp)
- Compact power supply - 5V, at least 0.06A X 150 LEDs + Arduinos so 10A (I used this)
- Large (~1000 uF) capacitor
- 2X Power jack connector for easily detaching the lamp
- Compact IR remote (just the remote, LED not needed). Any other standard remote would also work.
- IRM 3638 IR Receiver
- Green LED, 220 Ohm resistor
- Jumper wires
- Paper lanterns - at least 10" dia.
- Fishing line
- Zip ties
- Double-sided tape or hot glue + gun
- ~59 cm (23") long, 12 mm (1/2") dia., Light-weight aluminum tube
Step 1: Testing Your LED Strip
You'll start by coding and testing the animations before hanging the whole thing on the ceiling. You'll need to download the FastLED library for this step and the SimpleTimer library for the next step.
Connect the board as seen in the schematic Figure, and upload the attached test_strip sketch. You should be able to see green and purple shades gradually moving on the LED strip. Key variables are MAXPIXELS (line 5), fps (line 8) and current_anim (line 14).
FastLED is incredibly powerful and I encourage you to explore its features here.
buzzandy from hackster.io also used this library for some amazing effects.
Step 2: Mounting the Strip Inside the Paper Lanterns
Some people go with a cloud-like shape, but I believe it could potentially become a dust-collecting monster. So I mounted the 150 LED strip spirally inside 3 paper lanterns hanged horizontally. Other possibilities: a ring of paper lanterns or a disc of 6 lanterns with a central 7th lantern.
To mount the LEDs first insert one side of the lantern's metal support inside the lantern, then gently insert loops of 8 LEDs inside, fixing every loop to the support with hot glue (recommended) or double-sided tape. Space them evenly with 6 loops per lamp, and 3 LEDs intermediating between the lanterns (do not cut the strip between lanterns). I recommend finding a temporary place for hanging the strip close to a computer, leaving the Arduinos accessible until the coding step is done and the lamp is ready to be hanged on the ceiling.
Step 3: Adding a Remote Control Module, an Ordinary Light Bulb to the Final Sketch
If you want to hang this LED lamp on the ceiling you'd need to remotely control it. Other options such as control via your phone and Blynk are available, but I found them slow and complicated compared with a simple IR remote controller. I had troubles running the IR decoding routine with the NeoPixels fragile timing demands. If you managed getting NeoPixels with an IR remote / Blynk please share your experience in the comment section! I decided to leave the remote control to a second Arduino which is connected to the main Arduino by a simple I2C bridge.
Ordinary light bulb
Each LED on full power only generates according to the specs about 0.4 lumens (~1/1000 of a 40W incandescent bulb). I will be using only 150 LEDS and expect to get the light intensity of a night lamp, so I decided to include an ordinary E27 light bulb which is shut down by the Arduino when an LED animation starts.
Putting it all together
For this step you'll need the built-in Wire and IRLib libraries. Connect everything according to the attached schematic (you can leave the power supply connected to a regular 220V electrical socket for now) and upload the two attached sketches top board in the schematic is the I2C slave, while the bottom board is the I2C master. If you're using a different remote than the Magic Lighting Remote I used, leave the sketches in DEBUG mode, and open a Serial monitor on the I2C master (IR receiver board). Map your remote buttons' codes (adding 0x if necessary) and replace the block containing hex codes in the I2C slave sketch.
Step 4: Final Touches
Customizing your remote control appearance
I like the magic lighting remote as it is compact, its IR LED can be bent towards your receiver and most importantly - it's easy to customize its appearance as follows:
- Take a very straight photo of your remote, placing your camera exactly above it (do not tilt)
- Place it in PowerPoint or Inkscape (I Used inkscape, attached my design as .svg file), measure the controller's height/ width with a ruler, resize to match exact dimensions in inches.
- Draw your controller layout, using the photo as a template. When done remove the original photo from beneath.
- Print, cut and tape above the original cardboard.
As you can see in the attached photos, I also hacked the LED out and directed it towards the receiver, which was critical for the thing to work. The top cover is made of cardboard so I pried it gently with a screwdriver, cut a small rectangle of the upper side and bent the LED. I then boosted the signal some more by placing an aluminum sheet cone on it, which also improved the reliability.
Hanging the lamp from the ceiling
- Drill a hole at the aluminum tube center for the 3 wires (5V, Data, GND) connecting the strip to the Arduino.
- Insert the wires through the hole and pull them from one of the sides of the tube.
- Push the bar through the center of the 3 lanterns, use zip ties or any adhesive you'd like to fix this setting.
- Connect the 5V, GND wires hanging from the tube's side to the LED strip with a Jack connector. I recommend using a second Jack for the Data wire, so that the lamp can be easily disconnected for debugging etc.
- Connect the other end of the wires to the Arduino and the power supply
- Hang the lamp from the aluminum bar using double fishing wire at each end (this really depends on your existing lamp's settings...). Result should look similar to the photo.