Stopping servo prior to reaching target

Is there a way to stop a servo when it is in motion towards target value, though not yet reached that value? Do I use getPosition then send that value as new target value or is there a simpler way. I was going to try setTarget(ch#, 0), I just didn’t know how the servo would respond and didn’t want to risk it.

Hello.

Sending a target position of 0 will cause the Maestro to stop sending servo pulses on that channel. How your servo responds to this depends on your specific servo. Some digital servos will continue using the last valid pulse width they received, while other digital servos, as well as analog servos, will stop holding position. So, depending on what you’re doing, this could work for you.

For example, if you’re using a speed or acceleration limit on the Maestro, the Maestro breaks the movement up into many smaller movements. This means if your servo is one that holds it’s last valid position, it will probably stop very close to where it is when the pulses stop (depending on your speed and acceleration settings). The other method you suggested of reading the current position and updating the target position to that value also requires a non-zero speed or acceleration limit to be configured, and will work in a similar way (regardless of how your servo behaves if it stops receiving pulses).

Brandon

Hey Brandon,
Looks like 5 (HPS2027) of the 6 servos I’m running will not hold position when PWM signal off, while the 6th one (LDX335MG) will. Still have quite a bit to learn about all this and greatly appreciate your help. I will go ahead and use the “ getPosition “ method as all servos have speed and acceleration limits. Can I increase the BaudRate from my Arduino R4 to the MiniMaestro12 ? All references I have seen are 9600.

The Maestro does support higher baud rates; the maximum achievable baud rate depends on the servo signal frequency and serial mode. With the default frequency setting of 50Hz and while using one of the UART serial modes, the maximum is 200 kbps. You can find a chart with additional details in the “Maestro Settings Limitations” section of the Maestro user’s guide.

Please note that if your Maestro’s serial mode is set to “UART, fixed baud rate”, you will need to configure it to match the baud rate used by your Arduino, which you can do from the “Serial Settings” tab of the Maestro Control Center.

Brandon

All servos I’m using are 50hz, and 115.2kbps ability will definitely help improve response time as the sensor processor also sends data as serial in/out to Arduino. Thank you for your time. I will be connecting up some VL53L4CD(3692) LIDAR sensors soon, so I’m sure you’ll hear from me again.