United Kingdom
Asked — Edited
Resolved Resolved by Rich!

Limiting Servo Speed After Network Connection

I have an annoying little problem I hope someone can help me with. So, when I power up my EZ-B4 the servos connected to it briefly pulse. Not a problem and expected. All my connected servos have limited speeds and set min/max movement positions. But, after the V4 and my PC connect and I move a servo, any servo, with my controller for the first time, each servo I trigger turns at maximum speed and on the second command I send the servos, they move at their correct set speeds and possitions.

Please tell me if there is a way to stop this from happening and get the servos to turn at the speeds I have set. If this carries on its going to cause damage to components and body parts (not mine). stress

I remember seeing a thread talking about something similar but can't find it now, and not sure if it was fully relevant to the issues I'm facing.

Of course I would be greatful for any help to resolve this.

Cheers.


ARC Pro

Upgrade to ARC Pro

Don't limit your robot's potential – subscribe to ARC Pro and transform it into a dynamic, intelligent machine.

United Kingdom
#1  

You want an init script which will move all servos to a safe position (usually centre of it's range). Once moved to a position you can set the servo speed.

United Kingdom
#2  

@Rich.

Cheers for your reply. I think I found the thread I was on about. It's a year old and possibly related to the EZ-B3 but can you confirm if this would work?



# Clear the servo speed for initialization
ServoSpeed(d0, 0)
ServoSpeed(d1, 0)
ServoSpeed(d2, 0)

# Move the servos into desired initialization positions
Servo(d0, 50)
Servo(d1, 30)
Servo(d2, 45)

# Set the servo speed for these servos which will be used from now on
ServoSpeed(d0, 4)
ServoSpeed(d1, 3)
ServoSpeed(d2, 4)

If so, I asume this goes into the event EZ script editor of the connection config menu?

United Kingdom
#3  

Yep, that looks like it would work. Not sure if the first ServoSpeed() commands would be needed but I guess if you load the project after a different one you would want to reset them so it's not a bad thing to have them there.

Yes, in the connection config for the script to run on connection or as a separate script which is triggered via a ControlCommand() in the connection config script.

United Kingdom
#4  

Brilliant. Thanks for the confirmation and your help Rich. Yet again you have saved the day (and my bot). :D

Cheers. Steve.

PRO
Synthiam
#5  

The manual for the servospeed() explains this also:) if you want more to read about the subject

#6  

At least the Roli sample project also has this in the init script (although the camera servos are missing from the list, so I added them in mine).

Alan

#7  

Just while I can, is there a way to stop the servo jitter apon plugging it in? I just wonder because, for say, the servos were used for something delicate, you wouldn't want the servos jumping around on start. You could add relays to the signal wire that must be enabled before the servos can move, right?

PRO
Synthiam
#8  

TechnoPro, for additional cost you can purchase digital servos instead and sacrifice the physical range. We will be offering full range digital servos made specifically for ezrobot in our store in the new year.

United Kingdom
#9  

@Djsures.

Ah thanks for that. I completely overlooked this bit sleep. Just a thought, but do you think it would be a good idea to copy this lil message over to the speed heading in the ARC manual too?;)