mjpower-ss

It’s another new product day here at mjbots! Introducing the mjpower-ss:

This provides many of the same functions as the power_dist r4.5b:

  • Pre-charge: High capacitance, low-impedance loads up to 4000uF will be safely turned on in a controlled manner.

  • Undervoltage and overcurrent protection: If the instantaneous current exceeds 100A, a soft circuit breaker is engaged.

  • Connector multiplexing: 1x XT90 input feeds 6x XT30 output connectors which are wired in parallel.

  • External switch: An external illuminated switch is supported, with the same connector and pinout as for the power_dist. A switch harness can be purchased separately.

Electrical power reporting with moteus

TLDR: As of firmware release 2024-05-20 moteus can now report a pretty good estimate of the electrical (and thus mechanical) output power going to the motor. You can get that through all the language binding options or in tview!

Background

Brushless motor controllers like moteus act like step down DC/DC converters. Their input is a higher voltage and low current, while the output to the motor is low voltage and higher current. If working properly, the output current is driven so as to produce torque at the output shaft.

hoverbot

I made a thing!

With that video out of the way, here is a bit more of a write-up!

Motivation

The hoverbot is a simple 2 wheel balancing robot. I built it to demonstrate how the moteus-c1 can be used to drive hoverboard motors and to demonstrate the capabilities of the pi3hat for high rate control and effective attitude reference calculation. It is powered by a single Bosch 18V cordless drill battery and controlled through an identical websocket based interface as the quad A1, primarily operated by a phone with a paired bluetooth joystick.

Wait for trajectory completion in tview

As of pypi 0.3.68, tview has gained the ability to delay execution of a compound command until the currently executing trajectory is complete. This can be useful for developing more complex motions that consist of multiple steps.

To use it, just issue a '?[optional_id]' in your command sequence. For instance, to move to position 1 and come to a stop, then move to position 0 when that has completed, you could do:

Debugging moteus calibration failures

When setting up a moteus controller with a new motor, you typically first run the automatic calibration sequence as documented in the reference manual. When your system is working well, that should be all that is necessary to enable moteus to perform accurate FOC based torque control of the motor. Then you can set up basic parameters and tune the position PID control loop. What happens though when the automatic calibration doesn’t work? This post shares the most common failure modes during calibration.

Optimizing moteus command rate

Probably one of the most frequently asked questions in the mjbots Discord is “how fast can I send new commands to moteus”, or “how fast can I read the status from moteus”. That may be because you want to perform torque based control in your application and require high bandwidth, or just because you have a high torque to inertia ratio system that reacts on very short time-scales. No matter the reason, the principles that control the maximum rate you can send updates are the same.

moteus-c1

I’m excited to announce the newest addition to the moteus line of BLDC controllers, the moteus-c1! The moteus-c1 is a smaller, lower power, lower cost version of the moteus-r4 and moteus-n1, but still packs a big punch.

The top of the line performance metrics for the entire moteus lineup now look like:

moteus-c1 moteus-r4 moteus-n1
Input Voltage 10-51V 10-44V 10-54V
Peak Phase Current 20A 100A 100A
Continuous Phase Current 5A / 14A 11A / 22A 9A / 18A
Dimensions 38mm x 38mm 46mm x 53mm 46mm x 46 mm
I/O AUX1 D and E are present as through hole pads. AUX2 is identical to moteus-n1 AUX1: SPI, Hall, ADC AUX2: I2C and UART 3.3V only AUX1 and AUX2 support SPI, UART, Quadrature, Hall, and I2C. 5.5V and 3.3V provided on each connector. I2C pullups are configurable on each connector.
RS422 None None Built-in transceiver for RS422 based encoders
CAN fault tolerance 58V 12V 58V
Price $69 $79 $149

The upshot is that for low current motors where RS422 is not required, it is nearly as capable as the moteus-n1 for less than half the price!

External daisy chain boards and new PH3 cable lengths

It continues to be the spring of new products at mjbots (see the mjcanfd-usb-1x from earlier), and today I have some basics that are newly added to the store to make building machines just a bit simpler.

First are two tiny boards to make daisy chaining power and CAN-FD connections easier for boards that don’t have built-in daisy chain connectors like the moteus-n1. First is a junction board for PH3 cables:

And the second is a similar junction board for XT30 cables:

mjcanfd-usb-1x

While it may not be technically spring outside, it is spring for product announcements here at mjbots, and I’m excited to announce the next evolution of CAN-FD adapter hardware we’re offering, the mjcanfd-usb-1x:

The major changes from the fdcanusb:

  • USB-C instead of USB micro

  • Smaller form factor - 30x18mm

  • PH3 CAN-FD connector instead of DB9

  • Less expensive, only $39

This makes the mjcanfd-usb-1x better suited for in-application deployments and just all around better as a development tool. It can be mounted down more easily, uses the same connector and pinout as moteus, and is compatible with our existing PH3 cables.

moteus + Arduino

The moteus line of brushless motor controllers currently require a CAN-FD host to send commands in order to actually execute a motion profile. moteus has long provided a python library that can be used on desktop operating systems to send commands and parse responses, and recently added a C++ one as well. Next up, and described in this post, is a library for Arduino which provides the ability to command and monitor brushless motors using moteus motor controllers.