Plays MIDI notes on NEMA 17 stepper motors. One motor per MIDI channel, default 7 voices. ESP32 + A4988 drivers, tones generated by hardware timers (LEDC + MCPWM).
Inspired by jzkmath/Arduino-MIDI-Stepper-Motor-Instrument.
- ESP32
- 7× A4988 driver + 7× NEMA 17
- 12V PSU
- 100µF cap per driver on VMOT/GND
STEP pins: GPIO 4, 5, 6, 7, 15, 16, 17. All grounds common. Vref ~0.5–0.6V.
Raw MIDI bytes over USB serial. Channels 1–7 → motors 1–7. Supported: note on/off, pitch bend (±2 st), CC 120/123.
Edit STEP_PINS[] in src/main.cpp. First 4 voices use LEDC, rest MCPWM.
Max 10 voices on ESP32-S3 (4 LEDC + 6 MCPWM timers), 14 on original ESP32.
Avoid GPIO 0, 3, 19, 20, 26–32, 45, 46 on the S3.
MIT