Here is a self-test running across all thirty cards on a stripboard backplane. Each LED lights in slot order while the OLED reports the address it is checking.
Last time, I tested the cards one at a time. They now sit in a stripboard backplane with 30 headers, which brings its own failures. A cold joint or a bridge on the backplane, or a card not seated far enough into its header. A card that incorrectly holds the shared VOTE line low rejects candidates that should pass. This causes the run to silently fail, as every valid solution is discarded before verification by the Pico. The machine now checks itself before it starts. I also wanted to know how fast it can run, so I measured two things on VOTE with all 30 cards fitted: how long after a REQ edge a card pulls the line low, and how long the line takes to return high once every card has released it.
The stripboard backplane
I built it on a 3U Eurocard stripboard, with 62 holes along each of 38 copper strips.

Fitting thirty 8-pin daughter cards, a Pico and an OLED is tight. I tried several layouts in diylc before settling on three rows of ten, with the Pico on the left and the OLED in the corner beside it. The Pico's right-hand column of pins lands on the same strips as the first card slot, so ground, SDA, SCL, VOTE and REQ reach it directly. Vcc is taken off a jumper from the 3V3 pin on the Pico.
An ATtiny412 draws 2.7 mA running at 10 MHz, and each LED about 1 mA, so thirty cards with every LED lit come to roughly 111 mA. The OLED takes an additional 20 mA or so. The Pico's regulator is rated at 800 mA, so the 131 mA total leaves plenty of margin.

The strips are on the underside, so everything is mirrored once the board is turned over to work on them. I drew the component outlines on the top side first, and poked a wire through each hole to confirm a position before cutting anything.

To break a strip I spot-face a hole. I place a drill bit at a hole and gently turn it by hand until the ring of copper around it is gone, then verify that the two sides of the break are no longer connected. Stripboard has no solder mask, so solder spreads about one hole's width along the strip from every joint. If you solder first, cutting through it can be difficult. So I made the breaks first, then the jumpers while nothing tall got in the way, and the headers last.



Flashing thirty cards
Each card gets its own I2C address as a compile-time define, so a batch script walks through all thirty, one at a time. It rebuilds the binary for each address and prints which slot the card goes into. Slotting them sequentially along the rows makes it easier to tie an I2C address to a physical position when something goes wrong later.
After the shipping image is flashed, the jig talks to the card over I2C: it reads STATUS back, loads a modulus-7 ring, steps 14 REQ edges by hand, and checks VOTE against the pattern that ring should produce. I couldn't do this in the last build as there was no I2C firmware to talk to yet.
A failure doesn't advance the address counter, so I can reseat the card and retry. Poor seating in the jig socket was the only failure I saw during flashing.


Self-checks
With one open-drain VOTE line driven by 30 cards and no error detection, a single mistake can silently make a run worthless. A card stuck holding VOTE low rejects valid candidates, and the run then completes and claims no solutions exist.
I first enhanced the I2C protocol, to make it more robust and to let me inspect each card's internals. I added a CRC-8 checksum, and each command always returns a single-byte response code. So a card can reject a corrupted command and inform the Pico, rather than silently doing something unexpected. I added a STATUS command to return the card's ring position, whether it is armed, its modulus, firmware version and why it was last reset. The reset reason shows whether a card was reset by a brownout part-way through a run.
I then wrote a set of checks that run before the sieve starts.
- Run an I2C scan to collect and verify the addresses of devices that respond, including the OLED.
- Rerun the scan with REQ held high, then low. Any bridge to REQ makes the two address lists different
- Idle VOTE: disarm every card, then run 10 REQ edges. VOTE should stay high throughout
- LED walk: light each card's LED in slot order, one at a time. Watching it move down the rows confirms that a card's I2C address matches where it physically sits
- Arm one card at a time, clock REQ, and compare VOTE against the pattern that card's ring should produce.
When the board first came up, three of thirty slots did not answer the I2C scan. I could identify them quickly, both by the address and by the LED walk, which skipped the problem boards. Simply re-seating the cards fixed all three. On closer inspection the fault was likely some debris that fell into the female headers, not the solder joints themselves. The female headers seem to collect lint.
All the self-checks passed once I reseated the cards, so I have some confidence there are no bridges, shorts or opens on the four shared lines: SDA, SCL, REQ and VOTE.
Faster VOTEs from the tinys
Clock correction first. The tinys run at 3.3 V, and are only rated for 10 MHz at that supply. I was incorrectly testing at 20 MHz in a prior log, when I measured around 5 µs (100 cycles at 20 MHz) to cast a vote. At 10 MHz that same code would have taken 10 µs before it voted.
I moved the VOTE code directly into a hand-written interrupt handler. It reserves a few registers and pre-computes the vote, so the first instruction in the handler drives the VOTE line. The interrupt is cleared and the vote for the next edge is computed before it returns from the handler. What remains is the time for the ATtiny to detect the edge and reach the interrupt vector.
I measured around 950 ns from the REQ rising edge to VOTE low at 10 MHz, against 5 µs in the previous build at 20 MHz. That is a five-fold improvement, while running at half the clock speed.

Reducing the VOTE release time
In a prior log the VOTE line took about 10 µs to release, using only the Pico's internal 50-60 kOhm pull-up. In this version I enabled the pull-ups across the tinys as well, about 20-50 kOhm per card, 35 kOhm typical. Thirty of those in parallel come to around 1.2 kOhm. Each card also adds a small capacitance to the line, but the drop in resistance should have a much larger impact.
Measured on the stripboard: REQ rising edge to VOTE settled high, 1.684 µs. That is one candidate every 1.684 µs, or about 600,000 a second.

That 1.684 µs includes the 950 ns the tinys take to vote, so the line itself takes around 700 ns to charge. I could keep shaving cycles off the tiny code, but that 700 ns is set by the pull-up resistance and the capacitance of the line and the thirty cards on it. A smaller pull-up would shorten it, at the cost of more current that needs to be sunk by every card that votes to reject.
Getting into the MHz range needs a different arrangement: each card driving its own VOTE line actively, with all thirty collected in a wide AND gate. That is what the later machines did. The 1965 delay-line sieve and the shift-register machine around 1980 both used active drive rather than one shared open-drain line.
Links to the firmware and self-test code is here on GitHub.
Next, some results from sieving runs.
kbsriram
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.