Asked — Edited

Ive Notice Something Wierd

has anyone have this happen , after shutting down the power to ezb board .then power up again . when seems good i give command to look home .and servos move fast in wrong way then come back slowly to home position . then everything is ok as long i dont unplug battery pack.


ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

United Kingdom
#1  

I assume it's because the servos don't know their position when you first power them on... I might be wrong on that though

#2  

ive try everything i can think of , its like wierd:D

#3  

I have the exact same issue. I have a script at connexion which move some servos to a defined position. If the script is launched after a shutdown/power-up, the servos go crazy and move suddenly to an unexpected position, then they go to the defined position in the script. If I just disconnect the board and reconnect it (no shutting down), there is no problem... I am also puzzled...

#4  

i think we need dj opinion on this too :D

#5  

I have just tried again and observed carefully what happens. It seems that all servo try to go to position 0 before going to the expected position... and as none of the servos is able to go to 0 (limit is more around 10-15), it gives a strange and scary result. I agree, we certainly need DJ expertise...

#6  

yea i see the same going on fully max on servo, then it goes to the position i told it to got too, DJ we need you:D it cause my robot to bracket the come lose alittle its like whip lash. when it rotate the neck.s.:D cory

PRO
Synthiam
#7  

I don't know how that is possible. Post your project.

#8  

@DJ, I am at work now (time difference with US;) ) but i will post my project when I am back home. Thanks.

#9  

@dj how do post my project ? ty cory ;) ;)

United Kingdom
#10  

On the left of the reply box, under the row of smilies and UBB code is Attach File... Let's do this the easy way...

User-inserted image

Click on browse

User-inserted image

Find your project file (were ever you saved it) and click open

User-inserted image

Click upload

User-inserted image

It's should then be attached to your post.

OR

Save it to the cloud in ARC (I don't have ARC at work so can't do pictures of that way)

#11  

thanks you i can do that:D i just tryed it didnt post it, maybe i could email him my project ty cory

#14  

This sounds a lot like the problem I was having with my servo. When I would start up ARC for the first time the servo what slam all the way to the end of the rotation then come back to the position I wanted. I talk about it in my project. I did find a workaround. visit my project pages and you'll see a discussed. it's almost towards the end. let me know if this helps. synthiam.com/Community/Questions/2263

#15  

@Dave, It seems that we have the same kind of problem. However, none of my servos have "1" as a min position, but have between "15" and "35". Here is a screenshot :

User-inserted image

I have made some observations that maybe may help :

1/It happens only after a shutdown/power-up of the EZB, not after a simple deconnexion or closing of ARC. 2/After Power-up, if I just load the project, connect to EZB and directly launch the following script :


Sleep(1000)
ServoSpeed(d10, 2)
ServoSpeed(d11, 2)
ServoSpeed(d8, 2)
ServoSpeed(d9, 2)
Sleep(500)
Servo(d10, 50)
Servo(d11, 60)
Servo(d8, 50)
Servo(d9, 50)
Sleep(1000)

Servos go suddenly to "0", then slowly return to asked positions

3/However, if I manually move one servo (with servo control) after connexion and before launching the script, all servo move to "0", except the one that has been moved!

I hope it will make sense for @DJ, because I certainly don't have a clue...

PRO
Synthiam
#16  

Do this...



# Init servo positions
ServoSpeed(d10, 0)
ServoSpeed(d11, 0)
ServoSpeed(d8, 0)
ServoSpeed(d9, 0)
Servo(d10, 50)
Servo(d11, 60)
Servo(d8, 50)
Servo(d9, 50)

Sleep(1000)

# Set servo speeds
ServoSpeed(d10, 2)
ServoSpeed(d11, 2)
ServoSpeed(d8, 2)
ServoSpeed(d9, 2)

If you set the speed before the init position, the servo is going to slowly move into the position you specified.

Also, keep in mind how a servo works. You can find more under the Tutorials section, I advise reading. It uses electrical pulses in a pulse to determine the position. When you power on and off the ez-b, electrical pulses are sent which are going to move the servo randomly. That is an inherit behaviour of the servo and how they work.

#17  

Do do you center yourservo to the 50 position before you attached your horn? That would be where EZI builder thanks center is. Then attach the horn to your neutral position. after you make sure that is the case set your minimum position to 50 and see what happens.

The other thing I did was built a switch circuit with a transistor in resistor in a diode. I used that circuit to turn on the power to the servo after the enable signal is sent from ARC. I attached the switching circuit to a digital port on EZ-B and used ARC to switch the transistor on and off. this is how I was able to smooth out the startup of the Servo. again, this is just the workaround I don't know why ARC jumps to the absolute minimum settings that start up.

Let me know what happens. DJ did seem interested in this problem when I was talking about it in my thread.

#18  

@DJ, IT WORKED! The problem came from setting another servo speed than "0" before the init position.

I voluntarily set the speed before the init position, because i prefered to see the robot slowly move its arms and head to a neutral position at startup. The script by itself worked well, if not launched after a power on...

So, I clearly have missed something, because I don't understand why setting a slower speed induce a return of the servo to position "0", before moving to the defined position, and only after a power on.

Concerning the electrical pulse, I indeed observe it each time I power on the EZB and servos move to a random position, but very close to their previous position (before power on). What I observed could happens long after power on the EZB... It didn't change anything if I launched the script immediatly before power on or 10 minutes after.

In any case, you saved my day and Wall-E don't have its scary wierd behavior anymore. Thanks.

@Dave, thanks for the help:)

#19  

Thank you again DJ. first chance I get I need to redo my startup script so this won't happen to me anymore. thanks guys for bringing this up. my project keeps running better and better everyday thanks to this group.

PRO
Synthiam
#20  

It makes sense logically and there is no way around it.

When you set the speed to a value 0, that means instant.

When you set the speed to a value other than 0, it means ramp between the two positions.

When you move a servo to position 10, it was at position 0 during power up. That is because the ez-b tells the servo what position to move. It does not know the position before. It commands the position. It is impossible to read the position.

#21  

i was setting speeds first like at(10) .then run position to were i need it .so ineed to set all my servos to servospeed (d0,0) in script init. i see you the # simbol not sure what that does confused @dj

#22  

@DJ, thanks for the explanation. It's indeed makes sense now... I think that beacause everything goes smoothly with servos in ARC, I forgot that it does not know the position of the servos at start-up.

@csa459, the # symbol is inserted before a part of the code you don't want to be executed by the script. It is used to give non-executed informations. Example:


# This lign of code is not executed, but the next one is
This lign is executed

#23  

oh ok @fredec is all my servospeed need 0 to start with ?in the code

#24  

Yes, use the same script that the one proposed by @DJ as an init. script: set first all the servos speed to "0", and then move the servos to the desire position. After that, you are free to set new slower servos speed for all the other scripts you want to use.

#25  

i got it fix try that its working now,in my disconnect i was moving to a poistion on servo ,but all good now ..:D @fredebec thanks cory