Sharing two things that cost me real bench time on an MKS Dual FOC v3.2 Plus (ESP32, EG2133), in case they save someone else a day.
-
Pinout. There’s no published schematic for the v3.2 Plus. I used the v3.3 repo as a proxy and it held: M0 enable on GPIO 22, M0 PWM phases on GPIO 32/33/25 (older v2.0 examples use GPIO 12 for both motors, which is where a lot of the forum confusion comes from). Board also hard-blocks under ~11.1V; I lost time with the bench supply sitting at 5V.
-
A sensor-health check for the AS5600. After closing the loop, the motor kept locking into d-axis wells while telemetry lied. The real problem was a magnet mounted off-axis (double-sided tape). What finally caught it: an open-loop “S sweep” that logs reported angle vs commanded angle across a full mechanical rev, plus AGC and MAG spread. Off-axis mount read max deviation ~1.5 rad, MAG swinging 3.5x per rev, AGC drifting 78-128 → UNHEALTHY. A printed on-axis holder dropped it to ~0.12 rad, MAG ~1.4x, AGC pinned at 128 → HEALTHY, and it spun.
Also useful: before blaming the sensor chain, I swapped in a synthetic (perfect, ramped) angle via GenericSensor to bisect the fault. It spun instantly under the synthetic sensor, which proved the FOC math/driver/wiring were all fine and pinned the fault upstream of sensor.getAngle().
Wrote some of the learnings in more detail here: Closing the Loop · On Edgy's Lab (and the open-loop bring-up that came before it: Waking a Dead Motor · On Edgy's Lab)