JolliCube (8x8x8 LED Cube) with MD_Cubo library

 INTRODUCTION


 JolliCube (8x8x8 LED Cube) with MD_Cubo library

jolliCubeAcrylicBox.jpg

 jolliCube Pyramid.jpg

So far, we have only built 3 LED cubes. Our first cube is a 4x4x4 LED cube and though we managed to successfully complete it without too much difficulty, we did not find much excitement and satisfaction experimenting with it.

Next, we designed, created and built our second cube, an 8x8x8 LED cube driven using the awesome MAX7219 ICs almost a year ago. You may check out our instructable on jolliCube if you are interested.

The main objective of creating jolliCube is to encourage electronics hobbyist looking into building their first LED cube to take a leap of faith to build a larger cube instead of building a small 4x4x4 or 5x5x5 LED cube.

Though building an 8x8x8 cube requires a lot more effort and patience, it is very much more exciting to experiment with it. We are sure that all electronics hobbyists who are able to successfully complete an 8x8x8 LED cube will feel an indescribable sense of satisfaction like we do if that is their first LED cube.

We built our third LED cube which is another 8x8x8 jolliCube but in a different LED color (orange) recently just to refresh ourselves on our building process. We will be using this cube for this project.

We are very encouraged to know that quite a handful of electronics hobbyists have successfully built their jolliCubes. However, once a while we received requests for more animation effects for jolliCube. We understand that it is not an easy task to create new and interesting animation effects for LED cubes. Some may be able to search online for animation effect codes designed for other LED cubes and adapt them for use on jolliCube, however, not all are able to do so.

We are proud of creating the jolliCube hardware but without the software to drive jolliCube would have rendered it useless. For this instructable, we will be introducing the MD_Cubo software library created by Marco Colli to drive jolliCube.

Marco Colli is very well regarded and have contributed very much to the Arduino community. One of his popular contributions is the awesome Parola library to drive LED matrix displays. We have used his Parola library for two of our instructables. You may check them out at https://www.instructables.com/id/Arduino-Parola-Zone-Time-Msg-Display/ and https://www.instructables.com/id/Large-8x8-LED-Matrix-Display/.

The MD_Cubo library comes with some new and interesting animation effects which we did not have in our earlier jolliCube instructable. Here, we will showcase some of the animation effects from the MD_Cubo library example with some additional interesting animation effects we adapted from codes found online which were written for some other LED cubes.

You may view the following jolliCube with MD_Cubo library Demo YouTube video to see what we will be building here.







 

Step 1: Building jolliCube

Building jolliCube
 
Solder Components All.jpg

Removed Matrix3.jpg

Single Matrix Layer.jpg

LED Cube separated.jpg

jolliCube Not Lit.jpg

First, you will need to have jolliCube before we proceed later to load our demo program to run the animations. If you have already build jolliCube, you may like to proceed to the next step.

If you are interested in building jolliCube, you may check out our instructable at https://www.instructables.com/id/JolliCube-an-8x8x8-LED-Cube-SPI/

Go through the following steps in that instructable to build the hardware for jolliCube:

Step 1: Design of jolliCube - Arrangement of LEDs
Step 2: Design of jolliCube - Electronic control circuit
Step 3: Build the jigs
Step 4: Assembly Part 1 - Build 8 layers of 8x8 LED Matrix
Step 5: Assembly Part 2 - Complete the LED Cube with control circuit
Step 6: Test jolliCube

The following are the two jolliCube assembly YouTube videos:





 

 

Step 2: JolliCube with MD_Cubo library Demo program code

JolliCube with MD_Cubo library Demo program code

Though our jolliCube is not designed to work with any particular microcontroller, we will be using the popular Arduino board in this instructable to drive it via SPI using only 3 signal lines.

The demo program code for the LED Cube used here is based largely on the demo example that comes with the MD_Cubo library created by Marco Colli with a few additional interesting animation effect codes we found online.

For this project, you will need to install the MD_Cubo library from https://github.com/MajicDesigns/MD_Cubo

The jolliCube MD_Cubo Demo V1.0 example can be downloaded here.

Upload the demo program to your Arduino Nano/Uno. Then connect it to jolliCube. See the picture above for the connection of the Arduino Nano/Uno to jolliCube.

Power up jolliCube via your Arduino Nano/Uno. Any USB port/adapter which is able to supply at least 500mA should be suitable. 

If your jolliCube build is good, you may sit back and Enjoy the Show!

 

 

Step 3: Building the Enclosure

Building the Enclosure
 
jolliCube Base.jpg

jolliCubeAcrylicBoxOnly.jpg

You will want to protect your investment after putting in all these hours building the 8x8x8 LED Cube by building an enclosure for it.

