Introduction: Color Changing Box Shelves With LED-strips and Arduino

This started as I needed an extra storage next and above a desk, but I wanted to give it some special design. Why not use those amazing LED strips that can be individually addressed and take any color?

I give a few notes about the shelf itself in the next step, but here is what you need to decorate your shelf:

- a few meters of LED strips backed with adhesive, ~$40
- an arduino nano, ~$10 (any arduino actually)
- some hook up wires, white, or whatever color your shelf actually is
- a few connecting wires (optional)
- a spare smartphone charger (to power the arduino usb plug)
- some solder and a soldering iron. Start here if you don't know how to solder yet.
- a wire stripper

Step 1: A Quick Note About the Shelf

Picture of A Quick Note About the Shelf

Just for information, here is what I used in order to build the shelf bought on amazon or home depot:

- a book shelf, $50
- a 4x2 cube shelf, $70
- another 3x2 cube shelf, $57 in order to reach the wall that the desk faces

I am not giving much details about the assembly, but it involves fixing the upper cubes together and to the wall with heavy duty brackets. Do it with someone's help and use your common sense,... or hers.

It might be a good idea however to place the brackets in the corner of the cubes that you don't see from the most natural place in the room.

Step 2: Stick the LED Strips

Picture of Stick the LED Strips

With a pair of scissors, cut the LED strip in as many pieces you will need. In my case, it was 14 trips of 8 LEDs (=8").

Then stick them in your shlef boxes, BUT, keep in mind:

- those LEDs can get very bright and you don't want to have them in direct sight. As my shelves are entirely above eye level, I placed the strip on the bottom part of the cubes. If yours is on the floor, you must place it on the upper part so that you don't see them when standing next to it.
- You might want to stick the strip close to the edge of the shelf, because things might end up filling the boxes and you don't want them to block the light from the LEDs.
- respect ("R-E-S-P-E-C-T...!!") the direction indicated on the strip. The arrow shows in which direction the information is flowing, from the arduino, to the end of the strip. A note about how those work: each of the WS2812 LED contain a microchip that receives logical 0s and 1s at a rate of 800kHz. After powering-on, the first LED listens to this signal and removes the first 3 bytes (24bits) from the flow of bits. It uses this information to set its color and transmits the rest of the signal to the next LED, which is going to perform the same task. Each LED has an input and an output, therefore, direction matters.
- the previous point implies that you have to think, beforehand, where the arduino is going to feed the strip, and what trajectory the strip is going to take. In my case, it was pretty simple, hiding the arduino in the farthest cube, where I can get easy access to a dissimulated power cord running in the corner of the room. The strips go through all the cubes on that level, then up, and through all the cubes of the other level.

Step 3: Pre-tin the Strip Connections

Picture of Pre-tin the Strip Connections

This means that you put a drop of solder on each connecting end of your LED strips.

With my 14 pieces to connect together, and 3 connections at each end (ground, 5V, signal), that makes 84 drops of solder. But it is going to make your life approximately 84 times easier in the next step !!!

Step 4: Hookup the Strips

Picture of Hookup the Strips

- With the wire stripper, remove just 2mm of insulation from your wire. Pre-tin the wire (by heating it with the soldering iron until it absorbs a bit of solder).
- Solder it right on the Ground connection of one of the strips to connect. Since you pre-tined it it is just a matter of pressing the soldering iron on your wire placed on the connection.
- Then pull your wire tight to the corresponding connection of the other strip piece (Ground) and cut the wire precisely at the level of the connection.
- Remove 2mm of insulation, pre-tin, and solder it to the connector.
- At that point, you should have a cable connecting your strips and it should not look loose.

Perform this again for the SIGNAL connectors, and for the 5V connectors.

Step 5: Connect the Arduino and Code

Picture of Connect the Arduino and Code

Adafruit's great website has some very useful best practice regarding the connection of an Arduino to a LED strip (the one branded "Neo-Pixel").

It is very clear and you should read it:

- connect the PIN6 (in the code example bellow, we use pin 6) to the first LED's SIGNAL,
- connect the Arduino Ground to the first LED GND
- Power your LED strip with a 5V power supply and plug your arduino to the usb charger.
- WARNING: If you power the strip through the Arduino, do not use the pin "+5V" from the arduino. This pin involve some sensitive circuitry on the Arduino and may burn due to the current drawn by the LED strip. Instead, you may try to use the "Vin" pin. If you plan on drawing more that 1A of current (~20 to 50 mA per LED), connect a 5v power supply directly to the LED strip (and the ground must be shared with the Arduino's).

Here is the code I used for a slow motion of colors through the cubes. It is directly taken and adapted from the Neo_Pixel library examples:

#include "Adafruit_NeoPixel.h"

#define PIN 6

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(8*14, PIN, NEO_GRB + NEO_KHZ800);

// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input
// and minimize distance between Arduino and first pixel. Avoid connecting
// on a live circuit...if you must, connect GND first.

void setup() {
strip.begin();; // Initialize all pixels to 'off'

void loop() {

void rainbowCycle(uint8_t wait) {

uint16_t i, j;

for(j=0; j<256; j++) {
for(i=0; i< strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel((((i) * 256 / strip.numPixels()) + j) & 255));

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
if(WheelPos < 85) {
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
} else if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);


pachytrance (author)2015-12-29

You are the man. Awesome!!!

tocatech (author)2015-05-10

Very cool

yaser ha (author)2015-03-06

Can I that I make this with Arduino uno?

tjeerdkorse (author)2015-01-28

This is great gaelreinaudi. We sell LED strips and this is cool to share with our customers for inspiration e-mails. Thanks.

Ponyart (author)2014-11-10

cool!!! i did tho in my room last week! i still get a ton of great comments on it! this is AWESOME!!!!!!!!!!!!!!!!!!!!!!!

q8wii (author)2014-08-24

thank you for the idea

francescapereira (author)2014-08-19

Awesome project. Check this one out on LED's

Tarun Upadhyaya (author)2014-07-12

Congratulations for making to the finals :)

jwoods10 (author)2014-06-22

I did similar,but without Arduino. I used 6 shelves with 6 varying capacitors for each LED and 3 transistors. When it starts, 1 is on 2 is off,3 is coming on and 4 is going off, 5 and 6 are halfway. Then as the caps charge and discharge at different rates, the combination changes up seemingly randomly. Was thinking of making them dance to music....

TheDark (author)jwoods102014-07-05

Yeah, dude! Please Instructabilize it! I'd love to see the theory behind that and try it out!

Riddellikins (author)jwoods102014-06-26

I would also love to see an instructable on that! Sounds cool

gaelreinaudi (author)jwoods102014-06-22

Nice dude! Could be a nice instructable about analogic circuits.

rsingh57 (author)2014-06-30

dedehai (author)2014-06-22

Hey, nice job!

I build one of these about a year ago, did it the exact same way :) even used the same arduino board. I attached the LEDs at the back and top side, so the glow comes from behind the stuff you fill into the shelf. I also added a button to change the light from rainbow to single colors. If you want I can send you the code. I did not use the adafruit library but used my own where I can address each compartment individually by x and y coordinates, so animations or patterns are easier to program. I used the same programming as in the pixel nightstand instructable.

Let me know if you are interested.

gaelreinaudi (author)dedehai2014-06-22

I would love to see the implementation of your own "X,Y" library. I would even suggest that you store it on GitHub so that it is easily downloaded and extended by people.

Thanks for sharing your experience.

dedehai (author)gaelreinaudi2014-06-22

Ok, I'll try and put it on GitHub. Never used it but I'll figure it out and post it here when I get around to do it.

gaelreinaudi (author)dedehai2014-06-22

GitHub is really about hosting pieces of code (from huge projects, to small code hacks). If I may, I would suggest you checkout the (free and cross-platform) gui client "SmartGit". It makes it seamless to do all the git interaction. I use git all the time to keep track of changes/test I make to any project (sometimes not even related to code).

dedehai (author)gaelreinaudi2014-06-23

Already had some time. Check it out here:

The code is not very well organized, my apologies.I did not intend on releasing it, so it may be hard to read or understand. The library part should be better.

Here are some photos showing different modes (rows, diagonal rainbow, all with the same color, all random colors)

gaelreinaudi (author)dedehai2014-06-23

Pretty awesome!

AphexHenry (author)2014-06-23

Sweet and simple

Clickhouse (author)2014-06-22

very cool...

plagos (author)2014-06-21

muy bueno

nodcah (author)2014-06-19

Reply to this comment if you decide to enter this into Tarun's contest, because I would definitely vote for it! =D

gaelreinaudi (author)nodcah2014-06-20

that's it. It has been approved for the contest.



nodcah (author)gaelreinaudi2014-06-21


gaelreinaudi (author)nodcah2014-06-19

Thanks for all the comments !

I registered into the contest and am pending approval. It should be in by tomorrow.

I am happy that you like it.


shazni (author)2014-06-21

Amazing look!

doodlecraft (author)2014-06-20

Amazing! :)

Tarun Upadhyaya (author)2014-06-19

How cool is that :). I hope that you have participated in the lamps and lighting contest here

Thanks for the link!

I registered :-)

bergerab (author)2014-06-18

Wow, finally a use for book shelves! (I'm not so much of a reader). But in all seriousness, great project you nailed it. LED projects are pretty mainstream but this is one of the better ones I've seen

Rookie P (author)2014-06-18

It's great and practical! Very nice decoration! Really awesome!

craftclarity (author)2014-06-18

Wow, that's really soothing to watch. Nice!!!

summerinhawaii (author)2014-06-17

Nice! Thank you for sharing :)

About This Instructable




More by gaelreinaudi:Color Changing Box Shelves With LED-strips and ArduinoEarth Globe Rotating With Arduino Or Raspberry Pi Controlled Stepper Motor
Add instructable to: