High pitched sound from motor using Trex Jr

I have a Maxon RE series motor connected the Trex Jr and am controlling it speed via a potentiometer. I have the Trex Configurator hooked up at the same time so I can look at signals coming from it. The motor has some drag torque on it because of how it is installed and I cannot do anything about that. So when I turn on/up the potentiometer, the motor does not move initially even though you can see the current going up on the configurator output. During this time when the motor is stalled and the current is increasing, I hear a high pitched sound that increases in volume until the motor breaks loose and it starts turning. This happens for either direction of rotation. I have an 0.1uF cap across the motor leads.

Any suggestions on how I can damp out the sound ? I am suspecting it is something from the PWM ringing the motor. Would a larger cap help (I don’t have any on hand at the moment or I would have tried that already) ? I don’t have an oscilloscope available either for now so I can’t look at the actual signal going to the motor.



What you are hearing is probably the PWMing of the motor output. Capacitors will help to decrease electrical noise produced by the motors, but I don’t think they’ll have much of an effect on audible noise. Unfortunately, the maximum PWM frequency supported by the motor drivers on the TReX Jr is 10 kHz, which means ultrasonic PWM frequencies exceed the drivers’ ratings.

One thing you could try is changing the PWM frequency by using the appropriate configuration parameters. The default frequency for the TReX Jr is 2.4 kHz, which results from a PWM prescaler of 1 and a PWM maximum of 0x7F (i.e. 7-bit motor speed). You can reach 10 kHz by using a PWM prescaler value of 0 and a PWM maximum of 0xFF (i.e. 8-bit motor speed). You can also try substantially decreasing the PWM frequency by trying a PWM prescaler of 2 or 3; perhaps a lower frequency would be quieter, or at the very least less annoying than a 2.4 kHz whine.

Lastly, you could try running the TReX Jr at 20 kHz, which is outside the range of human hearing, by using a PWM prescaler of 0 and a PWM maximum of 0x7F. We have not characterized how the motor driver performs at this frequency, so you would be using this frequency at your own risk and might notice a significant decrease in performance. If you do try this, it might be helpful to wait until you have access to an oscilloscope so that you can better observe how the driver handles this switching speed.

Please let us know if any of the above suggestions help!

- Ben