How to Make an LED Ambient Mood Light: a Beginner Tutorial




This Instructable lays out how to construct and code an ambient LED light using an Arduino board and some common circuit components. This project mixes a red, green, and blue LED to get a wide range of colors, and the Arduino cycles through them. The paper cover is used to diffuse the light from the discrete LEDs into a more uniform hue. This project is ideal to add some mood lighting to a dark room using the Arduino and some common, cheap materials.

The Arduino is a useful, versatile board for the electrical hobbyist, but it takes practice to master. This tutorial is accessible to anyone starting to work with or interested in using an Arduino board for electrical or art hobby projects. No prior electrical or coding experience is necessary to complete or tweak this project. However, some knowledge on the C programming language and basic circuitry will be useful to expand on the design. The project takes about 15 minutes to assemble.

Step 1: Gather the Materials

The following materials are used:
  • Arduino Uno board (older boards should be compatible)
  • USB A to USB B connector cable
  • Computer with Arduino IDE software
  • Arduino solder-less breadboard shield
  • 3 resistors (330 ohm)
  • Red LED
  • Green LED
  • Blue LED
  • breadboard connector wire
  • white paper
  • scissors
  • tape
Also, you will need the code for this project, which is linked to in the "Program the Arduino" step, and can be found here:

The Arduino Software (compiler and IDE) can be found here:

Some of these materials can be substituted if they are not readily available:
  • A regular breadboard can be used instead of the breadboard shield.
  • Other resistors can be used, just try to find three identical resistors between 330 and 1000 ohms.
  • Any different color LEDs can be used in this project.
If this is the first time the Arduino has been used, connect the Arduino to the computer using the USB connector to make sure it turns on. A green LED should light up on the board to indicate that it is on and receiving power.

Step 2: Assemble the LED Circuit

Assemble the LED circuit on the breadboard:
  1. Disconnect the Arduino board from any power supply or computer.
    Caution: Unintentional electrical contact could damage the components. Make sure the Arduino is not powered when wiring components.
  2. Connect the three resistors from pins 9, 10, and 11 to separate rows on the breadboard.
  3. Connect the anodes of the three LEDs to the three rows of the resistors and the cathodes to a common row.
    Note: The anode is the longer lead on an LED, and the cathode is the shorter. The LED will not get damaged if it is plugged in backwards, it just won't turn on.
  4. Connect the LED cathodes to ground (GND).
    Caution: The resistors are used to reduce current to the LED. Do not connect an LED directly from a voltage source to GND, as this can damage the LED.
Check to make sure the wiring is correct before continuing. Improperly wired circuits can cause the Arduino board to short the USB connection. If this happens, the USB port may deactivate itself. If the USB port on the computer becomes deactivated, restart the computer.

Step 3: Program the Arduino

Load the program onto the Arduino board:
  1. Open the Arduino IDE software (or your preferred IDE).
    The Arduino software can be found here:
  2. Copy and paste the project code into the software.
    The project code can be found here:
  3. Save the code.
  4. Compile the code.
  5. Connect the Arduino to the computer with the USB connector cord.
  6. Upload the program to the Arduino.
After a few seconds, the LEDs should light up and begin fading in and out.


The Arduino won't turn on.
There is a small LED on the Arduino board which lights up when it has power. If there is no light:
  • Ensure the Arduino is correctly connected to the computer using the USB connector cable.
  • Try using another USB device on that port such as a mouse or a keyboard. If those don't work, the Arduino may have shorted the USB port. The USB port is self-repairing. Restarting the computer should fix the problem.
An LED (or all LEDs) won't light up.
The program should light up the LEDs after a few seconds. They may blink while the program is loading. If the Arduino ON light is lit, but the LEDs are not:
  • Check which pins the LEDs/resistors are connected to. Make sure these pins (9, 10, 11) match the PIN_RED, PIN_GREEN, and PIN_BLUE variables in the project code.
  • Check the LEDs manually by connecting the resistor to 5V instead of a pin. If the LED does not light, replace the LED.
  • If the LEDs light up using the 5V but not the pins, the program is not running correctly. Upload the Blink code example (from File -> Examples -> Basics -> Blink) to the Arduino. If the Arduino is working, a little LED should start blinking regularly. If it is not, the Arduino may need to be replaced.
  • If the Arduino is working, but the program is not running, unplug the Arduino and repeat this step.
The LEDs don't fade in and out.
The program should change the intensity of the LEDs. If the LEDs are on but not fading:
  • The delay time may just be too long to notice LEDs changing. Set DELAY_TIME to 1 and re-upload the program. The LEDs should fade in and out rapidly. Change the DELAY_TIME to any desired value.

Step 4: Add a Cover to Diffuse the Light

