Introduction: Color Changing Festive Lamp

You may have already seen dozens of mood lamps here at instructables that change their color slowly and randomly. But what about a lamp that changes it's color whenever someone passed by from the front the lamp? Sounds good, isn't it? So here's presenting you an amazing lamp that detects motion of a human and changes it's color randomly.

The project uses the Mediatek Linkit ONE as it's computer or brain that receives signals from a motion sensor connected to it and gives analog outputs accordingly lighting RGB LEDs. Since the output is always different, by mixing red, green and blue emitted by RGB LEDs, you can get a wide range of colors from this lamp. Making the body of lamp is a very easy job which does not require complex craft skills and supplies. The design is similar to those old Chinese lamps which most of you must have already seen or made. I chose it because I wanted it to be simple as I myself is not very good in crafty work.

The main aim of this project was to use it as one of my decorations on Diwali, the festival of lights celebrated in India when people throughout the country light up their homes with candles, Diyas andcelebrate their happiness by burning firecrackers. However, these days you would see artificial lighting more than candles. The festival shows the significance of good over evil. There was a great mythological story behind it which I remember in bits and pieces.

So wishing all of you a very happy and prosperous Diwali!

Now let's start making this project....

Please like my new facebook page- Frozen Solenoid for amazing projects, videos and facts related to science and technology.

Step 1: Parts and Tools

The following parts and tools are required to make this project. The total cost was around $65 or 3900 INR. The cost will be reduced to $5 if you already have a linkit one. You can easily find all the electronic items online and craft items on craft stores.


  • 1x Linkit ONE board
  • 1x Lithium ion battery
  • 1x PIR motion sensor
  • 5x RGB leds
  • Male to male jumper wires
  • Male to female jumper wires
  • Perfboard
  • 5v USB adapter (optional)
  • Rainbow wire


  • Soldering iron
  • Soldering wire
  • Hot glue gun w/glue sticks
  • Pliers
  • Wire cutter/stripper


  • Handmade paper (any color)
  • Scissors
  • Tape
  • Thumb pin
  • Pencil and eraser
  • Ruler
  • Paper cutter

Step 2: Connect the Motion Sensor

Now here we begin with the building part of this project. The first step is to connect the motion sensor to linkit one. Do so by following the text given below. The easiest way to connect them is using some male to female jumper wires.

The role of motion sensor is to detect if someone has passed by from the front of the lamp. If it detects a motion of a human, it gives a high output which is detected by linkit one. The board then processed the signal and immediately changes the color of RGB LEDs randomly by lowering or increasing the analog output.

Connect the sensor as per the following:

  1. Vcc of sensor ---- 5v of linkit one
  2. Gnd ---- gnd
  3. Vout ---- Analog pin 0 or A0

Step 3: Connect the RGB LEDs

The next step is to connect these little glowing things. First you need to solder all the LEDs on a small piece of perfboard. Connect all of them in parallel and solder some female headers for easy connection to linkit one. There is no need of a current limiting resistor for the LEDs as the output voltage of linkit one's digital pins is 3.3v which is safe to work with LEDs. However, you can still add them if you want. I have used one transistor each to power one color of LED as they are very dim when powered directly from the digital pins.

Connect your soldered set of LEDs with transistors according to the schematic provided above. Use a breadboard for easy connections and no need of soldering. Make sure you locate the pins of the transistor and wire them in the correct way.

    Step 4: Cut and Paint the Chart Paper

    After completing all the electronics part, now we move on to some art work that will be to make the Chinese lamp from chart paper. The first step is pretty straightforward. Take a big sheet of white chart paper (or any other color as per your choice) and cut a rectangle with length 40cm and breadth 25cm using a paper cutter. You can vary this size according to your choice but make sure that you keep the ratio of length and breadth same.

    Now when it comes to choosing the looks and the color of your lamp, that completely depends on your choice and imagination. You can make it plane, stylish or even messy like I did. I just tried to do some spray painting and alas! The result was great! You can try that too and I assure you that it would be real fun. You just have to get some paints (I chose acrylic) of different colors, mix a little of them with plenty of water, apply the mixture on a brush and then spray it on the sheet of paper you had cut using you fingers. Do the same for each color one by one until your sheet gets all filled up with colors. Make sure that you do all this work in a spacious area or if at your workshop, spread a newspaper to avoid splashes all over your desk.

    You can even try to paint different patterns, use different colors of chart paper or add some more decorations to it like glitter. I am not very good at all this craft work so I decided it to make it easy.

    Step 5: Make the Lamp

    After painting and decorating the sheet, it's time to make the lamp and give it's shape. For this, first fold the sheet into half from it's breadth. Then, mark the cuts leaving 1 inch gap throughout the sheet. Cut the marked portions till it reaches more than half of the sheet. On opening it, you will find the cuts bulging out.

    Lastly, fold the lamp in the form of a cylinder. Stick the open ends with some glue and tape. You would now be able to see the beauty of the lamp!

    For those who don't want to add the color changing feature, this would be the end of their building process. You just have to fix a colored LED bulb or a CFL inside the lamp and light it up.

    Step 6: Upload the Code

    Upload the code given in the ino file below to your linkit one. If you are uploading the code for the first time to your linkit one, you can follow my Linkit ONE Getting Started Guide to help you set up your board and to get started with it.

    Before uploading, make sure that switches 1, 2 and 3 should be in UART, USB and SPI positions respectively.

    Step 7: Connecting to a Battery or USB Adapter

    The last and the easiest step to complete your lamp is to connect it to a power supply and light it up. For powering it, the simplest option is to use the lithium-ion battery provided along with the linkit one package but the problem with it is that it wouldn't last for too long but just for few hours. Connect it to the female socket present on the bottom left corner of the board and slide the switch to BAT position.

    Another option can be to use a USB power bank. Connect it using a micro USB cable and slide the switch to USB position. This would last long and would make the lamp portable as well. If you have an AC mains supply nearby, simply use a USB adapter and connect it similar to the power bank.

    Step 8: You're Done!

    So, you're finally done making your own color changing festive lamp! Now you just have to find a good place to keep it. Impress your guests and friends on Diwali with this amazing thing! The lamp looks best in dark or dimly lit places.

    You can try making modifications and adding features to it. You can even try different designs, patterns and colors to make the lamp look more attractive. If you do so, post it in the comment section below. Any idea, modification, errors, feedback or pictures of your own project would be really appreciated.

    If you like this instructable, you can vote for it by clicking the orange icon in the corner above. Follow me for more cool projects!

    You can even like my new facebook page- Frozen Solenoid for amazing projects, videos and facts related to science and technology.

    Thanks for watching!

    Epilog Contest VII

    Participated in the
    Epilog Contest VII

    Tech Contest

    Participated in the
    Tech Contest

    Make It Glow! Contest

    Participated in the
    Make It Glow! Contest