
csa459
USA
Asked
— Edited
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.
how do post my project ? ty cory
Click on browse
Find your project file (were ever you saved it) and click open
Click upload
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)
ty cory
i forgot hit upload sorry my bad ty cory
Wall-E.EZB
I hope it will help...
www.ez-robot.com/Community/Forum/posts.aspx?threadId=2263
Here is a screenshot :
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 :
Code:
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...
Code:
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.
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.
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
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.
@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:
Code:
is all my servospeed need 0 to start with ?in the code
After that, you are free to set new slower servos speed for all the other scripts you want to use.