We will not delve into the detail on how we build our enclosure here. We are fortunate to find 6 x 8-inch clear acrylic sheets (2mm thick) at one of our local Art Shop which is just the right size to make a protective case for our LED Cube. We just need to shorten the length of each acrylic sheet using the simple scrape and break method which is fast and produces acceptably nice edges. We also found acrylic glue which is a solvent for ‘welding’ acrylic at the Art Shop. Using a syringe, we glued the acrylic sheets together to form the protective case. We also designed a simple base for our enclosure and have it 3D printed out. You may want to check out our STL file for 3D printing of our base below.

Click here to download our jolliCube base STL file for 3D printing.

We found a 6 x 6 x 6 inches clear acrylic box display case at http://www.collectingwarehouse.com which looks suitable for our LED cube. You may like to check it out if you are looking for a more professional and ready-made protective case instead of building it yourself.


Step 4: What's next?

What's next?
 
LED Matrix EnclosedMod.jpg

MainPhoto2.jpg

We hope you like the animation effects we have for jolliCube here with a BIG thanks to Marco Colli for contributing the wonderful Md_Cubo library.

You may explore to add more animation effects for jolliCube, maybe add useful functions to make jolliCube display date and time or make jolliCube react to music. Let your creative juice flow and think of new ideas for jolliCube. 

Did you happen to see our instructable in which we split jolliCube into two parts and re-arrange it to create a stereo audio spectrum visualizer? If you are interested, you may check it out here.

Below is the YouTube video of our audio spectrum visualizer.





Arduino Based Mini Audio Spectrum Visualizer

Introduction

Arduino based Mini Audio Spectrum Visualizer

For our last project, we built a 3D Stereo Audio Spectrum Visualizer. We are delighted that it attracted quite a bit of interest with suggestions on how we could have built the display differently. Some argued that it is not a true 3D audio spectrum visualizer and we totally agree with them. We should have titled that project more appropriately. If you are interested, you may check out the project here.

Following that last project, we have made the stereo audio spectrum visualizer board into a basic DIY kit which is now available at jolliFactory's Tindie store.

This audio spectrum visualizer kit is also suitable for use in our other Arduino based Bi-color LED Matrix Audio Spectrum Visualizer project.

These two audio spectrum visualizer projects use SPI for connections to the more elaborate bi-color LED Matrix and 3D LED Matrix displays for visualization. For this instructable, we will be building yet another audio spectrum visualizer but we will be using a 0.96 inch 128x64 I2C OLED graphic display instead. This is quite a tiny display but that is all we have lying around. You may want to use a larger screen OLED display for your project. This is a much simpler project if you just like to experiment with audio spectrum visualizers and do not want to spend too much time and money on the display.

You may find the 0.96 inch I2C OLED display from Adafruit or as an add-on module with our JF Stereo Audio Spectrum Visualizer DIY kit.

You may view the following YouTube video to see what we are building.





 

Step 1: Building the Audio Spectrum Visualizer Board

Building the Audio Spectrum Visualizer Board
Part List.png
SpectrumAnalyzer1.jpg
msgeq7B.jpg
JF_AudioSpectrumBd1.jpg
JF_AudioSpectrumBd2.jpg

You may wire up the audio spectrum visualizer board using perf-board yourself according to the wiring diagram above. We will not go into detail on how to wire them up here.

For this project, to save time from having to wire up the circuit, we will be using the JF Stereo Audio Spectrum Visualizer kit set available on Tindie. For this project, we assume you have some basic electronics and soldering skills and is familiar with using the Arduino board. The kit set is quite simple to complete. So, we will not be going into the detail on assembling the JF Stereo Audio Spectrum Visualizer board here.You will need to ensure the MSGEQ7 ICs and the Arduino Nano are placed in the correct orientation.

Our audio spectrum visualizer shall be driven by an Arduino Nano. We will basically be using two MSGEQ7 IC chips made by Mixed Signal Integration to separate the audio into bands. The MSGEQ7 IC is a single channel seven band Graphic Equalizer Display Filter. By feeding an audio signal to it, it will filter out seven frequency bands centered around 63Hz, 160Hz, 400Hz, 1,000Hz, 2,500Hz, 6,250Hz, and 16,000Hz. The seven frequencies are peak detected and multiplexed to the output to provide a DC representation of the amplitude of each band. All we need is to read these DC values with the microcontroller analog input and output the spectrum to the OLed display. We need two MSGEQ7 ICs here, one for the left and another for the right audio channel. 

 

Step 2: Wiring Connections

Wiring Connections
The main objective of this project is for experimentation on audio spectrum visualization. To keep it as simple as possible, we will be using an off-the-shelf mini 0.96 inch I2C OLED graphic display instead of building elaborate displays. This display requires only 2 signal lines and 5V DC for power. See the photos above on how the I2C OLED is connected to the JF Audio Spectrum Visualizer board.

