I built the sorter's software stack entirely on my own. I also assembled some of its mechanical components and debugged a good amount of the wiring. One machine sorts at 1,500 cards an hour.
Sorting a tray.
Microcontroller (C++)
Runs on a Teknic ClearCore, compiled via PlatformIO.
Drives 6 Leadshine integrated servos over Modbus for the Z axis.
Drives 6 ZK2A vacuum ejectors by pin write, reading pressure state back.
Drives 3 ClearPath XY and conveyor motors over step/dir with HLFB.
Reads error bits every few state cycles, so faults surface immediately.
Computer side (Python)
Talks to the microcontroller over Ethernet on a private network.
Brute force placement with gripper shuffling to optimize location.
Works out every target location, then whether shuffles are needed.
If they are, splits the moves into three tiers (pick, shuffle, place) and brute forces on Euclidean distance.
Worst case is 250 ms, which is what makes brute force acceptable.
Loads barcoded boxes on its own: snaps a picture and runs a QReader model to find the bounding boxes.
Calibrated across four separate cameras so every box is visible.
Drives a gantry-mounted camera that posts frames to an external audit API.
Compares against the reference image from the scanning robots to catch mispicks: 0.3% false positives, 0% false negatives. I did not write the audit backend itself.
Syncs in real time to the onsite PostgreSQL inventory cache, with recovery when a mispick happens.
Sorts on anything in the catalogue: name, price, team, and so on.