LED Cube

Goal

Make an 8x8x8 matrix of neopixels

Because each one is addressable, we should be able to create some cool patterns with it. Specifically, one pattern we'll be trying to visualize is an FFT in 3D by making one axis show the octaves, one axis show the frequencies within the octave and making the vertical axis the amplitude of that frequency.

Hardware List

  • 512 through-hole Neopixel LEDs
  • Wire (16 AWG)
  • Shrink-wrap tubing (to prevent accident shorts)
  • Scavenged PSU
  • Wooden base

Hardware-Software Interface Information

Through-hole Neopixel LEDs

  • Interfaces with Arduino through digital output pin
  • Uses the Adafruit_NeoPixel library
  • We tested each LED individually with a simple program that flashed red, green, blue and white. We began testing multiple rows of LEDs on 4/11. A problem we encountered was that when more than 32 LEDs were connected together, the entire connected set of LEDs would flash (and not necessarily the correct colors, sometimes all the LEDs would light up red or green or blue).

Scavenged PSU

  • Used to purely to power LEDs independently of the Arduino
  • Doesn't need any special libraries
  • Problem: We suspect that there is some problem in how the power is sent to the LEDs which is caused the LEDs to flash

Timeline updates

3/21 Wed

  • Alex tested 300 LEDs. 2 were found to be dead

3/23 Fri

  • Chris tested the rest of the LEDs

3/30 Fri

  • Chris added shrink wrap tubing to the tub
  • Alex got oriented at the M5 makerspace

4/3 Tue

  • Got scrap wood cut to create base
  • Got solder certified
  • Tested out ways to solder the LEDs efficiently

4/5 Wed

  • Created method of soldering LEDs
  • Drilled holes in base
  • Soldered 5 columns

4/9 Mon

  • Started mass producing LED towers
  • Started mass-connecting LED towers together
  • First line of towers complete (1/8 done)

4/11 Wed

  • Made more LED towers
  • Connected more LED towers together
  • Second line of towers complete (2/8 done)

4/12 Thu

  • Made 2 more LED towers

4/13 Fri

  • Talked to Josh about using a capacitor to smooth any voltage spikes
  • Discovered a bad LED
  • Made more LED towers

4/17 Tue - 4/18 Wed

  • Pulled an all-nighter and finished connecting all the LEDs
  • Learned how to use strong wire strippers to strip some thick wire
  • Cut a bunch of green 12 AWG wire to connect some of the ground wires in the base
  • Cut a bunch of white 16 AWG wire to connect some of the 5V wires in the base
  • Connected the data wires of several slices together at once to check that things were working as they should be

4/19 Thu

  • Soldered more base wires

4/20 Fri

  • Trimmed hanging power wires on back side
  • Soldered hanging power wires on front side
  • Soldered all of the inter-slice data wires
  • Ran first program that wrote to all the LEDs at the same time (RGB test)
  • Ran second program that wrote to all the LEDs at the same time (wandering dot)
  • Created GitHub repository for future code

4/21 Sat

  • Clipped hanging wires from side of cube
  • Got wondering dot program working
  • Got FFT visualizer program working
  • Got planet simulation program working
  • Got image projection program working
  • Got webcam projection program working

5/8 Tue

  • Presented cube to classmates, faculty and staff

March 21st and 23rd - LED testing

Testing the LEDs

Testing LED chaining

April 2nd - Getting all the hardware in one place

Most of the parts we'll need: LEDs, wire, scrap wood, PSU

The measurements for cutting the base from a piece of scrap wood

The freshly cut base

We can short two leads on the PSU to get 5 volts from it. The advantage of using a PSU is it should be able to provide lots of current, which we'll need given how many lights we want to drive.

Turns out it outputs a little more than 5 volts, but the maximum for the LEDs is 5.3 so it should be okay.

Our first attempt at soldering LEDs on to a (poorly straightened) power wire

April 4th - Creating the LED soldering procedure and drilling the base board

To straighten the wire, we used a drill to twist it while pulling it taut

The other end of the wire was tied to a board and the board was held in place so the wire stayed taut

