Arduino + PWM + Sabertooth 2X25


I'm trying to control two DC motors with an Arduino. I'm using Sabertooth 2X25 motor driver with 12V battery. While reading Sabertooth data sheet, I came across this explanation on page 11: If you are using a filtered PWM signal from a microcontroller to generate the analog voltage, an R/C filter with component values 10k ohms and at least .1uf is recommended as shown in Figure 4.1. Using a larger value filter capacitor such as 1uf or 10uf will result in smoother motor operation, at a cost of slower transient response. A PWM frequency higher than 1000Hz is recommended.

Can please someone help to explain this? I'm a programmer, not an electrical engineer so I don't know what's this all about-


Figure 4.1 seems pretty straightforward. Are you confused by those connections? (asking honestly)

When the PWM output on your Arduino is pulsing the signal, the capacitor is storing some of that current during the "on" times and then releasing it during the "off" times. This helps smooth out the voltage from 5V / 0V to something more in-between. The resistor is there to limit the current from the Arduino pin to stop it from flooding the cap during the "on" times.

Stick with the 10K resistor and .1uF cap (a ceramic cap is fine) as recommended. This is one of those times when you need an oscilloscope in order to do a better job of tweaking the values.

Isn't it easier to use the 'R/C' inputs, and treat it as a pair of servos?

@Chagrin, yes I was a bit confused by those connections. Now that you explained is a lot much clearer to me. Thank you. But what about recommended 1000Hz PWM signal for Sabertooth? As far as I know Arduino's PWM is only about 500Hz?

@dxw00d, I haven't tried to control it as servos. You think this is better?

Thank you for your replies.


I don't know if it is better, but I would think it would be easier.

danijels: @dxw00d, I haven't tried to control it as servos. You think this is better?

I use RC method to drive my Sabertooth 2x5 with my Arduino and it works perfectly. No additional hardware required and the Servo library makes it easy to control motor speed.

I did try the analog method once just for the challenge, and with the Arduino's PWM frequency, the performance was very subpar. With the recommended filtering, I could still see a high frequency fluctuation in the motor drive. With more filtering, I got smooth motor drive, but noticeably more sluggish response to changes in voltage/speed. There may have been a sweet spot filtering setup that worked well, but the RC method just works, period.