The I2C OLED display is available at Adafruit or as an add-on part if you purchase the JF Stereo Audio Spectrum Visualizer kit which will be made available soon.

We have also connected a momentary push button switch to SW1 on the PCB board which is connected to D8 and GND of the Arduino board. This switch shall be used for selection of different display effects.

 

Step 3: Programming the Arduino Board

Programming the Arduino Board
I2C_scanner.jpg

The Arduino board needs to be loaded with the Arduino sketch to drive the Audio Spectrum Visualizer.

Download jolliFactory_I2C_OLED_AudioSpectrumVisualizer.ino


You will need to install the support library for the OLED graphics display which is available for download below.

Download Adafruit SSD1306 Library
You will also need to install the Adafruit GFX library.

Download Adafruit GFX Library

You may need to change the I2C device address in the sketch for it to work with your OLED display. Our OLED display is using I2C address 0x3C by default.

If you are not sure what is your I2C device address, you can download an Arduino I2C scanner sketch to determine the address. Check out I2C Scanner page at Arduino playground for more information.

We have only designed three effects for the audio spectrum visualizer. Let your creative juice flow and enhance the program with more interesting effects.

 

Step 4: Testing the Audio Spectrum Visualizer

Testing the Audio Spectrum Visualizer
AudioToneGeneratorResized.jpg
AudioToneGenerator1.jpg
AudioToneGenerator2Highlight.jpg

We will not delve into the details on how to test if our audio spectrum visualizer is performing correctly here. You may check out Step 4 in our last project to see how to conduct a similar test. 

 

Step 5: Building the Enclosure

Building the Enclosure
Box1.jpg
BlueCover_Back.jpg
BlueCover_Front.jpg
OLedMounted.jpg
OLedConnection1.jpg
If you are just building this project for experimentation, you may not want to invest time and money to build an enclosure for your visualizer.

However, we have some time on our hand while working on this project and so we decided to build a simple enclosure.

See the photos above for our enclosure. We will however not delve into the details on how we build it here.

 

Step 6: Let in the music and ENJOY

Let in the music and ENJOY
MainPhoto2.jpg

Though the OLED graphic display used for this project is small, it is still quite mesmerizing to watch the display dance to the music.

For this project, we have created 3 different display effects for visualizing the audio spectrum. You may create you own unique display effects for your audio spectrum visualizer project. You may also try out using different types and form of displays for audio visualization.

The JF Stereo Audio Spectrum Visualizer kit is also suitable for use in our Arduino based Bi-color LED Matrix Audio Spectrum Visualizer instructables project as well as the 3D Stereo Audio Spectrum Visualizer instructables project. You may check them out if you are interested.

3D Stereo Audio Spectrum Visualizer

LED Matrix EnclosedMod.jpg

Others.jpg

Picture of 3D Stereo Audio Spectrum Visualizer


In one of our earlier projects, we built an Arduino based Audio Spectrum Visualizer using our bi-color LED Matrix modules for the display. You may check it out at http://www.instructables.com/id/Arduino-based-Bi-color-LED-Matrix-Audio-Spectrum-V/

A few months ago, we designed jolliCube, an 8x8x8 LED cube. We are very encouraged to know quite a few entry level electronics hobbyists has bit the bullet and managed to successfully complete their 8x8x8 jolliCube instead of working on a smaller LED Cube as their first cube. You may find our LED cube project at http://www.instructables.com/id/JolliCube-an-8x8x8-LED-Cube-SPI/

Recently, we stumbled upon a 3D Audio Spectrum on Analyzer on YouTube. We were mesmerized by it.

You may find this YouTube video at https://www.youtube.com/watch?v=Vn39txtVIHc


For this project, we will use the electronic circuit we put together from our Arduino based Audio Spectrum Visualizer project to drive our jolliCube re-arranged with the 2 sets of 3D 8x8x4 LED Matrix displays placed side by side to form a 3D Stereo Audio Spectrum Visualizer Display.

To build this project, basic electronics knowledge with electronics component soldering skill and some knowledge on using the Arduino are required.

You may view the following YouTube video to see what we will be building.



 

 

Step 1: Building the 3D LED Matrix Displays

 

Picture of Building the 3D LED Matrix Displays

LED Matrix Side by Side.jpg

Arduino Connection.jpg

Solder Components All PCB1.jpg


To build the 2 sets of 3D LED Matrix displays is to practically build the entire jolliCube up with only some steps omitted.

Follow main Steps 1 to 6 in our instructable for JolliCube - an 8x8x8 LED Cube (SPI) to build the 2 sets of 3D LED Matrix displays but omit steps 5, 7 and 15 at Step 5: Assembly Part 2 - Complete the LED Cube with control circuit if you do not intend to use them to create an 8x8x8 LED cube.

 

Step 2: Building the Audio Spectrum Visualizer Control Board

