Skip to content

Releases: mjbots/moteus

2025-12-18

19 Dec 13:20

Choose a tag to compare

  • Fix the scaling of servo.inertia_feedforward, it was previously off by a factor of 2 * pi

2025-09-25

26 Sep 13:22

Choose a tag to compare

  • Implement servo.inertia_feedforward for calculating a feedforward term based on the control acceleration

2025-09-20

21 Sep 15:02

Choose a tag to compare

  • Trigger the ADCs with LPTIM to conclusively resolve the STM32G4 ADC errata: #100
  • Use hardware CAN filters to reduce CPU load on multi-node busses and reduce or eliminate the frequency of missing responses
  • Improve runtime performance when processing diagnostic mode commands
  • Actually make UUID masks work
    • Previously, while the controller would not respond, other side effects like diagnostic channel read or writes would still take effect
    • Report a new register, 0x158, which is present and 1 if this fix is in place
  • Generate an error if an invalid onboard encoder is configured

2025-07-21

22 Jul 14:26

Choose a tag to compare

New features

  • When output current or power is being limited, report the reason why. This is reported in the fault code register in any active, non-fault mode using new error codes. If users were checking for a non-zero fault code to determine a fault, they will need to be updated to first look for a fault mode.
  • Improve hall effect performance. At low speeds, the estimated velocity is now calculated by measuring timing between ticks, transparently switching to the existing PLL filter at higher speeds. This results in drastically improved results with only hall sensors and much less sensitive to PLL low pass filter selection. Other heuristics improve hall performance when used for commutation.
  • Add support for the CUI AMT22 absolute SPI encoder (thanks to [email protected])
  • Index aux inputs can be configured as active low with aux?.index.invert

Minor improvements

  • The encoder low pass filter had previously been erroneously specified in terms of the "nominal" frequency, not the 3dB cutoff as intended. Switch the meaning of that parameter to be the 3dB cutoff, which is what moteus_tool already used for the current loop bandwidth. moteus_tool will transparently upgrade existing devices to maintain the same semantics. The default --cal-bw-hz is now updated to 200Hz, which gives similar audible noise to the old default.
  • servo_stats.motor_max_velocity now properly accounts for any configured motor_position.rotor_to_output_ratio
  • In dual encoder configurations, set the output filter bandwidth as well.
  • A fault is generated if servopos.position_min or servopos.position_max are configured outside of the meaningful range.
  • Do a better job of completely ignoring configuration for aux pins that do not exist
  • Encoder validity reported over the register protocol did not report the velocity for the 3rd encoder properly (thanks to otaviagood)
  • Further improve the robustness of I2C encoders

2025-04-30

01 May 14:30

Choose a tag to compare

  • Rework flux braking and controller/motor thermal limits to be specified as upper limit + range, rather than upper and lower limit. This makes adjusting them for new operational regions much less error prone
  • Improve robustness of I2C peripherals, they should now restart properly in most if not all occurrences of transitory electrical faults
  • When using a PEAK adapter with python-can, set the default timing parameters appropriately
  • Fix calibration if servo.max_position_slip or servo.max_velocity_slip were configured
  • The default devkit config now sets servo.max_voltage=30 as the PSU shipped with devkits is a 24V supply
  • Support moteus-x1

2025-03-27

27 Mar 19:56

Choose a tag to compare

