moteus controllers with gimbal motors

To date, I’ve used the moteus controllers exclusively for joints in dynamic quadrupedal robots.  However, they are a relatively general purpose controller when you need something that is compact with an integrated magnetic encoder.  For the v3 of my Mech Warfare turret I’m using the moteus controllers in a slightly new configuration, with a gimbal motor, one for each of the pitch and yaw axes.

Gimbal motor theory and current sensing

From an electrical perspective, gimbal motors are not that all that different from regularly wound brushless outrunners.  The primary difference being that they are wound with a much higher winding resistance.  That enables them to be driven with a much lower current, at the expense of a lower maximum angular velocity.  In this case, I’m using the GM3506 from iFlight which has a winding resistance of 6 ohms, that results in working currents being on the order of 2A maximum.

The moteus controllers are designed to drive motors with phase currents in the 20-60A range.  To operate in current control mode, they use a current shunt resistor connected to a dedicated amplifier for each phase.  The current sensing resistor determines the range of currents that can be accurately sensed.  The resistor that the controllers have by default measures 0.5 milliohms, which gives a reasonable tradeoff between accuracy and power dissipation for 60A operation.  However, for 2A operation, it results in pretty low resolution current feedback.  Thus for this application, I substituted in 5 milliohm current shunts:

dsc_0520
Removing the pre-installed shunts
dsc_0525
New shunts installed

Control modes and noisy velocity

The other potential challenge, is that the velocity signal that can be derived from the AS5047 absolute magnetic encoder in the moteus controller is relatively noisy when operated with no gearbox reduction.  That limits how much derivative gain can be used in a position control loop.  You could get around that by incorporating more plant knowledge in a filter or state observer, but that shouldn’t be necessary here.

Fortunately for this application, I won’t be controlling position based on the absolute magnetic encoder, but instead based on the inertial measurement unit in the primary controller.  The absolute magnetic encoder will be used solely for performing the DQ transform to implement torque control, for which the noise in velocity is irrelevant.

Next up is making these controllers actuate the turret.