parallaxinc / Simple-Libraries

Contents of the SimpleIDE workspace folder and its Parallax Learn Simple Libraries subfolder.
http://learn.parallax.com/propeller-c-set-simpleide/update-your-learn-folder
21 stars 21 forks source link

servo360 - Add feature for coupling servo speeds #115

Closed AndyLindsay closed 6 years ago

AndyLindsay commented 6 years ago

There needs to be a way to slow down a number of servos to match the slowest one. Especially at the slowest speeds.

AndyLindsay commented 6 years ago

abdrive360 - slow down faster wheel at top speed #102 is part of this, so it was closed. Errors can also occur close to the zero speed deadband.

The servo360 library recalculates predicted position at 50 Hz based on the speed setting. So, instead of using the slower wheel as a benchmark for the faster wheel, it might be better scale the P control at the slow and fast ends of the transfer function to deal with it.

AndyLindsay commented 6 years ago

Proof of concept works impressively well at cruising speed and enhances the already improved straight line ability (after initial PID tuning). Still needs tuning at low speeds where proportional doesn't push hard enough. Hopefully, all we need is the b in y = mx + b.

AndyLindsay commented 6 years ago

Closed, proof of concept in this snapshot,

Notes:

Will open issues for coupling function calls and tuning.

This feature was combined with troubleshooting 64 ticks per second cruising speeds in some ActivityBot servos.

Important: The library support for 4 servos was cut back to 2 for this troubleshooting.

Always make sure to get the latest from the community branch.