Rainbow Jar - RGB Pixel Strip Controlled Via Arduino




About: A member of instructables since 2006 I'm currently cruising at an improving 0.917 instructables a year...

Our most popular item on our display at Maker Faires is always the Rainbow Jar. One customer has already replicated it so we thought we'd share how we made it so you can make your own!

https://vine.co/v/hqxpVgdFQ9z (tried embedding this vine but it breaks instructables!)

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Getting Started - What You Need

This is all the stuff we used. 

What You'll Need

50cm of Addressable LED Strip
Plastic Sweetie Jar (found them on eBay)
Arduino Uno
Pin Headers (UK)
Stripboard (UK)
Rainbow Wire
5V Power Supply
omething to diffuse the light - we've used RGB LEDs!


Soldering Iron and Solder
Wire Strippers
Craft Knife and Ruler

All of the links are to our site - in the US you can get everything from Adafuit or Sparkfun

Step 2: Preparing the Strip

The strip is controlled by an Arduino, using two control wires Data and Clock. We're attaching green to the data and yellow to the clock. Orange to the +5V and Blue to the GND

Remove the red and brown wires from the rainbow cable and keep them for later. Strip the four wires at once using the super cool and handy Hakko Cutters.

If you're using our Rainbow Cable then bend the orange and blue cables out a little. A little bit of solder added to the tips of the wire will help them adhere when you hold them onto the pads and add some heat from your soldering iron.

Step 3: Make a Shield!

Now we make a little shield for the Arduino.

Take the pin headers and snap off two lots of four pins. Put them into the Arduino, you'll want them in the 0,1,2,3 on one side and the Vin GND GND and 5V headers on the other side.  Put the strip board on top and mark up how much of the board you need. They're not opposite each other so you won't need to do anything with the copper on the stripboard.
Score along the lines of what you need on the stripboard and snap it along the score lines.

Now we do a little alteration of the pin headers, pushing them down on a hard surface until the black plastic bit is flush with the hard surface. That way we can put the plastic bit on the side of the stripboard with no copper and have a nice bit to solder onto the copper.

Strip the other ends of the rainbow wire and solder the Clock and Data Pins to the strips that line up with 3 and 2 Respectively. Don't worry if you do them the other way by mistake, you can change it in the code!

Solder the blue in line with one of the GND Pins and the orange in line with the 5V.

Step 4: Add External Power!

This seems to run fine as it's only 50cm of strip through the Arduino, but lets make it a bit future proof adding external power, using a cool 2.1mm female jack.

Using a bit of the red and brown wire we cut earlier attach to the 5V and GND lines on the shield we just made. Attach the 5V to the +ve on jack connector and GND to the -ve.

Step 5: Program the Arduino

Now lets give your project some brains!

Download the awesome library from Adafruit.
Unzip the library and put it in your Arduino libraries folder. 
Attach your Arduino to your PC via a USB cable and boot up the Arduino IDE load the Stringtest example and change the length to 16 LEDs.

Upload to your Arduino and try the shield out! The test is very pretty, watch it! If it's not working, check your soldering and that you have the clock and data the right way around.

Step 6: Prepare the Jar

For whatever reason the jar looks better with the light going from bottom to top, also it's more stable with the cable in the bottom.

So it's time to introduce the knife to the plastic jar, it cuts well but be careful. Cut away from you.

You want a nice neat letter box to slot the strip through.

Step 7: Thread the Strip, Coil It Up and Add Your Diffuser and You're Done!

Thread the strip through the letter box you've made then coil it up and hold it towards the back of the jar. Now start adding your diffusing materials. If you've left the strip running like it did you'll see it take shape and be able to adjust the strip and diffusing material to make the best jar you can.

Edit here that needs some photographs. I went back and repacked the jar. This time using a roll of bubble wrap in a sausage shape to attach the strip to. Then the internals of the wrap don't take up your diffusing materials an keeps the tape neat so you can have it at the back of the jar.

Once done. Stand back and admire your work!

Step 8: Fin!

Stand back and admire your work. Oh it looks best in the dark, so either wait until it's dark or turn off the lights (or build a box like I just did!) Let us know what you think!

Arduino Contest

Second Prize in the
Arduino Contest

Weekend Projects Contest

Participated in the
Weekend Projects Contest

1 Person Made This Project!


  • CNC Contest

    CNC Contest
  • Make it Move

    Make it Move
  • Teacher Contest

    Teacher Contest

17 Discussions


Reply 6 years ago on Introduction

It was a 50cm strip so 30 LEDs doing the lighting then probably best part of a 500 bag of the RGB LEDs - which is probably a little excessive, but we have a whole heap of LEDs!


Reply 6 years ago on Introduction

can you give me a link where I can purchase the specific RGB LEDs you used please :)


6 years ago on Step 8

It's simple,but it 's creative to use a jar,I am thinking about make one to give my girlfriend as a gift.


6 years ago on Introduction

This is really cute!! ( I know most guys don't say cute, but I'm not a guy) lol I did something like this but used mini battery operated xmas lights. Banded them up and stuck them in the middle of the glass vase then added glass stones all around them from the dollar tree. It turned out real pretty ( and cute) lol

2 replies

Reply 6 years ago on Introduction

I do still have it, it's in one of the Christmas boxes stored away until Christmas decorations come out.. if I remember ( hard tellin at my age) I will put a picture up for you :)


6 years ago on Introduction

couldn't you just hack a led Christmas light set and chuck that in? looks good nice idea

1 reply

Reply 6 years ago on Introduction

I'm sure that would work of a fashion. These LEDs are addressable so each can be a different colour at any one time. Worth a try though I'd say!


6 years ago on Introduction

seems like you're not using Vin, so you could make your shield smaller by using the 5V and GND from the ICSP header. you'd need some female headers for that though.

I like the looks of it. might try a larger glass jar and put the arduino in the middle, maybe with a inductive base for power, how cool would that be!

3 replies

Reply 6 years ago on Introduction

Thanks for the suggestion! Will give it a try. Would be awesome to see a larger version, a customer made one with glass beads that looked pretty good too.