DEV Community

Cover image for This ESP32 CHIP-8 Computer Runs on a Flame and a Stirling Engine
circuitrocks
circuitrocks

Posted on Originally published at blog.circuit.rocks

This ESP32 CHIP-8 Computer Runs on a Flame and a Stirling Engine

Power is the quiet constraint on every portable build. You size a battery, budget your current draw, and then quietly decide what the project will never do. PicketCode went the other way and removed the battery entirely: this desktop machine runs on the heat of an open flame.

A Stirling engine as the power supply

A small Stirling engine sits over a burner. Heated air in the chamber expands and pushes a piston; a flywheel carries the cycle around while cooler air is pushed back in. The output shaft spins a small DC motor in reverse, so the motor acts as a dynamo rather than a load. A panel voltmeter sits in-line, which turns the whole rig into a live demo of the thermal-to-electrical chain. Everything downstream is ordinary hobby gear: an ESP32 dev board, an OLED, and a 16-key keypad.

Why 16 keys and not a keyboard

The ESP32 runs a CHIP-8 interpreter, a virtual machine written in the mid-1970s for exactly that layout: 16 hex keys, 0 through F. CHIP-8 asks for 4KB of addressable memory and a 64x32 monochrome display, and its programs conventionally load at address 0x200. That is a rounding error against a 240 MHz dual-core ESP32 with a few hundred KB of SRAM, and the mismatch is the reason the build works. A 1970s VM leaves so much headroom that the chip can sit at a low clock and still keep frame rate when the dynamo output sags. Whether a microcontroller counts as a computer is a fair argument, but this one has a CPU, memory, persistent storage, a display, and an input device, and the CHIP-8 homebrew scene is still shipping games for it.

Build it yourself

The electronics half is a weekend of breadboard work. An SSD1306 128x64 OLED goes on SDA and SCL, a 4x4 matrix keypad eats 8 GPIO (or one ADC pin if you build a resistor ladder), and the CHIP-8 core is a few hundred lines of C. The tricky part is the rail. A small dynamo gives you a wobbling, load-dependent voltage, so put a buck-boost regulator and a fat capacitor bank between it and the board, and switch the Wi-Fi radio off in software: those transmit bursts pull 250 mA and up, which will drop you below the ESP32 brownout threshold every time the flywheel stutters. Start with a bench supply, get CHIP-8 running first, then swap the flame in. Build notes and video are on the original writeup at Hackster.


Originally published on blog.circuit.rocks.

esp32 #esp8266 #iot #wifi #circuitrocks

Top comments (0)