Code for turning a servo until stall
geometrix
Posts: 27
Parallax Guru's,
I am trying to find some documentation about driving a servo motor until stall.· Is there a way to calcuate the realtime stall condition of a servo using the BS2?· Or is there a function to do this?· I am not interested in measuring the stall current with my DMM·and then using that as a constant and somehow factoring that into the code.· Rather I am wondering if the parallax modified servo has an encoder that I can read to calculate if the motor speed has decreased to zero.
TIA,
Geometrix
I am trying to find some documentation about driving a servo motor until stall.· Is there a way to calcuate the realtime stall condition of a servo using the BS2?· Or is there a function to do this?· I am not interested in measuring the stall current with my DMM·and then using that as a constant and somehow factoring that into the code.· Rather I am wondering if the parallax modified servo has an encoder that I can read to calculate if the motor speed has decreased to zero.
TIA,
Geometrix
Comments
·· There really isn't a lot of information to provide an answer.· Is this on a BOE-Bot?· If so we have a wheel encoder that will work with our servos on the BOE-Bot.· If not, you could probably adapt it somehow, although it's really designed around our wheels.· As for detecting a stall when driving a servo, there is no feedback from a servo, so there is no way to detect the stall condition without the encoder.· You could test for current, but that's a different method and no an exact science.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com