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:

Comments from Blogger

mark1506 — November 01, 2016 at 01:35 AM
Thanks for sharing the files! You have mad skills.
Anonymous — November 16, 2016 at 08:33 AM
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!
Anonymous — November 16, 2016 at 12:04 PM
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 !
Ben Katz — November 22, 2016 at 06:41 PM
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: http://scolton.blogspot.com/p/motor-controllers.html
Anonymous — November 23, 2016 at 09:39 AM
Hi Ben, Thanks for the explanation and the link. I will check it right away.
Anonymous — December 12, 2016 at 01:31 PM
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... Thanks:)
Ben Katz — December 12, 2016 at 04:43 PM
Post updated with eagle files, link at the bottom. Enjoy!
Nathan — March 07, 2017 at 09:55 AM
Hi Ben, I really love your blog. I'm also working on a hobbyking-cheap cheetah robot :) How much current can your small motor controllers handle? I read that the MOSFETs can handle 100A but I'm not sure how that translates to actual supplied motor current. I'm currently using VESCs, but they're quite expensive and would like an alternative. Thanks!
Ben Katz — March 07, 2017 at 03:30 PM
Hi Nathan, I'm running 40A peak. The driver will handle this current for at least several seconds, although I have not yet done destructive testing. 40A is the limit of my current sensing setup right now, and with a few modifications I've tried 60A peaks successfully, although it will certainly not do that much current for long.
Anonymous — April 18, 2017 at 09:46 PM
Hi, Awesome blog. I'm curious what shipping option you use when you order from 3PCB. Do you use the DHL option (~$20 to USA for 5 moderate-size boards)?
Ben Katz — April 18, 2017 at 10:30 PM
Yep, $21 DHL shipping. Also, 10 boards usually costs the same as 5, at least for 1 oz boards.