October 31, 2016

Small Motor Controllers, Round 2

A few minor differences on this revision:

  • Switched to lower-ESR through-hole electrolytic capacitors, from surface mount ones
  • Added a MCP 2562 CAN transceiver, to make it more straightforward to build robots with lots of motors on them.
  • Moved all the connectors to the edges of the board, and made them right-angle, for neater wiring
  • 2 oz copper instead of 1 oz.
  • Sweet white solder mask
Stack o' boards from 3pcb:

One assembled (minus electrolytics):

And fully assembled attached, with a motor and absolute + encoder position sensing, programming header, and serial port attached:

And some files:


  1. Thanks for sharing the files! You have mad skills.

  2. Hi Ben,

    Your posts are interesting. I just saw that ST released an integrated brushless motor driver with a Cortex-M0 in the same package. Regarding your design, why did you choose such a powerful Cortex-M4 ? Is it needed to have a finer control on the motor ?

    Have a nice day!

  3. Hi again,

    After re-reading your post from February, I believe that you need an M4 with FPU in order to be able to use the field oriented control of the motor, right ? Do you think that a crude/basic FOC algorithm could be implemented on a Cortex-M0 ?

    Thanks !

    1. Hi,

      The STM32F4 is definitely overkill. Basically, I chose it out of inertia - I'd done a bunch of prototyping for this and other projects with the STM32F4 Nucleo dev boards, so it was very little effort to port my code over once I integrated the same microcontroller on my own boards. A more appropriate choice would probably have been one of the F3 series, which also have some extra fancy timers and other nice features for motor control / power converters.

      I don't know about M0, but Shane has done sensorless FOC on much slower micros, like STM32F103's, TI MSP430's:

    2. Hi Ben,

      Thanks for the explanation and the link. I will check it right away.

  4. Hi,

    good work! Do you plan to make available also the Eagle files? I'd like to use your motor controller but I need to make some minor changes in the design...


    1. Post updated with eagle files, link at the bottom. Enjoy!