Asked — Edited
Resolved Resolved by DJ Sures!

Servo Speed - Only Fast, Medium And Dead Slow Available

Hi gang,

I have no problem getting servos to change speed using the ServoSpeed command in scripts and if I don't set the speed they run at 100%. However, I've had an issue with servos not using the full speed range available. In the scripting manual for this command it tells us:

" The servo speed is a number between 0 (fastest) and 10 (slowest)". 

With some of my smaller servos like the Micro sizes Hitec HS-85MG or the Mini HS-225MG I only have a couple speed settings with the ServoSpeed command that works: 0 is full speed, 1 is 1/2 speed and 2 will let the servos move as slow as the minute hand of a clock. Anything above that is as good as stop. I have noticed with other bigger servos I'll get better speed changes as I go toward 10.

Is this normal with different brands or sizes of servos? Is there any way to stretch this out so I can get better speed choices between 0 and 10?


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

#1  

This will vary from one servo to another. Not every servo has the same resolution. Also the servos that have better resolution are digital and usually more expensive. A cheap analog servo may only respond to a few position speeds. I have tried some of the mini servos I have under continuous rotation and servo controller and they seem to vary in sensitivity. I look forward to see what DJ says about it.

#2  

@Dave... Just in case you didn't know (which you probably do and not sure it will actually affect your results any).... You have to set an initial servo position before setting the speed. You do this once, then you can adjust servo speed as you wish... However, if you use release then you will have to reset servo position then speed again....


servo(D0,90) # initial servo position
servoSpeed(D0,5)  # Now you can set the speed


#3  

Dave I noticed it too. As an FYI I use Torxis servos for head pan/tilt. I have really limited my posting on this forum as of late because well I don't find it a comfortable experience. Thanks Chris

#4  

Thanks @Josh, I was afraid of that. I dont like to use the digital servos too often as they whine when holding load. I know I can swap out the control board with a controller that switches at sonic speed to quite it down but that's not practical sometimes and it's expensive.

@Richard, thanks, I did know that but I wasnt aware of having to reset them after I've released. Good to know. Thanks for the guidance.

@kamaroman68, good to know others are experiencing the thing with the servo. So sorry you don't feel comfortable around here. I guess that's inevitable when there are so many personalities around and each with their own agenda. I'm glad your still around though and willing to help out a guy like me from time to time.;)

PRO
Synthiam
#5  

There is no way I can think of a servo not responding to the speed - because the speed has little to do with the servo. If the servo is not responding well to the speed, I would assume the code is incorrectly written or the servo is incompatible with all other servos:)

The speed literally just ramps the pwm from position A to position B over time. The servo is unaware of this happening - because this is how a servo works.

You can post your code example and someone can help you fix it? I'm sure it'll be easy:)

If either of you are having doubts, I highly recommend watching the two videos on this page: https://synthiam.com/Tutorials/Help.aspx?id=168

One of the videos explains how a servo works with pwm. The other video shows how the pwm ramp works for servo speed. The sad part is, if the servo is not able to "respond to a ramping pwm", then I don't know how it would move at all, ever.

#6  

Sure DJ. The code I'm using are below . However I am getting the servo to move it's just that when the speed is set higher than the number two setting it moves so slow you can't see it. I'm using analog Hitec HS-85MG and the Mini HS-225MG so they aren't cheaply made servos. Not as quality as the ones you sell in the EZ Robot store but still well respected. Could it be that ARC is optimized fro the custom servos you guys sell?

Here's the code I'm using. :


Servo(D0, 25)
ServoSServoSpeed(D0, 0)

Sleep(4000)

Servo(D0, 160)
ServoSServoSpeed(D0, 1)

Sleep(4000)

Servo(D0, 90)
ServoSServoSpeed(D0, 3)

#7  

I think the code should be:


Servo(D0,90)
ServoSpeed(D0,3)

#8  

@Dave .... also, the call for servo speed should come before the servo move command...


ServoSpeed(D0, 0)
Servo(D0, 25)

Sleep(4000)

ServoSpeed(D0, 1)
Servo(D0, 160)

Sleep(4000)

ServoSpeed(D0, 3)
Servo(D0, 90)