3D-Printed Game of Life: a Mesmerizing LED Light Show

by andrei.erdei in Circuits > LEDs

4510 Views, 80 Favorites, 0 Comments

3D-Printed Game of Life: a Mesmerizing LED Light Show

M1.jpg
M2.jpg

There are some things I find myself coming back to again and again. Conway's Game of Life is one of them. The way simple rules can give rise to complex, ever-changing patterns is endlessly fascinating. It's like watching a tiny universe unfold before your eyes.

This project is a smaller, more accessible version of my LED coffee table project – a 20x20 matrix of LEDs that brings the Game of Life to life in a vibrant display of color and light. It's not quite a lamp, not quite a piece of art, but something in between – a mesmerizing blend of technology, mathematics, and 3D printing.

I'm not even sure what to call it yet, but at its heart, it's a celebration of the beauty of algorithms and the power of emergence. In the next steps, I'll show you how I brought this project to life, from designing the 3D-printed enclosure to coding the LED animations. Whether you're a seasoned maker or a curious beginner, I hope you'll find this project as captivating as I do.

Supplies

C3.jpg
C0.jpg
C1.jpg
C2.jpg

very few components...

  • 96 led/m LED strip;
  • Wemos D1 mini module;
  • 5V/4A power source;
  • DC plug, female, 2.5mm with wires;
  • wires, shrinkable tubes ...

Notice: The LED strip is a bit special, having four input and output pins. I simply didn't use the ones labeled BI and BO. It seems that the addressable LEDs are WS2813...

Designing and 3D Printing the LED Matrix Housing

a1.jpg
a2.jpg
a3.jpg
a4.jpg
a5.jpg
a6.jpg
a7.jpg

Building on lessons learned from past projects, I tried to 3D print as much of this build as possible. The only exception, of course, is the electronics. Speaking of which, the electronics consist of 400 individually addressable LEDs, a Wemos D1 Mini microcontroller, and a power supply.

The LEDs are the stars of the show. To achieve a high density and keep the overall size compact, I used sections of LED strip with 96 LEDs per meter. You could also use 100 LEDs per meter strips. These high-density strips can be a bit harder to find and more expensive, so I've included a design on the project's Tinkercad page for a support that accommodates 60 LEDs per meter strips.

Besides the 3D-printed LED support, you'll only need two more printed parts: a top cover and a bottom cover. The bottom cover is straightforward, but the top cover is where things get interesting. Part of it is printed with a semi-transparent black PLA filament, which I've used before in my Voronoi LED Lamp project. This time, I only used it for the 3mm section that needs to be semi-transparent, while the rest of the cover is printed with regular black PLA. I added a pause in the print to swap filaments.

For the semi-transparent section, I used a rectilinear infill pattern, while the rest of the print used a grid pattern. If you prefer a more pixelated look for the LEDs, I've also included a 3D printable grid that can be added to the build.

Electronics and Software: Breathing Life Into the Matrix

schematic.png
B1.jpg
B2.jpg
B3.jpg
B4.jpg
B5.jpg
B6.jpg
B7.jpg
B9.jpg
B8.jpg

The electronics for this project are relatively simple, as you can see in the schematic above. However, there's one less common aspect: I divided the LEDs into groups of 100 to ensure stable power delivery and improve responsiveness. Let me explain...

In WS2812 LED strips, data is transmitted serially from one LED to the next. The longer the strip, the more time it takes for the data to reach the last LED. To achieve fast animations, which the capable Wemos D1 Mini microcontroller is well-suited for, it's better to have smaller groups of LEDs.

While the electronics are fairly standard, I made two significant changes to the software compared to my earlier projects. First, I expanded the number of color palettes, resulting in a much richer and more diverse visual display. Second, instead of resetting after a fixed number of generations (256 in my previous projects), I now attempt to detect if the pattern has reached a stable or near-stable state (equilibrium). If so, the LEDs fade to black, a new color palette is randomly selected, and the simulation restarts with a new random configuration.

In essence, the code simulates Conway's Game of Life on the 20x20 LED matrix using the FastLED library. It begins by randomly initializing the matrix with a few "live" cells. Then, it iteratively applies the Game of Life rules to evolve the pattern. Each cell's color is determined by its current state (live or dead) and a color index that cycles through the chosen palette, creating dynamic color changes as the pattern evolves. When equilibrium is detected, the process repeats, ensuring an endless display of evolving colorful patterns. You can find the code attached below.

The photos above show a few moments from the assembly process. As you can see, it's not overly complicated.

Watch the Patterns Evolve: a Time-Lapse of the Game of Life

3D-Printed Game of Life: A Mesmerizing LED Light Show

A Game of Life Display That Inspires

This 3D-printed Game of Life display is more than just a lamp or a piece of art; it's a testament to the captivating beauty and complexity that can emerge from simple rules. It's a mesmerizing fusion of art, science, and technology, showcasing the power of algorithms and the elegance of self-organization.

While this project is, I think, a delightful realization of Conway's classic concept, there's always room for improvement and exploration. The modular design opens doors to even denser displays, such as using 8x8 LED matrix modules to create a more detailed and immersive experience. This scalability allows for a wide range of possibilities, from wall-sized installations to miniature desktop versions.

Furthermore, the Wemos D1 Mini's untapped WiFi capabilities offer a wealth of potential enhancements. Imagine controlling the simulation remotely from your smartphone, sharing your creations with others online, or even integrating the display with web-based pattern libraries. These features could transform this project into a truly interactive and collaborative experience.

I hope this project has sparked your curiosity and inspired you to explore the fascinating world of cellular automata. If you have any questions or need further guidance, don't hesitate to ask. I'm always happy to help fellow makers bring their ideas to life!