Startup to known position in a script?

Hello all!

I am fairly new to the Pololu, but not to robotics and other controllers.

I recently made a fairly long script for one of the machines I’ve built, but in the sequence editor, I have the “init” state of the servos, the known state they start from.

However, when powering my Maestro 6 on, it moves all servos to the start position as quickly as posible and then waits for the input of the script to actually start.

My question is: Is it possible to create a startup subprocedure that when powered on, senses the position of the servos and moves them to the start position, but in a more controlled manner, say with speed control and certain order of moving the servos?

When my machine have been powered down properly, it is not an issue, as my script ends in start position, and as long as no one moves the servos by hand, or someone trips over the power cord in the middle of the sequence, it will always start in the same position.

But, I want to cater for the “what if” situation.

If servo 3 is in the “wrong” position at start, can I make it go my init state slowly before the other servos go to their init state?

I hope I make myself clear…

Thanks,
Micke

Hello, Micke.

Standard hobby servos do not make their feedback available externally, so there is no way for a servo controller to know where the servo is like you are describing. When the Maestro is sending servo signals, it assumes the servos are at those positions, although it has no way of confirming whether a servo actually made it to its target. When the Maestro gets power-cycled it has no way of knowing where the servos is and since it is not sending signals it cannot make any assumptions.

To do something like that, you would need to add some kind of feedback mechanism or use a specialty servo that gives access to the feedback potentiometer, like the selection of FEETECH servos with feedback that we carry. However, please note that this would require an additional channel on the Maestro for each servo to read the analog feedback voltage and for your script to do some extrapolation to try to determine what position that analog voltage corresponds to.

Brandon