View Full Version : [Question(s)] Motor Controller. Do I need a servo controller too?

11-13-2008, 02:45 PM
My project consists of a BS2, Sabertooth 2x5, BaneBot 36mm gearmotors, BaneBot wheels.

Question1: do I need a servo controller in conjunction with my Sabertooth?

Initially I didn't think I did, seeing as my BS2 is responsible for all commands sent to the Sabertooth. I opted for simple serial mode and constructed the following code:

SEROUT MotorPin, 84, [127] 'full speed for motor 1 at 9600 baud
SEROUT MotorPin, 84, [255] 'full speed for motor 2 at 9600 baud

My issue is (at any speed), my motors do not seem to be working in unison. Rather, motor1 is always moving at a different rpm then motor2.

Question2: Is this common and/or to be expected and therefor compensated for in code?

Thanks in advance,

11-13-2008, 03:16 PM
Hi David, Welcome to the forum!

"A different speed" - how much different?

Motors need to be "trimmed-out". There's always a certain amount of mismatch in speed, which may be attributed to the motor, to the gear train, friction in the drive-train, switching in the controller, etc., and that's why R/C transmitters have the trim sliders on each channel - so, yes, as you guessed in [Q2], it's common and has to be compensated for in code. If it's really extreme, I'd probably want to trace back and make sure there wasn't some other cause - gears binding, problems in the drive train, lubrication, etc.

No - you don't need a servo controller in this case, your motor controller (because it's not the R/C version) is functioning as expected. Even if it were the R/C version (servo / PWM only), you could do PWM out from your BS2 and not require a servo controller - although in that case, it'd probably be easier...

11-13-2008, 03:53 PM
As Adrenalynn said, no two motors will ever be perfectly matched. The actual output speed will always be diffrerent for two motors, even when given the same desired speed from your BS2.

Also note, that this calibration may need to be done again over time as motors may change.

The only way to know that two motors are going the same speed all the time is to "close the loop" and add encoders, which will allow you to measure the actual output speed of each motor and then you can adjust the desired speed that your BS2 outputs to make the actual speeds match.


11-13-2008, 04:16 PM
Yeah, thanks. Great feedback. Will this suffice?:


Will the above provide feedback on both or just a single motor? I am assuming just one..

One last question: The Sabertooth offers me 2 communication solutions; simple serial and PWM. Will using one over the other do anything for my imbalanced rotation issue (I am assuming no since your feedback seemed in the way of hardware imperfections)?

Again, thanks for the welcome and prompt responses.

11-13-2008, 04:21 PM
Do you have that specific motor solution? It's pretty custom to the 36mm Banebots. There are other quadrature encoders out there otherwise.

Also, do you have the tools to align a quad encoder? (An oscilloscope)

Nope - PWM or serial - same diff.

11-13-2008, 04:29 PM
I do in fact have that specific 36mm motor setup. However, I do not have a scope.

Lets say I side-step an encoder. Could it be as simple as coding an offset variable to compensate for my motors mechanical differences?

11-13-2008, 04:54 PM
It could be - although you may want to make that easily changed since over time motors and gearboxes will "loosen up".

A simple rate encoder doesn't require anything to "tune up" - but it can't tell the difference between forward and backward. You might also look-up 2bit and 4bit encoders too.

If you want to consider 2bit encoding, have a look at these: http://www.trossenrobotics.com/store/p/5113-Hamamatsu-P5587-Wheel-Encoder-Modules.aspx Nice pre-built option.

11-14-2008, 11:03 AM

Thanks for all your feedback yesterday.

Last night I slapped everything together. Completely unlike my initial setup (BaneBot 16mm 24:1 gearmotors), these guys ran true and in a relatively straight line.