Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Servo Movement At Power Up Before Initialization

When running my servo initialization in the connection script I am able to set position and speed just fine. I noticed that when first powering up before the connection init script runs the tilt and rotation servos both always go to the "0" degree position which is a bit awkward.

I read the servo positioning and speed setting tutorial and it mentions about a reverse init routine before powering down to set the servos in the position that you want them in at power down. This could be done via a button in the mobile app via scripting. At the end it is implied as far as I can tell from reading the tutorial, that once this is done and power is applied again (and before the init script is run) the servos would remain in the same positions as they were when power was removed. This doesn't seem to be the case however.

Wondering if there is a way to keep the servos in the same position at powerup (before the int script is executed) as they were at power down? Why do the servos when power is applied always go to the zero degree position?

I noticed when you use the servo slider in the mobile app, that when you first move the servos after poweup no matter what position the servos are in they go to 0 degree position and then start to function normally.

Any clarification on these issues is much appreciated....Rick

What kind of servos are you using?
The new HDD servo, they are just great. no buzz and strong.
United Kingdom
Wow Giles, is that InMoov number 2 build?
I love the new shoulder moment and pivot points on the chest.
Your print quality is excellent are you still using your FF Dreamer?

Tanks Chris,
It is InMoov #1 modified.
I'm still using my Flash Forge Dreamer
I have 2 of the old servos from the kit in my project, and when powered on they move every time?

I have tried everything to try stop this from happening, but every time i power on the ezb4, they move with every power up.

I have centered the servo, saved it, but that doesn't seem to work, they keep moving..do i have to remove these servos from my project and replace them?

I don't really want my robot to be twisting its torso and neck on every power up..so any help would be great.:)
Most if not all inexpensive hobby servos jerk or move sporadically when power is initially applied... You can't stop it from happening...
@Aerius I think you posted something about that neck mechanism you are using on your Inmoov...I forgot to bookmark it, could you provide the link one more time?:)
These servos move quite a bit.

And on every power up they move more and more in one direction until they can't go anymore.:(

All the other servos don't even twitch or spasm on power up.

Will just remove them and swap them out.
@Aerius great job on your inmoov, can I ask how your doing object tracking with the new neck ?
Thanks a lot! Its such an interesting setup, I will print one to check how it works..:)

Tanks for the good words.
I am using the camera tracking capability of ARC and EZB.

Important point, like us, the eyes are driving the head position

But first to avoid any binding between the 3 neck servos you will need to find the min & max value of each one.

Then these value will be incorporate in a init script attatch to the connection control.

You may look at my project named New Neck for Inmoov
Setting all Min, Max servo positions is a must! It keeps every servo from overshooting either it's physical end stop or the end of motion of what you have attached to it. Here's a section out of my int script setting all my servo's Min, Max:


##Specify the ranges for the servos
##this prevents the servos from ever going past these limits

# Rt side_to_side Wrist
SetServoMin(2.D0, 120)
SetServoMax(2.D0, 165)

# Right Claw
SetServoMin(2.D3, 74)
SetServoMax(2.D3, 102)

# Rt Up_Dn Wrist Servo
SetServoMin(2.D1, 20)
SetServoMax(2.D1, 170)

# Bubble Blocks
SetServoMin(D15, 85)
SetServoMax(D15, 177)

# Bubble Servo
SetServoMin(D1, 45)
SetServoMax(D1, 97)

# Rt Wrist Rest Servo
#SetServoMin(2.D2, 93)
#SetServoMax(2.D2, 139)

Another method to try to keep servos from jumping at startup is to build a centering image (Action) of all servo's rest position in the Auto Position control. You can then place a command in the INT script to call this Action to center all servos at startup of ARC. However it's very important NOT to use the AutoPoitionFrame command. You need to use the AutoPositionFrameJump command. This initializes your servos and automatically sets your position and speeds.

If I first use the AutoPoitionFrame command my servos will move all around before going to center (even if they start close to the center positions). Useing the AutoPositionFrameJump command keeps them from snaking around and they go directly to center.

If you don't want your servos to move at all at startup then you need to:
*Place the attached part in it final resting position on the servo horn or hub in the servos center position.
*Move the part attached to the servo to it's final resting position at shut down.
*Keep the part in the resting position until startup.
*Use the Min, Max settings and AutoPositionFrameJump center action command you built in the Auto Position control in your INT script.

Here's how I find my servo's natural center that it moves to at power up and set the part that is attached to it's resting position:
*Remove the hub or horn from the servo.
*Apply power to the servo and watch it jump to it center.
*I then reattach the hub or horn with the part attached orientated in that parts resting position.

Your servos will always correct themselves to what they consider their default position at power up if they were moved when there was no power. So in short;
Take the screws out of the servo arms, power up the system, pop off the servo arms and put them on again as close to center as possible, put the screws back in. Then power up your system again using the suggestions I gave for your ARC's INT script.;)

Disclaimer: I've used nothing but the high end analog HiTech Servos in my B9 Robot. Other servos may act differently for you. I'm not advocating HiTech over any other servo. At the time of my build I considered these HiTech servos to be the best for my needs. There may be better ones out there in the wild now (including the new EZ Robot HDD servos). ;)
@Dave Schulpius


You need to use the AutoPositionFrameJump command

Hi Dave, could you clarify about this command?
Do you use it within a script or is it part of the existing AutoPositionFrame command?
sure, no problem.

You create a frame in the AutoPosition control just like normal. This frame would have all your servos in their "at rest" positions. This would ideally be the position that your servos will be in when you turn off power Then you go into the Action section of the AP control and make an Action using only this one frame.

Then in your INT script you would find a good place to insert your startup AutoPositionFrameJump command to initialize these servos so they are in your startup and at rest position.

Again, the servos should be the same position as when you turned off power if possible. If you can't keep your servos in the same position when the power is off then they will still move. However using the AutoPositionFrameJump command for that frame, the servos should return to the wanted "at rest" position smoothly.

The only place I can find the AutoPositionFrameJump command without writing it myself is in the Cheat Sheet located in every EZ Script or Script Manager control. It won't be listed by Right clicking in the script window. Look at the Cheat Sheet and scroll down to the Auto Position control where the frame is you built. Find the AutoPositionFrameJump ControlCommand for the frame you built with servos in the At Rest position. Then double click on it to insert it into your script. It will look scomething like this:


ControlCommand("Auto Right Arm", AutoPositionFrameJump, "Center")

Hope this helps and is clear. :)
@Aerius @Dave Schulpius

Thanks for the tips and the project files
@ Dave Schulpius
Tanks Dave, it helps a lot.
@ Dave Schulpius

Thanks for the detailed info on how to do this.

By the way, I just looked into the init script for JD and that's how he does that rigid "snap to attention" movement on connection