
kazobond
Greeting all,
It has been a long while since I posted here.
I have been working on my Inmoov whenever I can find time, which is not a lot, but slowly, very slowly progressing.
I now have a fully functional and completed torso with left arm and head.
I am now starting the real fun; programming ! Yaaa !
The problem I am encountering at this time is the servo release() command. First, from what I read, on power-up, I must first set servo position, then servo speed. Then I can change servo position and/or speed at will. So far so good. Now, on some of my servos, I would like to release them to stop the "humming/buzzing" noise. I use the Release() command, but after using it in scripting, there is nothing I can do to get the servo to move at all. I know I am doing something fundamentally wrong, but can not figure it out.
Here is the sequence of action:
- Power-up EZB-V4
- Connect via wifi
- Set servo limits in init script (connect)
- Then, using the script console (or within the init script, or any scripting method), run the following commands:
- Servo(d10,130) # Set servo position
- ServoSpeed(d10,2) # Set servo speed
These are required on startup. At this point, servo works fine. I can change position and speed at will without problem.
- Release(d10) # Releases the servo. No noise
- ServoSpeed(d10,3) # servo speed stays at 2, does not change to 3 (GetServoSpeed(d10) )
- Servo(d10,75) # servo does not move (stays at previous 130 position). But can hear the "buzzing noise"
No matter what I do, I can no longer move the servo position. Tried setting new servo position and servo speed, but no luck.
I have captured the screen and attached it.
Any idea anyone ?
ServoSpeed(d10,0)
sleep(25)
ServoSpeed(d10,the speed you wish)
Servo(d10,75)
-----------------------------------------------------------------------------
the way I reset my servo:
ServoUp(D6,1 )
ServoSpeed( D6,0 )
sleep(100)
ServoSpeed( D6,$fastSpeed )
do first a Servo(d10, #position)
and only then ServoSpeed(d10, #speed)
@Aerius
Tried that several time, but no luck. ?!?
@PTP
Tried that several time, but no luck. ?!?
@WBS00001
I fully understand the reason why they are buzzing. Yes they are under some strain, but no overload. It is Inmoov design. But thanks for the feedback.
@all
I don't have any problem using the AutoPosition control, and setting the servos to '0' (release). I was just hoping to have more control over releasing them from a scripting approach.
Still don't understand the problem though.
time = distance / speed
sleep time = (servo initial position - servo final position) / (1/servo speed)
Code:
The # (10*) and (+3) in formula is adjustment brought to the Inmoov..
For non modified servo different adj would be needed
Multitred allow to run this sleep time calculation while the servo is running.
Then the release servo is apply.
Anyway, I've been struggling with this same issue of getting the servo to restart after release. I found that I need to avoid using the 0 while setting a servospeed. That seems to reset the release. I also have a little script I run when I want to restart a servo after release. Can't post it now because I'm at work. However you can download my project called B9 Control and look in the "Claws non loop" script located in the script manager. The first 3 or 4 lines reset that servo nicely. I'll also post it later tonight.
I'm sure there's a more elagent solution and I'm still looking for it. I'm not about to settle and "just get used to it ". If you or anyone else finds it please let us know.
EDIT: Aerius bet me to it. The script I mentioned above is really close to his. In fact it look better. I'll be looking closer at it later. Thanks! !
Caveat...before you respond read the following If you use release as long as servo speeds are left at full speed you have no problems... Set the servo speed to a slower value and as the OP has discovered using release sometimes stops the servo from responding at all after that... That is until you reset (sometimes needed more than once) servo speed via the menu... Then you need to start over again setting your servo speeds to the value you want...
BTW... If I had of called release when my inMoov was serving wine to Sue, he would have dumped it all over her... I am pretty sure she would prefer the buzz...
@Aerius That's great but the bicep and clavicle need constant power to hold position or your arm will drop... Buzz... The rotgear and pivgear gearboxes do not need power to hold position...
You're right, some move will still need power applied on servo to hold position.
Not every time & not everywhere.
At least we can eliminate the buzz noise whenever it's possible.
Thanks
Richard
Most of my Inmoov PLA parts are screw mont.
Hotglue in some case.
Sorry can't help much on this.
Also, don't glue your fingers together and hide it at bed time if you and your better half has had a fight. *eek*
@Dave
Don't quite understand your solution. I would like to.
@Aerius
Really don't understand your solution, but really want to. And it really seem to works perfectly.
and btw, such an awesome Inmoov. You guys (including @Richard) are putting the bar way to high for me
You guys are all correct;
- servo noise is annoying.
- Release() is not perfect solution.
Must keep servo active to hold position sometimes depending on mechanical design/load. I actually think it's quite funny to see the head dropping down after a Release(), like he is pouting or falling asleep (hihihi).
I think in my next prints, I'll make sure there is a lot of friction in the gear to keep the load in place (hihihi, just kidding). It's good to have a sense of humor while developing this Inmoov.
But with servos driving warm gear, the gear will hold the load no problem. Beside the magical trick that @Arius and @Dave are doing, I was thinking of moving the servo 1 or more degree opposite to the moving position, just enough to remove loading factor. Did not try that yet.
My current solution (or more patch) is to use the AutoPosition control and set the servos to 0 position in the Frame configuration. That's ok, but I would like to have more control using scripting.
Adding a spring to pull it up cured all the problems. Although this also meant that the servo controlling the up-down (pitch) head movement had to actually drive the head down. Before, gravity took care of that. Overall though, the spring, while not perfect, did the job. No buzzing. No droop, even when turned off. Like you, the head used to drop when power was cut. With the right spring tension it now tends to hold in place no matter where it is stopped.
I'm also experimenting with a spring on the shoulder rotation joint. It has, however, proven to be more problematic to get just right. Nonetheless it does help quite a bit.
Tanks for the compliment, your Inmoov is coming pretty well to.
I believe a compression spring on the neck piston will be a very good solution. It have been experiment before with success by rentenprita
http://www.ez-robot.com/Community/Forum/Thread?threadId=8555
Now back to servo release script. As discussed previously this solution would be useful where the mechanical unit can hold position when the servo is release.
I'll be glad if you wish to help you to adapt the script setup to your Inmoov.
I just realize you have upload your Inmoov script.
Let me have a look at it and if I could prepare something with explanations.
Thanks,
I love your compression spring solution. Very simple. I'll try it for sure.
I'm gonna have to spend more time trying to figure out your no buzz solution. It really seem to do the trick on your video.
The servos in my inMoovs neck also (for "yes" and "no" head movement) buzz a lot and not due to excess load either, but due to that extra friction preventing them from accurately positioning... Yes, I have sanded and greased them meticulously... So I am going to try adding springs as mentioned here to the neck servo to help the servo overcome the little friction still in the plastic joints... I am also going to try and use @Aerius's method to try and silence the side to side head movement servo as you guessed it, mine buzz even without load...
Tanks Richard, you have described very clearly the causes of the buzzing servos.
@Dave You got it right, this is exactly what is happening with the script.
@Kazobond
I have been working on your (Dude script).
First, I want to assure you I have not modified any of your code, I have just moved some controls to the virtual desktop and add a new script manager named
Servo Buss Control.
You will find the script Kazabond modif_Dude_script in EZ-Cloud App under my alias.
##################################################################################
Some info about how to control the servo buzz problem.
All we want to do is to automatize what we do manually when we have a buzzing servo, we release it
Let me borrow @Dave description:
Autopos control is starting a script that is estimating the time it will take a servo to reach a set spot and then sending a release command for that servo.
So as showed on picture $Phraser at the bottom contains servos final position values
#########################################################
Servo Buzz Control V4 right arm assembly
Code:
Partial script listing
1-Script restart all 4 servos
2-Extract servo target value for each one
###########################################################
Buzz Control D6 Right elbow
Code:
Same script for D7,D8 and D9
The magic is in this sample formula
time = distance / speed
sleep time = (servo initial position - servo final position) / (1/servo speed)
sleep time = (GetServo(x) - servo autopos frame position setup) / (1/Getservospeed(y))
Note: you may adjust the formula by add / subtract to the speed.
So multithreading gives us the ability to start a servo and at the same time trigger a sleep time clock before it release it.
No matter the speed or the travel distance, the formula takes care of it.
Here is the complete script
InmoovServoBuzzControl.EZB
Like Aerius says, you have described very clearly the causes of the buzzing servos. Thanks (again
@ Aerius,
No I did not miss it (from the other thread). Just did not have the time to play with it yet. To much stuff on the go at the same time (like all of us, LOL)
omg, that's a real neat detailed description. I'll be spending time later today or next week studying it.
Thanks so much.
@Richardr, Also, thanks to you for your detailed explanation of how you think a servo works and why you think it makes noise (buzzes). From your last comment directed at me stating that you think I'm a coding and servo expert it sounded like you were seeking my opinion. The truth is that I'm not an expert and I do benefit from detailed explanations like you and Aerius just gave. You come across much better and are much more helpful to people like me when you offer you advice in this way. I have a hard time understanding your intent when you reply with short and snippy posts like in post #7.