I got inspired to make this from an Instructables article. Thomasj152 did a great job with this, and my hat is off to him for his work. It looked so cool, I had to make my own, with my own personal variations in construction and software. Then I made two more to give to my sons for their birthdays.
I could not get it to print with acceptable results on its corner like in the article , so I re-designed it with Fusion 360, and printed it in ABS plastic. It is printed with one flat side down, and the four side edges along with it. The top is printed separately, and small alignment pegs and matching holes are printed to get it to go together correctly when gluing. I glued it with black ABS cement from the hardware store. The tripod stand is then glued to the cube, and it has holes in the bottom to be threaded for 4-40 machine screws to mount to the base. The .stl print files are available for download below, and the design file for use with Fusion 360 is available here.
I added a tripod stand, a base, and a floor under the base to hold the electronics. Instead of an Arduino Uno microcontroller, I used a Teensy 3.2, and used DotStar LEDs. The DotStar’s high PWM rate gives a flicker-free colorful display. It is programmed with the free Arduino software, and with the add-on software for the Teensy. The FastLED library also needs to be installed in the Arduino programming software. The Teensy is very small in size, and it fit inside the base well. The name “Teensy” fits! I handmade my knob for the rotary switch with brass tubing.
I used one-way mirror that I got from Tap Plastics, 1/8 inch thick. I mounted it on the inside of the cube, with the mirrored side facing inside the cube. I placed one side at a time, using gravity to hold it down, and a thin bent wire to reach epoxy glue in to the edges, placing drops of glue all around each piece. When I got to the last piece, I removed the edges of the protective film, and added a piece of wood taped to the face. Then I could hold the mirror in against the opposite side while I put some glue where the mirror was going to sit. Then I pulled the mirror into position and waited for the glue to harden before removing the wood handle and remaining protective film. It is important to glue the mirrors in place after testing the LEDs.
I wired up the strips of DotStars in the same configuration as Thomas did with his NeoPixels in Instructables, that way I could use his code and testing program, and that worked very nicely. Then I wrote some of my own code to animate the lights. They could be wired all kinds of ways, but if you choose a different way, then all of the code has to be changed to get the same displays. The wires coming out of the bottom of the cube and stand are long enough to reach the circuit board with the bottom off and sitting next to the cube. Then it can be programmed using the USB plug on the Teensy circuit board.
The Teensy microcontroller runs on 3.3 volts. It has a 5 volt input which steps it down to 3.3 volts. The outputs are 3.3 volts, and the DotStar strips run on 5 volts, so a 74AHCT125 buffer was added to translate the Teensy’s 3.3 volts into 5 volts. This is a surface-mount chip (not available in DIP, unfortunately), so I designed a printed circuit board with ExpressPCB. The file for ordering this PCB is below. DigiKey also has tiny, inexpensive prototype boards for 14-pin SOIC chips that can save making the PCB. The buffer chip is not super tiny, and only a small challenge to solder.
I added a 16-position hex switch to select between different programs: variety programs that include groups of different light animations at different brightness levels, and the option of playing single animations continuously. This is not necessary, but I like the flexibility, and it made it easy to try different variations of programs without disturbing code that was already working.
Files for making the infinity cube:
STL files for a 3D printer are in InfCube3DprintFiles.zip, with some notes about them.
Here is my latest code for running the Cube.
Thomas’s test program to test the wiring of the LEDs.
PCB design for getting a board made by ExpressPCB.