Colorful LED Art Hexagon
I just love LEDs in almost any form. They are great for art projects.
To satisfy an urge that combined colorful animated LEDs into a artful shape, I made this Neopixel Hexagon. 37 colorful animated LED circles dance in changing patterns. Truly, a rainbow of color!
This project uses 37 Neopixel LEDs mounted behind translucent acrylic, and mounted into a nice oak Hexagon frame. The LEDs are "animated" using an Arduino Nano running some simple code using the FastLED library. Every 30 seconds, the patterns change.
The translucent acrylic panel in the front softens the look of the display so you don't see the actual LEDs, just the colors. The Hexagon uses a light sensor to automatically adjust the brightness of the display based on the room brightness. I finally made something I wasn't embarrassed to put inside the house on a wall...
Some movies are in the files below.
Supplies
- 1" x 4" x 72" Oak board, furniture grade.
- 2.5" x 8' clear or white acrylic tubing (cut into 37 x 2" lengths).
- 18" x 18" x 1/8" acrylic sheet, translucent, "lighting white, 45%". (TAP Plastics)
- Wood stain (your choice of color)
- 12VDC / ~1.25A output DC power supply (wall transformer) with a barrel plug.
- A Smart RGB LED lighting strip based on the WS2811 controller with 3 LEDs per WS2811. (12VDC type)
- Arduino NANO with socket pins soldered on. The USB connector type doesn't matter.
- Some socket strips to plug the Nano into, and complete your wiring.
- A "Light Dependent Resister" (LDR, the typical Arduino type, something like the GL5528)
- Prototyping perforated board, 0.1" hole spacing, sized as needed
- Barrel jack that matches the Wall DC Supply. Note that these come in 2.1 and 2.5mm styles.
- 5VDC voltage regulator (12VDC in, 5VDC out, linear or switching, type or model unimportant, something like a LM7815)
- 470 ohm, 1/4W resister, leaded
- 10K ohm, 1/4W resister, leaded
- Some capacitors (like 10uF, 25V, as required by the regulator you chose)
- Assorted single 24AWG wire plus some 3 conductor ribbon wire
- 4 wood screws
- Wood glue
- Hot glue gun and glue sticks
- Double sided foam tape
Prepare the Wood Frame
The first step involves preparing your wood frame. I used 1" x 4" oak, which is a nice hard wood. The actual finished dimensions of this type of board is 3/4" x 3.5". I was able to buy a 72" piece from a local home supply store.
Some background on Hexagons... A Hexagon has six sides, six vertices, and six interior angles. The interior angles are 120 degrees and the vertices are 60 degrees. So each of the six sides of the hexagon will have a cut edge at 60 degrees (as opposed to 90 degrees if we were making a square). See the images of the frame. It's super important to set you saw angle accurately so the pieces fit well.
You can see from the picture that the oak hexagon is acting like a picture frame, and will hold the translucent lighting sheets. So follow the sequence below.
- Using a table saw, you will need to rip two continuous grooves into one side of the 72" board. This groove needs to be a bit more than 1/8" so the acrylic panel can slide easily into the groove. I set my front groove to start ~1/4" from the front edge of the board, and the back groove starts ~1" from the back of the board. This leaves a gap of ~2" for the cut tubes to sit between the two acrylic panels. Cut the grooves into the full length of your board. By doing the full length before cutting, you ensure that the whole length is identical, and that each cut piece will match the others. The groove depth should be about 1/4".
- Once you have the grooves cut, you can cut the 6 sides. In my hexagon, I made the long edge of the board 10" long, which makes the inside edge a bit less than 9.25". Make sure that the short length side is the side with the groove (the inside), and the long edge has no groove! Watch the precision of your cut angles so they will fit and make a clean hexagon.
- Once I had cut the 6 sides, I used a large rubber band and some blue painters tape to hold the 6 sides together in the hexagon shape to make sure the fit was good. NOTE: Build the hexagon so that it can be separated into 2 halves. This allows us to insert the acrylic panels into the grooves and assemble!
- Once I knew the angles were good, I used wood glue and glued two sets of 3 boards together to make the two halves. I used the large rubber band and blue tape to hold all the pieces in place while the glue dried, paying close attention to the outside corners so they all fit properly.
- Once the halves were dried and strong, I drilled a couple of holes into the bottom half at the edge so I could use some wood screws to hold the halves together strongly and accurately. See the pictures.
- Once the halves are complete, drilled, screwed together and confirmed fitting properly, you can disassemble the halves and stain them as desired.
Prepare the Acrylic Sheets and Tubes
Before committing to cutting the acrylic sheets, it's a good idea to map out the locations on the back acrylic sheet where the tubes will fit, and where your 6 corners will be. Map the center point as a reference. And don't forget that the acrylic sheet will extend beyond the tubes so it can fit into the grooves cut in the frame. The beauty of circles inside a hexagon is that they will "close pack". Keep in mind that you have a back sheet where the LEDs and the tubes will mount, and a front sheet that is the visible part once the hexagon is assembled. I removed the protective paper from the back sheet, but kept the paper on the front sheet until the last step so it remailed blemish free.
- Draw your template on the back side acrylic sheet so you know where each cut cylinder will sit with respect to the corners and edges.
- Cut the cylinders. I used a standard chop saw with a standard wood blade, but was very careful to cut them slowly so I didn't crack or chip the edges of the cylinder. It worked well. Cut the cylinders to be about 2" long. You will need 37 of them.
- Now test fit the cylinders on the marked acrylic back sheet to make sure that they all fit properly and that you have an edge (a bit less than 1/4") so it fits into the wood frame.
- Once everything is confirmed OK, you can cut the edges of the acrylic back sheet into the hexagon shape. Once you are happy with the fit, cut the front sheet to match.
- At this point, you can test fit the acrylic front and back sheets into your frame. Make sure everything fits cleanly now rather than later!
Prepare the LED Strips
This type of NeoPixel LED strip uses a discrete controller IC and three ripping bright RGB LEDs. They come in various lengths, up to 100 LEDs. We only need 37 of them for this project, so choose what you buy wisely. These run on 12VDC.
Luckily, for my build, the LED strips could be cut at the marked location, and each strip piece would be 2" long. Note that the strips have a "data flow direction" (indicated by the arrow), and that they run on 12VDC. The data pins are running at 5VDC, so it is compatible with the Arduino Nano output voltage.
I chose to make the center cylinder the "number 1 LED", and spiraled the LEDs out from there clockwise, jumping from the center outward. You can see this in some of the animations. The last LED, number 37, can be in any corner of the hexagon depending on how you orient the display.
- You will need to prepare up to 37 LED segments. These are easily cut with scissors, but be careful to cut ONLY at the indicated pads! However, look at the pictures showing the strips with the tubes over them. I found that I could create many "dual strips", and have them connect adjacent cylinders without using any wires. While the LEDs won't be centered perfectly in each cylinder, they are close enough, and you cannot tell visually! So I made many fewer strips, and had less wiring to do.
- Test place the strips in the chosen locations in the spiral, keeping in mind that the output of each segment needs to connect to the input of the next segment. Using some double stick tape helps if your strip doesn't already have adhesive foam tape on the back. The arrows will always point towards the last LED segment! Make sure that the strip is 100% inside the cylinder walls unless you have some dual strips like I had.
- To wire each strip segment to the next, I chose to use some three conductor ribbon cable. It made it neat, but it is not required. Make the lengths of the wires just long enough so that you can connect the strips without a lot of excess wire.
- For the #1 LED (the middle), make the INPUT wires at least 10" long. Mark on the acrylic back where the input wire will exit through the sheet, and drill a hole for them. I marked the 12VDC wire with a red marker so I didn't lose track and accidentally flip the wires.
- Now the soldering starts. Use a small pencil type iron with a fine tip. You will need to carefully solder the wires on the input and output pads of the LED segments. Control your heat. Start with the center strip, and spiral out as you go. The ribbon should never flip over from segment to segment or you will swap the power pins!
- The last LED segment has no output wires.
Wiring the Nano, LEDs, and Power Supply
On my unit, I used some perf or prototype board to create a "carrier" for the Arduino Nano. I used some socket pins so the Nano would plug into the carrier board, and could be easily removed as needed. On it, I mounted a barrel jack so the power supply will just plug into it. I used a small connector for the LED wires too. The 12VDC from power adapter goes to the power the LED strips, and is regulated down to 5VDC to power the Nano.
- Once you have all your parts, cut the perf board so that all your parts will fit on it. Mine wasn't much bigger than the Nano.
- Mount the DC barrel jack, and wire it to the 5VDC regulator per the schematic.
- Mount the socket strips for the Nano.
- Mount the 10K and 470 ohm resisters on the board and wire them to the pins of the Nano socket strips.
- Connect your LDR resister on a pair of wires long enough to reach the top edge of the frame.
- Wire the power supply connections and other wires to the Nano socket strips.
- Once you have completed all the wiring, its time to test your voltages. Don't plug the Arduino Nano into the pins yet!
- Measure all of the voltages with a VOM. Make sure that 12VDC is really 12VDC, and the 5VDC goes to the proper pin on your Nano. Make sure all of the gound wires are connected!
- Once you know all your voltages are correct and to the correct pins, you can plug in the Nano that you have programmed with the LED code. Make sure you install the Nano with the power OFF!
- Connect the LED strip wires to the carrier board as shown in the schematic. Check everything again.
- You should power up the unit and verify that all the LED strips are operating as expected.
- Fix any issues now before you proceed.
Mounting the Cylinders on the Back Panel
Once you have all the LED strips roughly in place from above, it's a good idea to adhere them to the back panel. Double stick foam tape or hot glue will work. This will keep them in place before the cylinders are mounted.
- Make sure you have completed the previous steps and tested that all the LED strips are working properly! It's much easier to fix this before gluing the tubes!
- Check fit the tubes over the strips and wiring. I found that making the tubes fit flat on the back panel is best, and I would recommend that you grind or file notches in the bottom of each tube where the wires enter and exist. Once the tube fits flat in the back panel, glue them down.
- I used hot glue to adhere the tubes to the acrylic back panel. (You can use your preferred form of adhesive, but I found that hot glue worked well for me)
- Start from the middle, and work your way out. Make sure there are no gaps between the tubes and that you follow your outline!
- Once all are glued, give it a shake to make sure everything is secure.
- Test fit the back panel into the frame. Test fit the front panel in the frame. There should ba a small gap between the tops of the cylinders and the front panel. This softens the apperance of each circle a bit.
Wrap Up Steps
Now it's time to wrap up the project. A few final steps.
- I drilled a small hole in the center of the top side of the wood, near the back and mounted the LDR here. Hot glue works. By mounting this on the top, it allows the Hexagon's brightness to adjust based on ambient light. Mine hexagon is quite dim in a dark room, but is comfortable to look at (not blinding). In a bright room, the colors are vibrant and bright. In the code, you can set this even brighter.
- I also found a picture frame mounting strip, and nailed it to the top side center.
- On all the other sides, I put some self-adhesive felt spacers so the wood frame didn't scratch the wall when mounted
- I made a small notch in the back-center of the bottom side, but just big enough to run the power supply wire from the adapter. By tying a knot in the power supply cord and keeping the hole small, I know that the cord will not fall or be ripped out of the Nano carrier board accidentally.
- The carrier board was hot glued to the back panel. Many of the wires are held with blue tape on mine, but hot glue would work even better.
- When you are ready to wrap up the project (final assembly), don't forget the remove the protective paper on the front acrylic panel. Keep it real clean.
- If you want to change the light patterns or colors, you can plug your USB cable into the Nano, and re-program it to be exactly how you want it. Have fun with it!
Some Quick Notes:
- I originally chose the acrylic tube as clear for my project. When I assembled it, I got a little too much color bleed from one cylinder to the next. I ended up cutting a 2" x 8" strip of white paper and placing it on the INSIDE of each cylinder. This stopped the bleed, and I was happy. I think if you chose white tubing, you wouldn't have this issue.
- As a next step, I'm thinking of adding some simple analog audio filters (low pass, mid-band-pass, and high pass) from a small microphone into 3 analog inputs of the Nano. Then do a mode to make the colors and brightness correspond to music volume and frequency. Sort of a retro color organ? Google it.
The Schematic
The schematic is also available as a .PDF file.
Downloads
The Code
I'd like to take credit for the code here, but it was really just some modified code from the FastLED library demo reel code from Mark Kriegsman. I redefined the data pins to match my design, set the total number of LEDs to 37, and added some code to support changing the brightness of the display based on the values read from the LDR.
There are a lot of fun parameters that Mark put into his example code, and I've modified many of them to tune the display how I wanted it to look. You can modify the code as desired to make it match your artistic preferences!
The only library used is FastLED.h. The serial port is used to read and report the LDR values and scale them to match the display needs. I've set the minimum brightness of the LED strips to 8, and the maximum to 127. If you want a brighter display, you can set the brightness up to 255.