New features and capabilities

  • Improve numerical accuracy and stability of calibrated phase resistance, Kv, and inductance across a range of motor types. In some cases the improvements are small, on the order of a few percent. In some inductance cases, the old techniques could be off by a factor of 10x or more, and are now within a factor of 2x.
  • Revise the power limiting subsystem. Now each board has a "factory power limit profile", which varies with supply voltage. servo.max_power_W is always used directly and unscaled if enabled and can further limit the factory profile. This results in an increase in rated peak power for most controllers, in some cases by more than 2x. Further, power limiting is now done in current space rather than voltage space, which makes it more robust under load and when near maximum PWM duty cycle.
  • Automatically switch to servo.voltage_mode_control during calibration if it looks like the maximum current of the motor is small relative to the observed current sense noise.
  • Record motor torque constant as motor.Kv instead of motor.v_per_hz. Simultaneously, remove several fudge factors and rationalize the definition of Kv to match that which is measured by an open loop phase to phase oscilloscope test.
  • When possible, use a constant current lock-in for encoder calibration instead of constant voltage. This works better for all controllers, and is much better for controllers that do not have dead-time compensation. The old voltage technique is used for older firmware boards, and for motors which have a low calibration current to current sense noise ratio.
  • Implement a slew rate limit on commanded current, servo.pid_dq.max_desired_rate

Robustness and error handling

  • Remove dead-time compensation - after further investigation, the non-linearity was in current space, not PWM space. While this improved things a bit at zero speed, it added more audible noise and made things worse at non-zero speed.
  • Fix a spurious warning in tview when editing combo box configurable values.
  • Generate an error in moteus_tool if attempting calibration with a non-0 commutation source.
  • Make moteus_tool --cal-no-update more robust.
  • Make moteus_tool --calibrate work properly if moteus_tool --cal-invert was used previously.
  • Make moteus_tool --calibrate refuse to calibrate controllers with a firmware ABI newer than moteus_tool knows about.

moteus_tool compatibility

  • This firmware requires moteus_tool version 0.3.77 or newer to flash and calibrate.

2024-11-14

16 Nov 19:14

Choose a tag to compare

  • Use space vector modulation - this increases the maximum speed achievable by 15% on all motor and controller types
  • Properly calculate maximum speed on moteus-c1 - the maximum speed was previously reported as 38% too high
  • Automatically calculate CPR in motor_position for many configurations where the CPR is known
  • Limit the PLL filter frequency for UART encoders based on the configured polling rate

2024-10-29

29 Oct 20:13

Choose a tag to compare

  • Many changes were made to make encoder compensation work better for hard configurations, such as with off axis MA732/MA702/MA600 magnetic encoders.
    • Upgrade encoder compensation to 256 bins from 32
    • Upgrade the compensation script to support both an inertial mode and a reference mode, improve plots
  • Commutation compensation now linearly interpolates between bins, which further helps off-axis encoders
    • As a side effect, compensation tables can now be invalid if too steep, resulting in an error
  • Support the MA600 SPI magnetic encoder
  • Implement PWM output for aux ports - all pins previously marked as hardware quadrature capable can now be used as PWM output
  • Expose the UUID over the register protocol, allow individual commands to be scoped to a UUID prefix. In the future, this could be used with the multiplex broadcast address to discover devices.
  • The motor thermistor resistance now defaults to 10k and is configurable

moteus_tool from pypi version 0.3.73 or newer is required to flash this firmware.

2024-06-17

18 Jun 15:17

Choose a tag to compare

  • Properly decode AksIM-2 warning and error bits
  • Make MA732 trimming for off-axis applications actually work
  • When encoders are no longer active, stop using them and trigger a fault
  • Limit the commanded velocity to something physically achievable
  • Fault if a non-reducing gear ratio is configured without overriding
  • Default bemf_feedforward to 0.0, and fault if it is configured non-zero without acceleration limits or override

This requires moteus_tool from pypi of 0.3.71 or newer to flash over CAN.

2024-05-20

21 May 00:49

Choose a tag to compare

New capabilities

  • The ilimit can now be scaled in addition to kp and kd on a per-command basis. This allows seamlessly switching between position and velocity mode even when an integrative term is configured.
  • Electrical power to (or from) the motor is now estimated and reported as servo_stats.power_W and register 0x007

Fixes

  • Fix many problems when motor_position.output.sign == -1, including BEMF feedforward and cogging torque compensation
  • Produce an error for many more malformed diagnostic mode commands, like d pos 0 0 f1

Compatibility

To flash this firmware, moteus_tool version 0.3.70 or newer is required.