The Personal Robotics group has proposed the idea of co-designing a Motor Controller board.

For purposes of a name (absent an alternative yet) we'll call this the "Personal Robotics Motor Controller". Maybe we can come up with a shorter, better name...

Shurik179 has proposed a strawman specification of:

  • 2-channel brushed DC motor driver
  • 4.5-12V, up to 2.5A continuous per channel, with current limiting (so can be used with motors with much higher stall currents)
  • quadrature encoder input for each motor
  • closed-loop PID with various modes (separate for each motor, motors tied together, etc), using a built-in slave MCU (probably RP2040)
  • controlled via I2C, with configurable I2C addess, so several can be chained together
  • price of about US$20 per board (from Zizumara: what does this include? Parts and commercial assembly?)
  • reverse polarity protection, or take your chances that the power source is connected properly? (Zizumara)


The initial support library looks to be written in C, with a possible alternative in MicroPython.

AdamGreen has written an I2C peripheral library for the RP2040 and posted it on github.

Design Choices: MCU Pros and Cons#

MCU Pros Cons
STM32 programmable in MicroPython or C/C++; I2C slave implementation available in MicroPython may be difficult to source; Digi-Key has many available
RP2040 inexpensive; programmable in CircuitPython, MicroPython or C/C++ neither Mouser nor Digi-Key has them in stock
SAMD21 inexpensive relatively lower processing power; C/C++ only

Design Choices: Connector Pros and Cons#

Connector Pros Cons
Dupont inexpensive; readily available; breadboard-able; can make own cables TBD
Qwiik small very difficult to make own cables
JST-PH/STEMMA small very difficult to make own cables
JST-SH small very difficult to make own cables
Note: Dupont is 0.1" pitch; JST-PH is 2.0mm pitch; JSP-SH is 1.0mm pitch


Discussion has been moved to the Personal Robotics Motor Controller Discussion page.

First Prototype#

The following details were put together by Shurik179 and Zizumara for a first prototype design that meets most of the basic requirements according to best component availability.
  • RP2040 MCU
  • Two MP6519 motor control ICs (load 2.5-28V, 5A; 65 mOhm Rds; QFN-19 SMD package)
  • Host connection via I2C with Qwiic/STEMMA connector
  • 3.3V MCU powered from host (on same connector as I2C)
  • 5V-12V motor power via 2-wire screw terminal block connector (no polarity protection)
  • Motors connected via 6-wire screw terminal block connectors
  • Programming via micro USB B connector
  • Debugging via 10-pin Cortex-M SWD/JTAG connector
Estimated component costs
  • $2 - $3 for RP2040 and supporting components (oscillator, flash memory, capacitors, etc.)
  • $5.20 for 2x MP6519 motor controllers ($2.60 ea.)
  • $4 for all connectors


Schematic, PCB, and software files can be found at