LED Mood Lamp

10,076

109

15

Introduction: LED Mood Lamp

About: Make. Learn. Repeat. Engineering is fun once you start applying it!

I recently came across an LED Cube by Greg Davill. It's a great piece of artwork. Getting inspired by it, even I wanted to make something like that. But this one was way out of my league. I decided to take one step at a time and made a way smaller version of LED Cube as a Mood Lamp. It can be a good starting point to learn about the hardware, which are mostly LEDs and microcontrollers, and software to control them (creating animations).

In this Instructable, I will show you how I made an LED Cube using the popular WS2812 LEDs.

Let's get started!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Things You Will Need

96x WS2812 LEDs

6x PCBs

1x Arduino Nano

1x 5V/1A Power Supply

Step 2: The Plan

The plan is to make a mood lamp. I wanted to keep it simple and so I decided to go with the popular WS2812 Individually Addressable LEDs. The LEDs are connected in cascade which means that you can control as many LEDs you want by just one signal line/wire from the microcontroller. This makes wiring a lot easy.

The LEDs are available only in SMD format. So, the next step will be to design the PCBs.

The next step is to design and 3D print a structure to hold the PCBs in the shape of a cube.

The LEDs will be controlled using Arduino Nano. The last step will be to design and 3D print an enclosure for Arduino.

Step 3: PCB Designing

You can use any software you like for designing PCBs. I am using EasyEDA as it is suitable for newbies like me. I have attached the schematic. Click here to download Gerber files for the PCB.

LED has 4 pins:

  1. VDD - 5V
  2. DOUT - Signal Out
  3. VSS - Ground
  4. DIN - Signal In

As mentioned earlier, the LEDs are connected in cascade which means that the signal comes IN from the microcontroller to the 1st LED at the DIN pin. From DOUT pin, the signal goes to the DIN pin of the 2nd LED.

While designing the PCBs, I had thought of hand soldering the LEDs and so I have kept sufficient space between the LEDs for the soldering iron to reach the pads. But later, as you will see, I went with reflow soldering with my makeshift setup since this method is quick and neat (and satisfying to watch) if done correctly.

Once you have completed designing the PCB, get it fabricated from the manufacturer of your choice. I chose JLCPCB because of its quick service.

Step 4: Assembling the PCBs

At first, I started hand soldering the LEDs one by one. The result was not good and the LEDs were getting overheated which is not a good sign. Also, it is a time-consuming process and soldering 96 LEDs will require a lot of time.

The most widely used method to solder SMD components is called Reflow Soldering. In this method, solder paste (a mixture of solder and flux) is applied to the pads on the PCB and the components are placed on it. The solder paste is then made to melt or 'reflow' by heating it in a reflow oven. This is a quick and neat method if done correctly.

Using this method means I would require a Reflow Oven. But then I remembered a project by Moritz König wherein he used an old flat iron and Wemos to control the temperature. The only thing I had on hand was a flat iron which was still being used. The temperature of the iron reached about 220 degree celsius at its maximum setting and the solder paste I bought melts at 183 degrees. Taking a look at the reflow soldering temperature profile from the datasheet of LED, we can see that the maximum temperature (Tp) is 240 degrees for 10 secs. Everything looks promising and so I gave it a try.

I applied the paste onto the pads using a toothpick and placed the components. The placement is not critical as the solder pulls the components in place when it melts. I placed the PCB on the iron as shown in the photo and turned ON the iron. I turned OFF the iron when all the solder has melted and removed the PCB from the iron.

It worked a treat!

Step 5: Assembling the Cube

I 3D printed a structure to hold the PCBs in place. The 3D files have been attached here. You need to print 1x Skeleton and 6x Holder. Attach the holders at the back of the PCB using superglue as shown in the picture. The PCBs can then be snapped into place on the skeleton structure. It is a friction fit. Sanding may be required.

Do the wiring as shown in the layout. Soldering can be a bit tricky here.

Step 6: Assembling the Base

3D files for the base have been attached here. The base will house the Arduino Nano. There will be a total of 3 wires going to the cube viz. DIN, 5V and GND. I am powering the cube through a USB Phone charger. Make sure that it is capable of handling at least 1A.

