Tag Archives: moteus_r42

Building the moteus controller dev kits

As mentioned previously, I’m releasing moteus controller development kits to a few lucky beta testers.  Building these wasn’t too hard, but was my first foray into low-volume production for someone who wasn’t myself.  Here are a few pictures of the build:

dsc_0143
Machining the bracket
dsc_0155
A bunch of CAN cables
dsc_0156
A motor mounted on the bracket
dsc_0165
Mounted into the “desk stand”
dsc_0168
A bunch of brackets and stands
dsc_0169
STM32 programming cables
dsc_0170
Motors getting ready for installation
dsc_0172
A number of assembled kits

A big thanks to all the beta testers!  With the next revision of the controller, I’ll continue to have a development kit with roughly the same properties for those wishing to get started in an easy way.

If you have devkit envy, you can get a little fix watching this video showing how to set it up and use it.

 

CAN bootloader for moteus r4.x

One final piece of porting that needed to happen for the moteus controller r4.x series was the bootloader.  The r3.x series has a bootloader, which allowed re-flashing the device over the normal data link, but that was largely specific to the RS485 and mjlib/multiplex framing format.  Thus, while not particularly challenging, I needed to update it for the FD-CAN interface used on the r4.x board.

The update itself was straightforward: https://github.com/mjbots/moteus/compare/406f01…1123a9

For now, on the assumption I will in the not too distant future deprecate the r3.x series, just duplicated the entire bootloader, replacing all the communication bits with FDCAN and stm32g4 appropriate pieces.  As before, this bootloader is designed to only operate after the normal firmware has initialized the device, and also is required to be completely standalone.  To make code size easier to manage, it makes no calls to any ST HAL library and manipulates everything it needs purely through the register definitions.

Thankfully, the ST HAL sources are BSD licensed, otherwise I’m not sure I could have gotten the FD-CAN and flash peripherals to work just given the reference manual.  With it, copying out the necessary constants made for an easy solution.