JolliCube - LED Cube Internet Clock

It has been more than 2 years since we designed jolliCube, a single color 8x8x8 LED cube driven using MAX7219 IC chips.

It is amazing to see how the humble single color LEDs can be used to build into an LED cube capable of displaying awesome animations.

Our LED cube is designed so that entry-level hobbyists are able to follow and complete it without too much difficulty. You may visit our instructable available at https://www.instructables.com/id/JolliCube-an-8x8x8-LED-Cube-SPI/ for more information.

Our LED cube is not designed to work with any particular microcontroller. However, so far, we have been using the popular Arduino board in our instructables to drive our cube via SPI using only 3 signal wires and powered with 5VDC power supply. We have demonstrated how our LED cube can be used to display various interesting animations but after the novelty wears out, we hope our cube can be put to better use and be more functional around the house.

In this instructable, we will make our LED cube more useful by displaying the current date and time besides displaying animations.

If we were to use the Arduino board to drive our cube, we will need to interface it with a Real Time Clock (RTC) external module to provide the time for display. However, it is quite cumbersome to set date and time onto the RTC module. We either need to provide buttons or through Arduino sketch to set the date and time. The RTC module also needs a battery to keep the time current and as some RTCs are susceptible to time drifts, the time needs to be readjusted occasionally.

For this project, we will be using a Wemos D1 mini board instead of the Arduino board to drive our jolliCube for it to function as a clock as well as to display all those interesting animations. This board is quite affordable and comes with WiFi capability and so we can make it connect to the internet to retrieve the time automatically from a Network Time Protocol (NTP) time server. However, this means there must be WiFi available for it to work.

You may view the following jolliCube YouTube video to see what we will be building. For this project, we built another jolliCube using green LEDs. This is the third jolliCube we have built and we still enjoy while building it.

To work on this project, one needs to possess some basic soldering skill, basic electronic knowledge and is familiar with working on Arduino boards though we will not be using the Arduino board for this project.

Step 1: Build JolliCube

First, you will need to have a jolliCube before you can proceed to drive it with the Wemos D1 mini board. If you have already built one, you may want to proceed directly 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-8x8... 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

As will be using the Wemos D1 mini board instead of the Arduino board to drive our jolliCube, check out the next step in this instructable to test jolliCube.

Step 2: Interface Between JolliCube and Wemos Board

It is good practice to test the cube during assembly after each layer of the 8x8 LED Matrix is soldered. It will be much easier to rectify any fault if there is any along the way instead of testing it after everything is completed.

In our previous instructable driving our LED cube with the Arduino board, we prepared one Arduino program code for test and another for demo of our LED cube.

For this project, we will be using only one program for test and demo of our LED cube.

See the pictures above for the wiring connections between the Wemos D1 mini board and LED Cube PCB. Notice there is a shorting jumper between D6 pin and GND which shall make our cube operate in test mode. This jumper shall be removed to make our cube operate in demo mode.

In test mode, only one horizontal level of LEDs shall be lit at any one time starting from the bottom to the top repeatedly.

To go into test mode, D6 pin on the Wemos board should be pulled down to GND during power reset or soft reset of the board by installing the shorting jumper or using maybe a metal flat head screwdriver to temporarily short the pins. Otherwise, it shall bypass the test mode loop and go into the demo mode loop to display the date and time and all those awesome animations.

There is also a momentary switch connected between D4 pin on the Wemos board and GND. This switch shall be used to reset the WIFI credentials stored in the Wemos board.

We have designed a simple interface board to ease connections between the Wemos board and jolliCube. It will be available at our Tindie store soon.

Step 3: Program the Wemos D1 Mini

This step shows how to set up the Arduino IDE before we are able to program the Wemos D1 mini board. We used Arduino IDE 1.8.5 successfully to complete this project.

For those not familiar with using the Arduino IDE or do not want to go through all the trouble to program the Wemos D1 mini board but would still want to build a working jolliCube with internet clock display, we will have the boards pre-loaded with our program available at our Tindie store soon.

Skip the rest of this section if you do not want to program the Wemos D1 Mini board yourselves.

To program the Wemos D1 Mini board, we will need to install the required USB drivers and configure Arduino IDE to work with the Wemos D1 mini board.

  • Start Arduino IDE and open the Preferences window.
  • Open Boards Manager from Tools > Board menu and find esp8266 platform.
  • Select the version you need from a drop-down box. Click install button.
  • Select Board: "WeMos D1 R2 & mini" from Tools > Board menu.

