Pages: [1]   Go Down
Author Topic: Calibrating differential steering to go straight  (Read 576 times)
0 Members and 1 Guest are viewing this topic.
Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey all,

Other than trial and error, is there any way to calibrate a differential steering vehicle to go straight? With differences in motor speed and wheel circumferences, it's unlikely that both motors should be driven at the same PWM value, so how have you coped with arriving at the "fudge factor"?
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey all,

Other than trial and error, is there any way to calibrate a differential steering vehicle to go straight? With differences in motor speed and wheel circumferences, it's unlikely that both motors should be driven at the same PWM value, so how have you coped with arriving at the "fudge factor"?

You cope with it by monitoring it - using a slot encoder (preferably quadrature, but not absolutely necessary) for each motor.

Mount the encoder wheel as close to the motor as possible (that is, as "close" to the output shaft as possible - best is directly on the motor's shaft, but if you have to choose the next output gear, that could be ok too).

Monitor the pulses from each encoder - their length should match. If one is "faster" (shorter) than the other, slow that side down (or speed up the other side) until they match again. Monitoring the pulses should be done via interrupt handlers for best results.
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I Library will simplify things!

http://www.pjrc.com/teensy/td_libs_Encoder.html
Logged

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks gents.

Not sure if my motors take encoders: they are the Pololu geared ones and I know there is a version that takes encoders, need to check mine.

It goes "reasonably" straight actually, out-the-box so to speak.
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

New Jersey
Online Online
Faraday Member
**
Karma: 48
Posts: 3391
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Really, without encoders, trial and error is your best bet. A compass is another tool you could use to help calibrate, but wheel slip may deceive you here. I'd be inclined to attach a couple of buttons so that you can adjust the calibration manually without having to reload the code every time - maybe write the settings to EEPROM.
Logged

Pages: [1]   Go Up
Jump to: