Loading…
Loading…

Nine motors with four coils each make 36 outputs. The ESP32 has nowhere near that many pins to spare, so three MCP23S17 expanders on one SPI bus drive nine ULN2003 boards, and the third expander also reads all nine Hall sensors.
I soldered it on perfboard over several evenings, from a wiring diagram generated with WireViz, so even the wire lengths came out of the CAD.
The motor groups still ended up shuffled on the chips. Instead of re-soldering, I wrote a scan that steps each channel and watches which magnet goes past. Every ring answered except Mercury. Its magnet was glued in upside down.