Note: this instructable is part of a contest until July 7th. If you really like it, you can vote on the top right corner.

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

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

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

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

- 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

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.show(); // 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);

<p>You are the man. Awesome!!!</p>
Very cool
<p>Can I that I make this with Arduino uno?</p>
<p>This is great <a href="http://www.elektroshop.nl/led-verlichting-nl/led-strips.html" rel="nofollow">gaelreinaudi</a>. We sell <a href="http://www.elektroshop.nl/led-verlichting-nl/led-strips.html" rel="nofollow">LED strips</a> and this is cool to share with our customers for inspiration e-mails. Thanks.</p>
<p>cool!!! i did tho in my room last week! i still get a ton of great comments on it! this is AWESOME!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>thank you for the idea</p>
<p>Awesome project. Check this one out on LED's<a href="https://www.instructables.com/id/All-You-Need-to-Know-bout-LEDs/" rel="nofollow">https://www.instructables.com/id/All-You-Need-to-Know-bout-LEDs/</a></p>
<p>Congratulations for making to the finals :)</p>
<p>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....</p>
<p>Yeah, dude! Please Instructabilize it! I'd love to see the theory behind that and try it out!</p>
<p>I would also love to see an instructable on that! Sounds cool</p>
<p>Nice dude! Could be a nice instructable about analogic circuits.</p>
<p>Hey, nice job!</p><p>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. </p><p>Let me know if you are interested.</p>
<p>Sure!<br>I would love to see the implementation of your own &quot;X,Y&quot; library. I would even suggest that you store it on GitHub so that it is easily downloaded and extended by people.</p><p>Thanks for sharing your experience.</p>
<p>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.</p>
<p>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 &quot;SmartGit&quot;. 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).</p>
<p>Already had some time. Check it out here:</p><p><a href="https://github.com/DedeHai/" rel="nofollow">https://github.com/DedeHai/</a></p><p>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.</p><p>Here are some photos showing different modes (rows, diagonal rainbow, all with the same color, all random colors)</p>
<p>Pretty awesome!</p>
<p>Sweet and simple</p>
<p>very cool...</p>
<p>muy bueno</p><p><br></p>
<p>Reply to this comment if you decide to enter this into Tarun's contest, because I would definitely vote for it! =D</p>
<p>that's it. It has been approved for the contest.</p><p>Thanks! </p><p>:-)</p>
<p>Thanks for all the comments !</p><p>I registered into the contest and am pending approval. It should be in by tomorrow.</p><p>I am happy that you like it.</p><p>Gael</p>
<p>Amazing look!</p>
<p>Amazing! :)</p>
<p>How cool is that :). I hope that you have participated in the lamps and lighting contest here </p><p><a href="https://www.instructables.com/contest/tarun/" rel="nofollow">https://www.instructables.com/contest/tarun/</a></p>
<p>Thanks for the link! </p><p>I registered :-)</p>
<p>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 </p>
<p>It's great and practical! Very nice decoration! Really awesome! </p>
<p>Wow, that's really soothing to watch. Nice!!!</p>
Nice! Thank you for sharing :)

About This Instructable




More by gaelreinaudi:Color changing box shelves with LED-strips and Arduino Earth Globe Rotating With Arduino Or Raspberry Pi Controlled Stepper Motor 
Add instructable to: