2x2x2 RGB Cube (Arduino)

by Ben1894 in Circuits > Arduino

6057 Views, 28 Favorites, 0 Comments

2x2x2 RGB Cube (Arduino)

IMG_3089[1].JPG
IMG_3086[1].JPG
IMG_3090[1].JPG
2x2x2 RGB LED cube (Arduino)

One day I was bored and I decided I wanted to make an LED cube. I've made regular LED cubes but I've never made a RGB. I looked on instructables for an easy 2x2x2 (being my first RGB cube) but I couldn't find one so I decided to make my own. I made my cube really small because I wanted it to be compact but it doesn't matter. I'm sorry if this gets a little confusing and feel free to ask any questions. Also there are more functions than the video shows but it's hard to keep it updated (I'll try though). Lastly this is my first instructable so any tips or improvements I could do would be helpful :)

Gather Materials

15549137-Group-of-various-electronic-components-Stock-Photo-electronics.jpg

8 RGB LEDs Common Cathode (Preferably diffused)

2 NPN/PNP transistors (I used PNP but it doesn't matter, you can change it in the code)

Soldering stuff (Solder, Soldering iron, ect...)

Perf Board

8 - 100/110 ohm resistors for the blue and green

4 - 150/160 ohm resistors for the red

Arduino (Any will work but i'm using a pro mini for size)

Tweezers

Pin Prep Part 1

16, 2:14 PM.jpg
16, 2:14 PM.jpg
16, 2:14 PM.jpg

First take the LED and line it up so the longest pin (Ground) is on the right. Next bend the side pins out and the middle pins up and down. The ground pin should be the top pin or the north pin. Repeat 8 times.

Pin Prep Part 2

16, 2:14 PM.jpg
16, 2:14 PM.jpg
16, 2:14 PM.jpg
16, 2:14 PM.jpg

Take every pin, except the ground, and bend it down with the tweezer. Make sure to grab close to the bulb. Do this for all 8 of the LEDs.

Soldering Helper

16, 9:01 PM.jpg

Use a ruler to measure out a square and then cut holes at each of the corners. I have them fairly close together but you do you.

Layer Making

16, 9:01 PM.jpg
16, 9:01 PM.jpg
16, 9:01 PM.jpg
16, 9:01 PM.jpg
16, 9:01 PM.jpg

Follow the pictures. Put four LEDs in and then solder the ground pins together. Repeat for top layer.

Connecting the Layers

16, 9:01 PM.jpg
16, 9:01 PM.jpg

Stack the layers on top of one another and make sure all the pins match up. It helps to use a helping hands but it's optional. Cut the pins to make it more of a cube shape.

Putting It All Together

16, 9:01 PM.jpg
RGBcube_bb.png
  • Warning this diagram is for PNP transistors If your using NPN make sure to add a resistor from the analog pins to the middle pin of the transistor. Also remember to add a 100 ohm resistor on the green and blue pins and a 150 ohm resistor on the red. If you decide to connect the pins in a different way I made it easy to change it in the code.

Coding

720px-Arduino_Logo.svg.png

Download this code to your Arduino. I will continue to update the code so stop back often. Also sorry it doesn't fade.

Downloads

What Next

I've tried to explain some of the code so it's fairly easy to add on to it. If anyone makes any cool new functions share them with me and I will add them to the code and give credit. Lastly please vote for me in the arduino contest, the new author contest, and the make it glow contest!