chessbit

rev
v1 · v2
nodes
64
frame
50 Hz

per-square piece sensing for any chessboard 64 bytes, every 20 ms

A 20 mm board with one omnipolar Hall switch goes under every square and a magnet goes in every piece. The nodes are soldered into a single chain; an ESP32 clocks the whole board out and streams each move to your computer as a JSON line.

The underside of an 8 by 8 board Sixty-four sensor nodes, one under every square, wired in a serpentine chain that leaves the board at h8 and ends at an ESP32. Sixteen squares in the start position read as occupied; one node at c6 is dead and produces no byte. a b c d e f g h 1 2 3 4 5 6 7 8 to ESP32
0x80 empty 0x00 occupied no byte — dead node at c6

What a byte says

Every node answers with one byte: bit 7 is the sensor, the first bit the 74HC165 shifts out, and the other seven inputs are tied to ground. The switch is omnipolar, so a magnet glued in either way reads the same.

On v1 an occupied square and a dead node are the same byte. v2 ties D0 to 3V3 instead of ground, so a live node always returns a bit a dead one cannot fake.

  1. 1
  2. 0
  3. 0
  4. 0
  5. 0
  6. 0
  7. 0
  8. 0

0x80 — empty

  1. 0
  2. 0
  3. 0
  4. 0
  5. 0
  6. 0
  7. 0
  8. 0

0x00 — occupied

  1. 0
  2. 0
  3. 0
  4. 0
  5. 0
  6. 0
  7. 0
  8. 1

0x01 — occupied, node alive

v2 marker bit, last out: 0x81 empty, 0x01 occupied, 0x00 dead.

The chain

Adjacent pad rows are wired 1:1 with plain AWG 24–26 wire. No connectors, no matrix, nothing to work loose — the whole board is one shift register 64 bytes long.

clock
1 MHz SPI
frame
64 bytes in ~0.5 ms
scan
50 Hz, timestamped debounce
topology
serpentine, soldered hops
mandatory
100 Ω in series on CLK and LOAD, at the ESP32 end
One read, step by step Each node holds the square above it. LOAD captures every square at the same instant as one byte per node: 0x00 where a piece stands, 0x80 where the square is empty. The clock then shifts the bytes along the chain, one node per tick, and they arrive at the ESP32 nearest node first — node 1 is the one the ESP32 is wired to — until the master holds the whole rank in board order. rank #8 #7 #6 #5 #4 #3 #2 #1 nodes LOAD 00 00 80 80 80 00 80 00 ESP32 in 00 00 80 80 80 00 80 00 = one rank
Eight nodes stand in for sixty-four, with v1 bytes. Node #1 is the one the ESP32 is wired to, so its byte comes back first.
Chain timing LOAD pulses low once to latch every node. The clock then runs eight pulses per byte while DATA carries one byte per node, here eight of the sixty-four, starting with node 1, the node the ESP32 is wired to. The whole burst takes about half a millisecond and repeats every 20 milliseconds, which the spec list beside the figure gives as well. LOAD CLK DATA 8 clocks = 1 byte node 01 02 03 04 05 06 07 08 bit 7 first · high bit = empty, flat = piece
Three signals, no chip select; the bits are drawn as the chain clocks them out.

The node

The Hall switch sits at the exact center of the board, so the sensitive spot lands under the middle of the square at any pitch. A thick board costs field strength, not alignment.

Parts in one node and in each piece
DRV5032FAomnipolar Hall switch, board center
74HC1658-bit shift register, one per node
8 × 3 mmNdFeB magnet in each piece base
WS2812Boptional per-square LED, v2 only
Node outline and magnetic path A side view showing the magnet in a piece base, the field crossing the board, and the Hall switch beneath it; below, a plan view of the 20 millimetre v2 outline with the 24 millimetre v1 outline ghosted behind it. SIDE 8 × 3 mm NdFeB board + panel air gap node, Hall switch at center PLAN v1 24.00 v2 20.00 v1 5 cond. v2 7 cond.
Dimensions in millimetres. v1 outline ghosted; both place the switch at the center.

Two revisions

A chain is one revision end to end, and a single firmware flag says which. v1 is what exists in hardware; v2 is the smaller board, with the LED rail and the marker bit.

node v124 × 24 mm

Component side of the node v1 board: two mounting holes, a Hall switch, a shift register, and a row of five plated holes on each edge

component side

Solder side of the node v1 board: a ground pour, the same two rows of plated holes, and chessbit.dev node v1.0 across the silkscreen

solder side

node v220 × 20 mm

Component side of the node v2 board: a WS2812B LED, a Hall switch, a shift register, and a row of seven plated holes on each edge

component side

Solder side of the node v2 board: a ground pour, the same two rows of plated holes, and chessbit.dev node v2.0 across the silkscreen

solder side

Both sides, from the board files, at true relative scale. Nothing plugs in: the wire solders straight into the pad rows.

node v1

pitch
24 × 24 mm
conductors
5 per hop
LED
none
marker bit
none
8 × 8 cost
~$23 parts + ~$5 wire

150 boards manufactured; 32 assembled and reading correctly.

node v2

pitch
20 × 20 mm
conductors
7 per hop
LED
optional WS2812B
marker bit
yes
8 × 8 cost
~$28 incl. LEDs

Designed and verified; never fabricated.

Open on v2, none of it a board change: a hardware cutoff for the LED rail (64 LEDs at full white is 19.2 W into a closed cavity), 5 V injected per rank, and magnetic margin below about 40 mm square pitch. Build a pilot panel before a full run.

How it is checked

Everything regenerates from one Makefile: the PCBs come out of parametric KiCad generators, DRC and ERC run on the output, and the schematic netlist is matched against the board pad for pad.

The chain was simulated in ngspice across all 64 nodes before anyone soldered one. Fifty unit tests and a full simulated game run the real move-detection logic with no hardware attached.

/dev/ttyUSB0 115200

{"t":1021.480,"ev":"frame","nodes":64,"occ":32}
{"t":1023.660,"ev":"lift","sq":"e2"}
{"t":1024.120,"ev":"move","from":"e2","to":"e4","san":"e4"}
{"t":1026.900,"ev":"move","from":"e7","to":"e5","san":"e5"}
{"t":1027.400,"ev":"dead","node":42,"sq":"c6"}
Host output, one frame and two moves — then node 42 stops answering.