Add a paper cover to the Arduino Board to blend the RGB values into a single, uniform color:
  1. Cut the paper into a square.
    The easiest way to do this is to fold the paper diagonally and cut off the excess (as shown).
  2. Fold the paper so that the creases divide the paper into nine equal squares.
  3. Cut four of the outside creases (as shown).
  4. Fold the paper into a cube with one open face.
  5. Tape the edges together.
  6. Place the paper cube over the Arduino.
    Optionally, cut a small hole for the USB cable to fit into.
  7. Turn on the Arduino by connecting it to the computer.
The paper cover will diffuse the light from the three LEDs so that the light is mixed together. The cube will now appear to smoothly transition through various colors.

Step 5: Tweak the Project

The LED mood light should now be adding a soothing ambient glow to the room. Now, make the project unique. There are many things that can be done to tweak the mood light. Here are a few things to try:
  • Edit the code.
    Change the values of the delay or color starting values, or re-write the transition() function to fade the LEDs differently.
  • Re-wire the circuit.
    Swap out LED colors for a different color variety, or add a variable resistor to the circuit to adjust brightness.
  • Stylize the cover.
    Draw on the paper cover or use a different material to add extra effects.
  • Combine with other projects.
    Try syncing the colors with music.
Hopefully this project inspires further experimentation. The Arduino board is incredibly versatile and accessible to hobbyists of all backgrounds. This is just one of many simple projects which can be constructed using this technology. Keep tinkering!



  • Frozen Treats Challenge

    Frozen Treats Challenge
  • Classroom Science Contest

    Classroom Science Contest
  • Colors of the Rainbow Contest

    Colors of the Rainbow Contest

22 Discussions


3 years ago

Neat! Easy to build - took me 15 minutes as a complete noob to wire it up and get LEDs moving. Thanks for creating this instructable :D


4 years ago on Introduction

Is there a way to connect this to a battery so it can be used away from the computer, or is the best way to do this still a USB A to USB B male to male into a wall outlet?

1 reply

Reply 3 years ago

i'm sure you found your answer by now, but for anyone else: Yes you can! You can safely provide up to 12vdc to the Arduino throuh the DC jack, so a 9v battery would be fine.


6 years ago on Introduction

Amazing project! Just what I was looking for to build! This is great. I have no 330 ohm resistors, so I will use three 270 ohm resistors. That won't burn out the LED'S, RIGHT?


6 years ago on Introduction

I'm trying to get 3 more pis to do the same thing as pins 9, 10, and 11. I'm trying to get pins 3, 5, and 7 to fade just like the other pins. I can't figure out how to write this in the code for the life of me.

1 reply

6 years ago on Step 2

Can you make a tutorial video about how to make this?


7 years ago on Step 5

quickly tried this. Fun. Might be nice to do this with high power LED's and make a more durable lampshade

2 replies

6 years ago on Introduction

Have you seen the Genie microcontroller? Much cheaper to buy than the Arduino, really cheap to program if you have a Serial port (but there is a USB option) and 'writing' programs is just a case of drawing a logical flow diagram and adding some numbers for time delays etc..

It has countless other great features - IR in and out, an LCD module, R/C servo motor outputs, stepper motor output, and many more. Oh, and it's MUCH smaller than an Arduino board.

Only real snags are that you have to assemble the very simple PCB, and you are only allowed to use it for educational purposes - no commercial products.


7 years ago on Introduction

This is totally cool and easy project. Thanks for making it!!

I used ping-pong balls as diffusers, they work great! If they are dirty or scuffed you can clean them up with sandpaper or a pencil eraser. I drilled a 5mm hole, very carefully, with a special bit called a "step-drill" which is excellent for drilling very thin material. The RGB LED fits snugly and it diffuses perfectly. I made another with three individual colored LEDs with three holes in the ball, but it's not as nice looking as the single LED model. I made a little base from a piece of scrap wood and mounted the ball on a tube sticking up.

I also wrote a bunch of different flashing and blending patterns into the code and made them selectable by a pushbutton switch.

BE CAREFUL WITH FLASHING LIGHTS, some people are sensitive and might have seizures.

@icleger: the programming IDE application is free and can be downloaded from the Arduino main page. The pogramming language is c++ and is very easy, and the IDE comes with lots of examples and tutorials. Get an Arduino, some resistors and some wires and some LEDs and start working thru the examples and you'll catch on in no time.

2 replies

Reply 7 years ago on Introduction

Arduino's are programmed in C++? I think you just made my day :) C++ Is the only code i know how to program (a bit) in, and I was annoyed I would have to learn another language :)

Also, great instructable! I just received my first Arduino (Uno) today, and would love to try it out!


7 years ago on Step 5

the leds blink when the arduino is connected to a 9v battery


7 years ago on Introduction

Nice Instructable, easy to understand and build.
I have an idea for a cool extra feature:
An UV-LED and fluorescent color on the paper.

1 reply

7 years ago on Step 5

Okay, I really want to learn how to program this Arduino board. any helpful tips. I am in some electronics classes but have not gotten this far yet, i know all about resistors and such but nothing to do with programming yet.. Also, you said set the arduino to change with music, how exactly do you do that? Thanks, Cody