Project tutorial
Decorative RGB Lights Using an Arduino

Decorative RGB Lights Using an Arduino © CC BY-NC-SA

We build a simple RGB decorative light using an Arduino Nano and WS2812B LEDs.

  • 2,371 views
  • 0 comments
  • 6 respects

Components and supplies

Ard nano
Arduino Nano R3
×1
M4wmhjju6x4t2pe6gke0
Digilent WS2812 Addressable LED Strip
×1
Plastic (Acrylic) Containers/Jars
×1
Three core wire (twisted)
×1

Apps and online services

About this project

Since Christmas eve is just a week away, I decided to build a simple RGB decorative light using an Arduino Nano and WS2812B LEDs. We use some plastic containers/jars to improve the visual effect. This video uses 5 LEDs but this can be increased to suit your needs. You can even add multiple patterns or create color themes based on what you are going for.

The video above talks you through everything you need to build this project and I'd recommend watching it first to get an overview of how everything comes together.

Step 1: Gather the Electronics

The first thing we would need are the WS2812B RGB LEDs and these are available in multiple variants. Either one will work fine. We will be using the Arduino Nano for this build, but the sketch will work with virtually any Arduino compatible board that you may have. We also need some wire to connect everything together and I'm using three core, twisted wire for this build. Lastly, we need the plastic containers which are purely for decorative purpose. The light reflects off the plastic to give us a nice looking effect.

Here are links to the products if it helps:

Step 2: Prepare & Download the Sketch

We will be using the fastLED library to drive the WS2812B LEDs but you can also use the Adafruit Neopixel library if that's your preference. Open up the Arduino IDE and type in "fastLED" in the library manager. Install the library that shows up and then open up the "DemoReel 100" example sketch.

We need to update the data pin, number of LEDs and LED type. I'll be using pin 2, with 5 LEDs. Please also update the LED type to WS2812B as seen in the image.

Then, plug in the board, select the right board and COM port. Finally, hit the upload button and wait for it to complete uploading. Once done, connect the LEDs - 5V, GND and data pin to pin 2. The LEDs should display a random pattern which is an indication that everything is working as expected.

Step 3: Prepare LEDs for Final Build

Next, we need to cut the LEDs as we will be using wire to extend the final length. Once done, remove the LEDs from any waterproof tubing. Cut the wire for each of the LEDs and the length will depend on the final positioning that you are aiming for. I decided to use the same wire lengths for all. Also, cut some wire that will be used to connect the microcontroller to the first LED.

Then, drill some holes in the plastic lid as we will be mounting the LEDs on the outer surface of the LED with the beam shining inwards.

Step 4: Final Assembly

Start by soldering the wires to each of the LEDs. Make sure you connect the pins correctly. The microcontroller needs to be connected to the DI (data input) pin of the first LED. Then, the DO (data output) pin needs to be connected to the DI pin of the next LED and so on. Once you've soldered all the wires, power ON the microcontroller and all the LEDs should start glowing with a random pattern.

I decided to use double sided tape to attach the LEDs to the top side of the lid, but you can also use some tape over the LEDs or some glue. It is advisable to add some kapton tape or heatshrink tubing to the microcontroller board for insulation.

Finally, screw the other half of the container in place and power ON the LEDs. Each of the LEDs consumes about 60mA, so make sure that the power supply you are using can deliver the required power. We have previously built power supplies which can be used for this, if needed.

If you liked this build, then please consider subscribing to our YouTube channel as your support goes a long way in helping us create such content.

YouTube: https://www.youtube.com/channel/UCbWiK1A5RqAugSquBHuyBdA

Thank you for reading!

Comments

Similar projects you might like

Automated Staircase RGB LED Lights

Project tutorial by Team NotEnoughTech.com

  • 38,721 views
  • 20 comments
  • 133 respects

RGB Backlight + MSGEQ7 Audio Visualizer

Project tutorial by PhilKey

  • 7,733 views
  • 2 comments
  • 21 respects

How to Configure NeoPixels Using Vixen Lights and Arduino

Project tutorial by Victor Aguilar

  • 33,658 views
  • 39 comments
  • 62 respects

LED Emergency Lights using WS2812 RGB LED Module

Project tutorial by bigboystoys13

  • 15,531 views
  • 7 comments
  • 34 respects

Animated RGB Wall Clock

Project tutorial by TheTNR

  • 14,806 views
  • 11 comments
  • 41 respects

DMX RGB LED Outdoor

Project tutorial by Sebastian Wiessner

  • 14,313 views
  • 7 comments
  • 17 respects
Add projectSign up / Login