Special-purpose hardware built to reject wrong answers fast, before handing the few survivors to a slower, smarter processor, is a pattern that goes back a century and still shows up in Bitcoin ASICs, camera autofocus chips, and the interrupt filters on your own microcontroller board. Maker KB Sriram just gave that pattern a literal history lesson: he rebuilt a 1982 electronic number sieve, chip for chip, using parts you can order today.
The build
Sriram's project, called A Tiny Sieve, swaps each of the original design's ROM-and-counter pairs for an ATtiny412 microcontroller. Thirty of them plug into a shared backplane, and a single RP2040 runs the show: it generates the clock, advances every ATtiny in lockstep, and only bothers with real math once a candidate number survives all 30 checks. Each ATtiny owns one modulus and stores its own accept-or-reject pattern in flash. If a chip decides a number can't be a solution, it pulls a shared open-drain line, Sriram calls it VOTE, low. Silence from all 30 chips is the only signal that gets the RP2040 to run its slower verification step.
Why the numbers check out
Sriram didn't just build the thing, he audited it against history. He reran published problems from D. H. Lehmer's 1928 bicycle-chain sieve (19 chains on a shaft), a 1932 steel-gear version, and a 1965 delay-line machine, and every result matched, except where he found small errors in the original papers, including an incorrect period calculation on the 1933 gear machine. His RP2040-driven rebuild runs at roughly 500,000 candidates per second, about 100 times the throughput of the 1932 gear machine, using the same reject-fast-verify-slow architecture. The open-drain VOTE bus is worth stealing for your own projects: it's the same wired-AND trick I2C uses for clock stretching, and it scales to as many nodes as you can fit on a backplane without adding an extra GPIO pin per chip.
Where to take it
You don't need 30 chips to try this pattern. A single ATtiny412, about $0.40 in volume, paired with a Pi Pico is enough to prototype a reject-fast filter for a school robotics project: throw out bad sensor readings before your main loop touches them, or gate noisy ADC samples on a line-following bot. Read Sriram's full write-up and source files linked from the Hackster.io project page, then try wiring two spare GPIO pins as an open-drain vote line between two microcontrollers before you scale up.
Originally published on blog.circuit.rocks.
Top comments (0)