After cutting the straightened wire, we get a few short wires that we'll use for the power columns

We decided to use foam to consistently space LEDs on the power wire

Marking the spacing for LEDs in the foam

Preparing LEDs to be soldered onto a power wire (the foam was really bent, so we taped some scrap wire on to straighten it out)

Hey, take a look at that LED tower

Testing the LEDs on the tower. We forgot to bring an Arduino, so we'll repeat this again later

Measuring out where the holes will go

Drilling 64 holes in the base for the power wires

The base board after all the holes were drilled

The other side of the base, with the gridlines visible

The result of the day's work

April 8th - Ramping up production of LED towers and beginning to build vertical slabs

Popsicle sticks were used to prop up the base of the cube so the ends of the wires would stick out of the bottom a little bit

The first milestone - 1/8 complete

Some LED towers queued up to be connected

The state of the cube at the end of the day

April 11th - Producing & connecting more towers. Testing first line of towers

With the second layer underway, some of the first layer can be better tested

First two layers complete

Testing several rows at once

April 12th - Making more power rails

April 13th - Making & connecting more power rails

April 17 - April 18 - Complete all the power rails all at once

Selecting thick wire to use underneath the base board

Clipping the wire to length

And clip some more wire of a different color. White = 5V, green=Gnd

Stripped a lot of wires (around 80 total)

Using a lot of C-clamps to hold cube upside down so the wires underneath can get connected

Soldering the wires

5/8th of all the rails connected

View from the top

Due to the checkerboard pattern of high and low rails, every rail had to carefully marked to prevent accidentally creating a short

After connecting the existing data wires with alligator clips, we were able to get some lights traveling through the cube

This empty bag used to have 100 neopixels in it

Alex's to-do list of rail types throughout the night. There were 4 types which were determined by the direction of the data wires and whether the rail was high or low.

All 64 rails completed and connected

And here's a bunch of videos we took that night as well:

April 19th - Solder more the rails together under the base

Alex & Mary acted as human C-clamps so Chris could solder more rails together under the base

April 20 - Connecting final hanging power wires (Cube is fully functional!)

A capacitor was chosen to be soldered under the base for smoothing

Clipping some wire to use to connect the ends of the hanging power wires

Heat-shrink tubing is used on this side to prevent shorts

The power wires being connected

Soldering more power wires

All the power wires are connected!

Testing final layer

Viewed through a paper so the gradient is more clear

From above

Here's a really great video of the whole thing coming together for the first time. Very exciting!

Here's 3 videos of the first program written for the cube. It's supposed to be a blue dot that wanders around the inside of the cube. It's written just in Arduino.

April 21st - Running more complex programs

This was all made possible due to all the rails being connected underneath

Shira made this piece of paper when we showed her the projection program

Demo of Chris' program which takes an audio feed from your computer, computes a FFT on it, then visualizes it on the cube.

The two axes on the ground map to frequency and octave, and the height maps to the amplitude.


If you want to make your own FFT-based project: Sound Visualization: Frequency Analysis with FFT

Demo of Alex's program which takes an image and projects it onto the cube at an angle, causing the image to visible on the cube when the cube is viewed by someone at the same angle as the projection.


Link to the math if you're interested: 3D Projection (though frankly it's easier to use the screenX and screenY functions in Processing to achieve this)

April 24th - Making some small changes to the projection program

Project Milestone report:

1. List of completed items

* Created wooden base

* Soldered 8 neopixels onto each of 64 power rails

* Connected all power rails together

* Created programs which changed the colors on the cube

(For details, see above)


2. List of of in-progress items

* 4 hours - "Legs" for the base so it looks a little cleaner

* 1 hour - Drilling holes in the base for the data wires


3. Photos (see above)


4. Video (see above)


5. Roadblocks encountered

* Flickering LEDs. Solved using a capacitor.

* Signal degradation. Solved using multiple data input wires along with the FastLED library

* Hot wires. Turns out connecting to the power supply with the wires we had limited the current and caused some of the thinner connections to smoke. So we switched to a different power supply with super thick wires.

* Random flashes of color sometimes when using projection sketch. Still uncertain as the the cause.