[Dprglist] Assisting PID odometry with an IMU

Murray Altheim murray18 at altheim.com
Mon Jan 25 00:41:46 PST 2021


On 24/01/21 7:18 am, John Swindle wrote:
> Possible source of oscillation: Will Kuhnle warned me to not put encoders
> on the wheels or on the output shaft of the gearbox, else the windup and
> unwrapping of the gears would cause oscillation and gearbox damage. Analog
> controls such as PID need to be before the gearbox. I may have misunderstood,
> and I may be misrepresenting the admonition Will gave me, but it does sound
> right to me. [...]

Hi John,

Thought I'd follow up to say thanks very much for that warning note.

The Hall effect encoders I have on either the OSEPP motors I'm using on
my larger robots or the Hall effect or optical encoders on the small
(Pololu) micro-metal gear motors are all mounted on extended motor shafts,
not the gearbox output shafts.

The one exception to this I can think of are the optical encoders sold
by various vendors including Pololu that use a set of white plastic teeth
on the rim of the robot wheels:

   Encoder for Pololu wheel 42×19mm with wheel, motor, and bracket
   https://a.pololu-files.com/picture/0J1203.350.jpg?75503cf18b0c2ec3f08cbe089cd7f3b3
   https://www.pololu.com/blog/414/new-products-magnetic-quadrature-encoders-for-micro-metal-gearmotors

I've seen these wheel-based optical encoders on several robot models and
actually own a set but haven't bothered to install them as the hall effect
ones work pretty well, are smaller and more accurate, and one can use whatever
wheels suit the project rather than being bound to the ones with the teeth. I
hadn't known of the danger of windup but suspect that after driving around
for awhile in my lounge the plastic teeth would also be full of cat hair.

> I thought someone posted a PID tuning algorithm long ago here. I don't
> care about it very much, so I haven't looked for it. I think maybe Will
> or Ron made a presentation on it. It doesn't require tweaking. It chooses
> the correct settings merely based on the system's response.
> [...] 

I've seen some Arduino PID auto-tuning libraries but not yet found one for
Python. As I'm using my own bespoke PID code I'd have to port anyone else's
code but auto-tuning a PID controller is certainly on my interest list...

Cheers,

Murray

...........................................................................
Murray Altheim <murray18 at altheim dot com>                       = =  ===
http://www.altheim.com/murray/                                     ===  ===
                                                                    = =  ===
     In the evening
     The rice leaves in the garden
     Rustle in the autumn wind
     That blows through my reed hut.
            -- Minamoto no Tsunenobu



More information about the DPRGlist mailing list