Packages -- the following packages and libraries are used for this project. Download and install the following libraries if you do not already have them installed.

NTPtimeESP.h -> https://github.com/SensorsIot/NTPtimeESP

ArduinoJson.h --> https://github.com/bblanchon/ArduinoJson

WiFiManager.h --> https://github.com/tzapu/WiFiManager

Md_Cubo.h -> https://github.com/MajicDesigns/MD_Cubo

We have to change the pins used for the connection between jolliCube and the Wemos board. Change the pin assignment in the file Md_Cubo_8x8_jC.h by searching for the following and amending them;

// Pins for SPI comm with the MAX7219 IC
const uint8_t DATA = 13; //11; ///< SPI Data pin number

const uint8_t CLK = 14; //13; ///< SPI Clock pin number

const uint8_t LOAD = 15; //10; ///< SPI Load pin number

Finally, you will need our jolliCube program code.

We will update here shortly with our jolliCube Wemos Demo program Ver 1 available for download once we clean up the codes.

If everything is in place, you should be able to compile and upload successfully to your Wemos D1 mini board.

To test jolliCube, short the D6 pin to GND upon first power up or soft reset of the board and it shall repeatedly loop through the test pattern.

Step 4: Connect JolliCube to Internet

For jolliCube to display date and time, the Wemos board needs to be connected to the internet via WiFi and retrieve date and time from NTP time servers.

We need the network credentials in order to connect to the internet. We can hard code the SSID and PASSWORD of the network in our program code but then we will need to modify our code and upload to the board whenever there is any change to these credentials.

For this project, we want to dynamically store the SSID and PASSWORD of the network in our Wemos D1 board so there is no further need to modify and upload our program code to our Wemos board.

We will be using the WIfiManager library created by Tzapu to achieve this task.

Below is a brief description of the sequence on how the network credentials are provided to the Wemos board.

1. Power up the Wemos board connected to your jolliCube with D6 pin and GND not shorted on the Wemos board.

2. The Wemos board shall now act as a WiFi Access Point named as AutoConnectAP. Connect to this Access Point from the available WiFi connections detected on your WiFi enabled computer or Smartphone using password 'password'.

3. Once connected successfully, open your web browser and point to 192.168.4.1

4. Click on the 'Configure WiFi' button from the page displayed on your internet browser.

5. Select the available WiFi connection with internet access, enter password and set the

Coordinated Universal Time (UTC) time-offset and click on the 'Save' button.

6. The Wemos board shall then operate as a device with WiFi connection to the internet instead of an Access Point.

If everything is in place, your jolliCube shall go into demo mode and display all the wonderful animations with the date and time information displayed during intervals between different animations. The network credentials are stored and retained in the Wemos D1 mini board even when the Wemos board is power off.

Below is a brief description of the sequence on how to change the network credentials stored in the Wemos board.

1. Power up the Wemos board connected to your jolliCube with D6 pin and GND not shorted on the Wemos board.

2. Depress and hold the momentary button connected to D1 and GND until the displayed animation freeze.

3. Power reset the Wemos board.

4. The Wemos board shall now act as a WiFi Access Point named as AutoConnectAP. Connect to this Access Point from the available WiFi connections detected on your WiFi enabled computer or Smartphone using password 'password'.

5. Once connected successfully, open your web browser and point to 192.168.4.1

6. Click on the 'Configure WiFi' button from the page displayed on your internet browser.

7. Select the available WiFi connection with internet access, enter password and set the UTC time-offset and click on the 'Save' button.

8. The Wemos board shall then operate as a device with WiFi connection to the internet instead of an Access Point.

Step 5: Enjoy!

Sit back and be mesmerized by the amazing animations coming from the LED cube you have successfully completed.

TIME is precious. Your jolliCube will now constantly 'nag' you with the time displayed.

Do not forget to build an enclosure for your LED cube after so much TIME and effort put into completing it.

Share

    Recommendations

    • Epilog X Contest

      Epilog X Contest
    • Warm and Fuzzy Contest

      Warm and Fuzzy Contest
    • Paper Contest

      Paper Contest

    Discussions

    0
    None
    Higgs Boson

    5 weeks ago

    I don't know if this was intentional or not, but I think the reflections of the lights off the inside sides of the case really add to the visual appeal! Very cool!