Motor Board v1.0

Connections can also be made directly to the ESP32 using jumper wires; every pin on the ESP32 module is connected to the second header-socket hole next to it.
Pinouts
| Group | Pin | Name | |
|---|---|---|---|
| Unused | GPIO1 | ||
| GPIO2 | |||
| GPIO3 | |||
| P/D Controller | GPIO4 | CAP_MIS | Blinks when charger cannot supply the requested power. |
| GPIO5 | I2C SDA | TPS25730D on address 0x21 | |
| GPIO6 | I2C SCL | ||
| Stepper Driver | GPIO7 | RX | UART, auto-detects baudrate (9600 - 500000) |
| GPIO8 | TX | ||
| GPIO9 | TEMP | 10k NTC resistor in voltage divider with 10k resistor | |
| GPIO10 | ENN | Enable-not input, 20k pull-up | |
| Unused | GPIO11 | ||
| GPIO12 | |||
| GPIO13 |
Functional Areas
Power Input
The intended way to power the system is through the USB Type-C port at the top left edge of the motor board. The TPS25730D P/D controller will try to negotiate the apropriate voltage/current. The TPS25730D is configured through resistors forming voltage dividers (R6 - R13), with pre-populated values resulting in requiring 15-20V, >= 2A. In case the sink cannot provide this, the red CAP_MISmatch LED (next to the port) blinks, though this only happens when P/D communication occurred in the first place.
The controller has an integrated power path to cut off power to the rest of the board, but in practice it’s not that helpful, since its enabled even with mismatched capabilities. Power status can be queried through I2C, which allows software to handle showing errors to the user / disabling the motor driver, but it’s not ideal, as the ESP32 cannot drive the error LED itself. When voltage is too low, the stepper motor driver must still limit the current, resulting in much less power driving the coils overall, which makes them too weak to properly hold the linear stage.
Alternatively, power can be provided through the black, 2 port screw terminal.
Microcontroller
Both boards use an Espressif ESP32-S3 microcontroller, specifically a devboard by Waveshare, the ESP32-S3 Zero. The S3 is dual-core, which allows for a tight motor control loop, without interruptions from handling network-related activity. When plugged in, all pins are mirrored to the additional header socket next to it, allowing for debugging/extending by plugging in dupont wires. The on-board 3.3V LDO is also used as a 3.3V supply for the rest of the board.
Its Type-C port is used for communication with the sensor board over USB-CDC Serial, and for firmware updates.
Stepper Motor Driver
5V Buck
Takes in 20V from the Power Input path, and provides 2A of 5V supply to the Microcontroller, which also powers the Sensor board.