PWM Servo Ramping icon PWM Servo Ramping — Smoothly ramps PWM servos on EZB D0-D23 via Vx-to-Dx mapping for natural, gradual motion without snapping. Try it →
Asked — Edited
2 Participants

Horizontal Servo Centering Bug

I only just opened my EZ-Robot Package tonight, but it seems the centering button on the horizontal servo control is not working correctly.

I think the center position should be the maximum value minus the minimum divided by two then added to the min. OR,

CENTER = (MAX-MIN)/2+MIN

It appears to be simply (MAX-MIN)/2.

For example if you set the MAX value to 70 and the MIN value to 30, the CENTER value should be 50. It is 30. That is because the minimum value has to be 30, but (70-30)/2 is 20. If you set the value MIN value to 15, the CENTER value will incorrectly be 28. That is (70-15)/2=27.5. It should be (70-15)/2+15=42.5. So the Center should be 43.

I hope this helps


ARC Pro

Upgrade to ARC Pro

ARC Pro is your passport to a world of endless possibilities in robot programming, waiting for you to explore.

#1  

So are you saying you made a custom servo script for centering you feel works better?

Author Avatar
United Kingdom
LinkedIn Twitter Google+ YouTube
#2  

I had noticed this previously but never use the centre button so it slipped my mind. I have a feeling it has been mentioned before too though.

Also, if you check my Ping Roam script there is code to calculate the centre position for scripts if anyone needs it:) (Basically Min + Max / 2)