Picture of Building the Audio Spectrum Visualizer Control Board
SpectrumAnalyzer.jpg
JF Audio Spec Top No Arduino.jpg
JF Audio Spec Components No Headers.jpg
SpectrumAnalyzer1.jpg
msgeq7B.jpg

Our 3D stereo audio spectrum visualizer shall be driven by an Arduino Nano. We will basically be using two MSGEQ7 IC chips made by Mixed Signal Integration to separate the audio into bands.

The MSGEQ7 IC is a single channel seven band Graphic Equalizer Display Filter. By feeding an audio signal to it, it will filter out seven frequency bands centered around 63Hz, 160Hz, 400Hz, 1,000Hz, 2,500Hz, 6,250Hz, and 16,000Hz. The seven frequencies are peak detected and multiplexed to the output to provide a DC representation of the amplitude of each band. All we need is to read these DC values with the microcontroller analog input and output the spectrum to the 3D LED Matrix displays. We need two MSGEQ7 ICs here, one for the left and another for the right audio channel. The wiring connection diagram above shows how a MSGEQ7 IC is typically connected.

The two sets of 3D LED Matrix displays completed in Step 1 are connected together with the two MSGEQ7 ICs and micro-controller as shown in the wiring diagram above. An Arduino Nano is used here to control the entire electronic circuit setup. Note the use of 12Kohms pull-down resistors on the LOAD input pins for the 3D LED Matrix displays. When power is first applied to the micro-controller or when they are reset, their I/O lines float. The 3D LED Matrix display's MAX7219 ICs can see this as valid data and display garbage until the micro-controller gains control. The pull-down resistors prevent these problems.
Except for the two sets of 3D LED Matrix displays, we hook up the entire circuit on a small piece of perf-board around 110mm x 30mm. See above for our completed circuit on perf-board. Note there are two 3.5mm stereo audio jack sockets in the wiring diagram. One serves as a stereo audio input and the other is a pass-through output which allows you to connect this Audio Spectrum Visualizer in-line between your audio source and your stereo system.

For those who do not like the hassle of wiring the circuit on perf-boards, we have designed the Stereo Audio Spectrum Visualizer board as a kit set which is available at our Tindie store

The MSGEQ7 ICs are available at reputable stores such as SparkFun. You may be able to find these ICs cheaper at some other stores but most of these cheap ICs have quality issues.

 

Step 3: Load 3D Audio Spectrum Visualizer program code

Picture of Load 3D Audio Spectrum Visualizer program code

Wiring3DSpectrumVisualizerProto.jpg


We have came up with just a single effect for our audio spectrum visualizer. You may work to come up with more variety of effects for your audio spectrum visualizer.

Click here to download jolliFactory 3D Audio Spectrum Visualizer program

Upload the 3D Audio Spectrum Visualizer program to your Arduino Nano. Then connect the Audio Spectrum Visualizer board to the two 3D LED Matrix displays. See the picture above for the connections.

Power up the entire setup via your Arduino Nano/Uno. Any USB port/adapter which is able to supply at least 500mA should be suitable. For our demo video, we connect our Notebook PC's headphone output to the audio input of our Audio Spectrum Visualizer board. Play your favorite song or music and Enjoy the Show!

 

Step 4: Testing the Audio Spectrum Visualizer

Picture of Testing the Audio Spectrum Visualizer
AudioToneGeneratorResized.jpg
AudioToneGenerator1.jpg
AudioToneGenerator2Highlight.jpg


To ensure our Audio Spectrum Visualizer is responding according to our design, we downloaded an Android Audio Signal Generator apps from Google Play to our Smartphone for testing.

There are quite a handful of Android apps around which may also be suitable for testing. Here, we will be using the Audio Test Tone Generator version 1.2.0 developed by Digital Antics. This application comes with preset frequencies which are just right for testing our audio spectrum visualizer which is based on the MSGEQ7 ICs. Basically, we use this application to generate the 7 frequencies ( 63Hz, 160Hz, 400Hz, 1,000Hz, 2,500Hz, 6,250Hz, and 16,000Hz) and input them to our spectrum Visualizer to check that our 3D LED Matrix displays are displaying correctly. Note that one of the preset frequency used for the test is 6,300Hz whereas the actual test frequency is for 6,250Hz. This should not affect our testing since the difference in frequency is not significant.

The apps is quite intuitive for use and so we will not delve into the detail on how we carry out the testing. You may check out the following video on how we carry out the test.


 

 

Step 5: Building the Enclosure

Picture of Building the Enclosure


You may want to protect your investment after putting in all these hours creating your 3D Stereo Audio Spectrum Visualizer by building an enclosure for it. 

We have not built a complete and permanent enclosure for our project yet. What we have here is simply a protective casing made of acrylic sheets with our electronic control board hidden below the base.

We are sure you are creative and resourceful enough to build a beautiful enclosure for your project.