Conway’s Game of Life, in real life
Conway’s Game of Life: Building an Interactive LED Matrix with Tactile Switches
The allure of cellular automata has captivated computer scientists and hobbyists for decades. Conway’s Game of Life, a zero-player game invented by mathematician John Horton Conway in 1970, exemplifies how simple rules can generate complex, emergent behavior. While I’ve never been particularly drawn to watching static simulations of Life unfold on a screen, the idea of creating a physical, interactive version was irresistible.
The concept was straightforward: a 17×17 matrix of tactile switches with integrated LEDs, allowing users to draw initial patterns and watch them evolve according to Life’s rules. The switches would serve dual purposes—displaying the current state and enabling pattern editing through direct manipulation.
Budget Considerations and Component Selection
Before diving into design, I established a budget framework. After calculating what seemed reasonable for such a project, I multiplied that figure by ten—a common approach that ensures adequate resources for unexpected challenges and quality components.
The centerpiece of the design became NKK JB15LPF-JF switches. These illuminated tactile switches feature integrated LEDs and momentary contact functionality, making them ideal for this application. At approximately $3 each, they represented the most significant cost component, but their quality and functionality justified the expense.
PCB Design and Control Architecture
With the switches selected, I designed a custom PCB to accommodate the 289-switch matrix. The layout centered around Microchip’s AVR128DA64 microcontroller, positioned in the bottom left corner to optimize routing.
The control scheme leverages multiplexing to manage the LED matrix efficiently. The first 17 GPIO lines from the MCU connect to rows, while the next 17 supply positive voltages to columns. At each intersection, diodes illuminate when both row and column signals are active.
This approach means each row’s duty cycle is approximately 6% (1/17th), necessitating higher current to maintain adequate brightness. With 20 Ω current-limiting resistors in series with column lines, each LED receives about 150 mA from a 5V supply. While this exceeds the MCU’s direct drive capability, n-channel MOSFETs (DMN2056U) handle row switching, and p-channel transistors (DMG2301L) manage column lines.
Input detection reuses the row select lines, pulling banks of switches to ground and sensing their state through another 17 GPIO pins. Integrated pull-up resistors on the MCU die simplify this arrangement.
User Interface and Firmware Design
The user interface prioritizes simplicity. A 10 kΩ potentiometer (Vishay ACCKIS2012NLD6) connected to an ADC pin controls simulation speed, ranging from paused to approximately 10 Hz. Users edit patterns by pressing switches to toggle cells on or off. Each keypress pauses state evaluation for two seconds, allowing multi-pixel pattern creation without constant speed adjustments.
Safety considerations influenced the firmware architecture. To prevent diode damage from sustained high current, screen updates decouple from game logic. State manipulation occurs during brief “blackout” windows when all LEDs are off. An internal watchdog timer adds protection, forcing a reboot if the main loop appears stuck for more than 15 milliseconds.
Assembly and Enclosure
Assembly photographs reveal the meticulous soldering process required for 289 switches and associated components. The completed PCB fits into a handcrafted wooden enclosure, adding aesthetic appeal and protecting the electronics.
The device functions as intended: users can draw patterns, adjust simulation speed, and observe emergent behaviors characteristic of cellular automata. A demonstration video showcases the interactive experience, highlighting the satisfying tactile feedback and visual appeal.
Technical Documentation and Future Possibilities
Source code and PCB production files are available for those interested in building their own version. The project demonstrates several key principles:
– Multiplexing techniques for LED matrix control
– Safe high-current LED driving with MOSFETs
– Input multiplexing for efficient GPIO usage
– Safety-critical firmware design with watchdog timers
– Integration of analog controls with digital systems
Cost Analysis and Alternatives
The switches represent approximately 80% of the total cost. While alternatives exist—touchscreens offer lower cost and greater functionality—they lack the tactile satisfaction that makes this project special. Simpler switches with standalone LEDs could reduce costs, but would require 3D printing or custom keycaps, shifting expenses to equipment and time.
For those seeking premium options, a fully electromechanical version using flip-dot display technology would be fascinating, though significantly more expensive and complex.
This project exemplifies the intersection of retro computing concepts, modern electronics, and interactive art. It transforms an abstract computational model into a tangible, engaging experience that invites exploration and experimentation. The resulting device serves as both a functional demonstration of cellular automata and a conversation piece that bridges digital and physical worlds.
Whether you’re interested in electronics, cellular automata, or interactive art, this project offers valuable insights into hardware design, firmware development, and user experience considerations. The satisfaction of creating something that responds to direct manipulation while demonstrating complex computational principles makes the effort worthwhile.
#ConwayGameOfLife #DIYElectronics #LEDMatrix #TactileSwitches #CellularAutomata #InteractiveArt #MicrocontrollerProjects #PCBDesign #AVR #NKKSwitches #EmbeddedSystems #MakerProjects #ElectronicsHobbyist #PhysicalComputing #DigitalArt
“The most exciting phrase to hear in science, the one that heralds new discoveries, is not ‘Eureka!’ but ‘That’s funny…'” – Isaac Asimov
“Sometimes the questions are complicated and the answers are simple.” – Dr. Seuss
“The only way to discover the limits of the possible is to go beyond them into the impossible.” – Arthur C. Clarke
“In the middle of difficulty lies opportunity.” – Albert Einstein
“The best way to predict the future is to invent it.” – Alan Kay
“Simplicity is the ultimate sophistication.” – Leonardo da Vinci
“Magic’s just science that we don’t understand yet.” – Arthur C. Clarke
“The art of art, the glory of expression and the sunshine of the light of letters, is simplicity.” – Walt Whitman
“Innovation distinguishes between a leader and a follower.” – Steve Jobs
“The future belongs to those who believe in the beauty of their dreams.” – Eleanor Roosevelt,



Leave a Reply
Want to join the discussion?Feel free to contribute!