I built an Infinity Cube powered by an ESP8266 and NeoPixel LEDs. The result is a mesmerizing LED cube with multiple color modes, Wi-Fi control, and a clean 3D-printed enclosure.
In this post, I’ll explain what I built, how it works, and give you a step-by-step overview so you can rebuild it yourself.

I built this Infinity Cube as an ambient light project that combines 3D printing, NeoPixel LEDs, and Wi-Fi control. It’s a decorative piece, but also a great platform to experiment with LED animations and ESP8266-based web interfaces.


What is the Infinity Cube?

The Infinity Cube is an LED sculpture that creates the illusion of an infinite loop of LEDs.
The original cube design was created by James and published on Printables. I adapted the project by:

  • adding an ESP8266 (Wemos D1 mini) for smart control
  • creating custom firmware
  • designing a modified stand inspired by this that holds a push button and allows quicker 3D prints
  • adding Wi-Fi configuration and a web interface

Features at a Glance

  • use seven predefined color modes
  • one dynamic color shift mode
  • change modes via pressing the physical button
  • Wi-Fi connectivity for comprehensive remote control via web interface
  • configurable night mode (start and end time)
  • time update via NTP server
  • automatic summer/wintertime change
  • easy Wi-Fi setup with WiFiManager
  • customizable colors via webinterface

Hardware Used

Here’s the hardware I used for this build:

  • ESP8266 (Wemos D1 mini) (amazon*)
  • 156x NeoPixel WS2812B LED-strip 60/m (amazon*)
  • push button with LED (amazon*)
  • USB-C female connector (amazon*)
  • micro-USB male connector (amazon*)
  • USB-C cable (amazon*)
  • USB power supply (5V/3A) (amazon*)
  • 3x M3 inserts (amazon*)
  • 3x screws M3x30 (amazon*)
  • 3D-printed parts (frame + stand)
  • Wires, soldering tools

All required 3D printing files are included in the GitHub repository.

techniccontroller / infinity_cube_esp8266

Source code and 3D printing files for Infinity Cube on GitHub

* The links are affiliate links. The offers do not come from me, however, I receive a commission through the reference, if then a purchase takes place, but without you incurring additional costs.


How the Software Works

The ESP8266 runs custom firmware written for the Arduino framework.
Once powered on, the cube:

  1. Connects to Wi-Fi (or opens a setup portal if not configured)
  2. Syncs the time via NTP
  3. Starts the currently selected LED mode
  4. Hosts a small web interface for configuration

Using the web UI, you can:

  • change color modes
  • customize colors
  • enable night mode
  • adjust timings

A physical button allows quick mode switching without using Wi-Fi.


Step-by-Step: How to Build It

This is a step-by-step guide on how I built the infinity cube.

  1. 3D Printing

    Print the following parts:

    2x frame: frame.stl
    1x frame with hole: frame_with_hole.stl
    6x small diffuser: small_diffuser.stl
    3x large diffuser: large_diffuser.stl
    1x stand top: stand-top.stl
    1x stand bottom: stand-bottom.stl

    I recommend printing with 0.6 nozzle and .3 layer height due to the large size of the parts.
    I used black PLA for the frame/stand and white PLA for the diffuser.

  2. Assemble the frame

    Before installing any electronics, you need to assemble all frame parts and the stand. I use super glue to attach the frame parts to the stand. Attention: you need to assemble the frame and the stand at the same time; you can not fit the frame into the stand.

  3. LED Assembly

    Cut the NeoPixel LED strip into the following segments, so that the assembly inside the frame is easier:

    6x segment with 9 LEDs
    2x segment with 17 LEDs
    2x segment with 34 LEDs

    Connect the segments by soldering short cables (1.5 cm) between the LED strips. The sequence should be: 17-9-9-34-9-9-34-9-9-17. See the following picture as a reference for one frame. After connecting all segments, you can glue them into the frames with double-sided tape. Don’t forget to solder some cables to the beginning of the strip and feed it through the hole in the frame.

  4. Electronics

    The electronic components are pretty simple, similar to my DigitalClock project, but I added a push button with a built-in LED. I have provided the wiring diagram below.
    The NeoPixel data line is connected to GPIO 5, and the push button is connected to GPIO 2 with an internal pull-up enabled. The LED of the pushbutton is connected to GPIO 4. No additional resistor is used, as the button LED already includes one.

    After soldering the circuit, mount the push button and secure the other component with some tape in the stand.

  5. Stand bottom

    Before mounting the stand bottom, melt the M3 inserts into the stand as seen in the picture below. Then you can mount the buttonplate with three M3 screws.

  6. Mount diffusers

    You can glue the diffuser parts to the frame with some super glue.

  7. Software

    To upload the software onto the ESP8266, follow these steps. More details can also be found in the README.md on GitHub:

    1. Clone the project into the sketch folder of the Arduino IDE
    git clone https://github.com/techniccontroller/infinity_cube_esp8266.git
    Or download the latest release as a zip archive and extract it into the sketch folder.
    2. Install the required libraries: see Installation.
    3. Upload the program to the ESP8266 as usual: see Upload program to ESP8266.
    4. The implemented WifiManager helps you to set up a Wi-Fi connection with your home Wi-Fi -> on the first startup it will create a Wi-Fi access point named “infinitycubeAP”. Connect your phone to this access point and follow the steps which will be shown to you.
    5. After a successful Wi-Fi setup, open the browser and enter the IP address of your ESP8266 to access the interface of the webserver.
    6. Here you can upload all files located in the folder “data”. Please make sure all icons stay in the folder “icons” also on the webserver.
    – Open http://<ip_address>/fs.html in a browser
    – Upload fs.html
    – Upload style.css
    – Upload index.html
    – Create a new folder icons
    – Upload all icons into this new folder icons


The Finished Infinity Cube

The Infinity Cube is now ready. Navigate to http://<ipaddress>/ or http://infinitycube.local/ to open the web server interface of the Infinity Cube and have fun with it!


This Infinity Cube is a great combination of electronics, 3D printing, and software. It works well as ambient lighting and is also a fun project to extend with new animations or sensors.

As always, feel free to fork the project on GitHub or adapt it to your own ideas.

Share this post

0 Comments

Add a Comment

Your email address will not be published. Required fields are marked *