4.5 Connect I/O Expander
RJ12 UART2 expansion using GPIO 25 and GPIO 27
Use a V4.7B-compatible PiBot expander and documented cable. The connector carries more than serial data, including Vmot-main and +5 V. Connect or disconnect only with all power off.
V4.7B RJ12
GND / Vmot / +5 V / TX / RX
⇄
🧩
PiBot I/O Expander
compatible model only
Configuration
- Disable the OLED/I2C sections because the expander shares GPIO 25 and GPIO 27.
- Enable
uart2 and uart_channel2 in a copy of the machine YAML. - Set TX GPIO 25, RX GPIO 27 and the expander's documented baud rate; the supplied V4.7B example uses 1,000,000 baud.
- Restart with the expander connected and confirm that neither the main controller nor expander reports communication errors.
Map and test each I/O
- Document every expander pin's purpose, electrical level and safe boot state.
- Test inputs with the machine unable to move.
- Test outputs with only indicators or a meter before attaching relays or loads.
- Verify Feed Hold, Reset and emergency-stop strategy independently of the expander connection.
Pendant and I/O expander use the same UART channel. Whether they can be combined depends on the exact PiBot accessory system; do not attach two generic devices to the RJ12 bus without documentation.
Acceptance check: every mapped input/output behaves independently, communication survives repeated power cycles, and loss of the expander leaves the machine in a safe state.