DIN pin can be connected to any of the digital pins on the Arduino. I chose D4.

Step 7: Time for Coding

For now, I will be using an example sketch from FastLED Library. Install the library using the Library Manager. Open up the DemoReel100 from the example sketches. File > Examples > FastLED > DemoReel100

Before uploading the code, make the following changes:

  • Define DATA_PIN (pin on Arduino to which DIN of the cube is connected) to whatever you have chosen. In my case, 4 (Digital Pin 4)
  • Define LED_TYPE as WS2812
  • Define NUM_LEDS as 96

And, hit Upload!

Step 8: Enjoy!

Power up your lamp and enjoy staring at it!

Thank you for sticking to the end. Hope you all love this project and learned something new today. Let me know if you make one for yourself. Subscribe to my YouTube channel for more such projects. Thank you once again!

Step 9: Future Plans

  • Connecting the cube to the internet (IoT) using ESP8266 and to notify me whenever an 'event' occurs.
  • Creating my own animations.
Make it Glow Contest

This is an entry in the
Make it Glow Contest

Be the First to Share

    Recommendations

    • Magnets Challenge

      Magnets Challenge
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest

    15 Discussions

    0
    kiwigrinder
    kiwigrinder

    20 days ago

    Nice job. I made something like this not long ago. I used cheap 4x4 RGB LED Matrix Displays from eBay. It is controlled by a ATtiny85 micro-controller. All components including the battery and mercury switch to turn it on are inside the cube itself. Details of the construction is at https://www.thingiverse.com/thing:4022751
    Video at https://youtu.be/mVqQSdfhl90

    Neopixel Mini Cube.jpg4. Wire board to cube.jpg5. Insert board and battery into cube.jpg
    0
    indoorgeek
    indoorgeek

    Reply 17 days ago

    Wow! Love the idea!

    1
    manohar3787
    manohar3787

    Question 22 days ago

    sorry if it is a noob question but your schematic shows a 100nF capacitor for every led which is not visible on the actual PCB, am I missing something or was it removed from the design . What is the purpose of those capacitors for every led

    1
    indoorgeek
    indoorgeek

    Answer 21 days ago

    Nice question. I should have mentioned it. The datasheet for WS2812E recommends a 100nF capacitor between VCC and GND for each LED. A capacitor is needed if the power supply you are using is not capable of handling current surges. I did not use the capacitors as I did not face any problem. Still, to be on the safer side, you can connect one sufficiently big capacitor near the supply.

    0
    AnnaMai
    AnnaMai

    5 weeks ago

    beautiful work !

    0
    indoorgeek
    indoorgeek

    Reply 5 weeks ago

    Thank you!

    0
    NO LIMIT
    NO LIMIT

    5 weeks ago

    Very good..i love this design 👍

    0
    indoorgeek
    indoorgeek

    Reply 5 weeks ago

    Thank you!

    0
    indoorgeek
    indoorgeek

    Reply 5 weeks ago

    Thank you!

    1
    starphire
    starphire

    5 weeks ago

    A nice, well designed project with lots of possibilities for customization.
    Just to note though, WS2812 and compatible LEDs *are* available in other package types from the original manufacturer and others (SK6182 and NeoPixel for example), not only SMD. 5mm and 8mm round through-hole types with 4 wire leads are common. It is true that WS2812 was originally SMD only.

    0
    indoorgeek
    indoorgeek

    Reply 5 weeks ago

    Oh cool! I was unaware of that. Thank you!

    2
    jessyratfink
    jessyratfink

    5 weeks ago

    Nicely done! Saw this project on Insta and I'm so happy it's here :D

    0
    indoorgeek
    indoorgeek

    Reply 5 weeks ago

    Thank you!

    2
    LynW11
    LynW11

    5 weeks ago on Step 4

    If you are careful....you can use a toaster oven with an improved digital thermostat. The careful part is having a very steady hand to open the door and remove the tray. The parts will floating on the liquid solder...so any jostling will send them off the pads.

    Many of the Chinese board shops are offering stencils for $7 or so. These are frame less so you have to rig up your own tape and metal guides to keep the stencil aligned with the board.

    Yes...a lot to it...but it beats doing it by hand any day...especially if you have a half dozen or more to do.