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
Canada
Asked — Edited

Question With Release() Command

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 ?

AI Support Bot
Related Content
Synthiam
#9  
@Dave... You will if your using hobby servos... Get your wallet out and buy better servos if you want the buzzing to stop... Since @Dave has built his own inMoov he figured out how to stop the buzzing of the Hitec HS-805bbs. Please Dave enlighten me on how tho stop the buzzing without spending $100 per servo for inMoov or using the release command? The HS-805bb are already $35US a pop and inMoov uses 12 of them... Since your the expert tell me how to stop the buzzing form my hitecs without using release?

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...:D (inMoovs will drop their arm at the bicep and at the clavicle if release is called)...

@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...
Canada
#10  
@ Richard R

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.


#11  
@Aerius... agreed, I hate the buzz too... Wish I had an absolute solution... Love your inMoov by the way... I forgot, did you print in PLA or ABS?
#12  
Edit: I removed my post because RR edited his and now it does not matter.
Canada
#13  
Tanks Richard, all white parts are ABS and Blue PLA.
#14  
@Aerius... I asked Bob Houston (and got some great advice) on printing with PLA... I am just starting to use PLA (I have always printed in ABS), so I want to ask you what glue do you use for pla parts?

Thanks
Richard
Canada
#15  
@Richard
Most of my Inmoov PLA parts are screw mont.
Hotglue in some case.

Sorry can't help much on this.
#17  
RR, Simply use high quality use cyanoacrylate (CA) glue (Super Glue). Don't use the cheap stuff. It will give you a burnt look.

Also, don't glue your fingers together and hide it at bed time if you and your better half has had a fight. *eek*
#18  
Wow, I was kind of affraid to ask this relase() control issue question. But I see it is an issue not that easy to solve. A good challenge for me actually. I personally hate the buzzing noise. Plus, my audio sound system is not quite loud enough to completely burry the servos noise. Pictures coming next.

@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 :D

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.
#19  
One way I have found to relieve some of the load on various joints is to use a spring to counter it. For example, the robot (not an InMoov) I am currently working on had a problem holding it's head up due to extra weight I had placed on it. Worse yet, the weight was an over-hanging load which magnified it's effect. There was some buzzing as well in certain positions.

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.
Canada
#20  
@Kazobond

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.
#21  
Aerius, I downloaded your no buzz project. Thanks for making it available for us. Nicely done. I'm having a little trouble figuring out how some it ties into a bigger project. I was watching your no buzz video and see it working. Is there any way you'd consider uploading the project you were useing in the vedio so I can see how it all works together? I'd also love to see how some of your other scripts look and flow. It looks like a very impressive project and has a lot of things to offer that would aid my B9 project. Thanks in advance.
#22  
@Arius,
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.
#23  
@Kazobond... The problem with the servos on inMoov buzzing is compounded by the fact most of the large 805bb have been modified to work through a gearbox or a jack screw (in the bicep and clavicle) for the purpose of a mechanical advantage... That means the there is also more friction in the joints as well. So when the servo gets close to a required position it sometimes stops just short of perfect position due to friction (and of course any load)... The servo buzzes because it can quite get to where it's going... Not enough juice to over come that last bit of needed movement... FYI pwm to the servo drops accordingly as it approaches it's target... Near the end there just isn't enough pwm to overcome that little bit of extra friction in inMoovs joints and gearboxes... I get buzzing with one or two shoulder servos even though inMoovs arms are at rest (no load) at his side... The friction in the piv (not so much the rot) gearbox prevents perfect positioning so the servo buzzes even with no load... Perfect positioning with no load will silence the servos...

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...
#24  
OK Aerius, I've been studying your No Buzz script and I'm starting to understand it. Very sweet coding. I love the logic behind it. Looks to me that the 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. That's simplified by me but am I close to understanding this?
Canada
#25  
I'm very happy about the way this discussion is going.

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.


User-inserted image

So as showed on picture $Phraser at the bottom contains servos final position values
#########################################################

Servo Buzz Control V4 right arm assembly

Code:

$countr=0


################## servo Target Value $Phrase defined in each frame of servo position #########################

# EX:$phraser="D6,103,D7,015,D8,110,D9,130" #(Always keep values to 3 digits. EX: 025 not 25)


############################ Restart servo D6, D7, D8, D9 ########################################

ControlCommand("Servo Buzz Control", ScriptStart, "Servo Restart D6-D7-D8-D9")

sleep(500)
################################ Extract numeric info from servo Target Value (in $Phrase) #####################

repeatuntil( $countr = ( length($phraser) ) )


if ($countr=3)
$D6=(GetCharAt( $phraser,$countr )) + (GetCharAt( $phraser,$countr+1 ) )+ GetCharAt( $phraser,$countr+2 )

$LastPosD6 = getservo(D6)

ControlCommand("Servo Buzz Control", ScriptStart, "Buzz Control D6 Right elbow")

endif


Partial script listing

1-Script restart all 4 servos
2-Extract servo target value for each one

###########################################################
Buzz Control D6 Right elbow

Code:

################# Calculate time needed for servo to move a distance before been release ######                


if ($D6=999)
Halt()
endif

if ($D6 > $LastPosD6)
$DistanceD6 = $D6 - $LastPosD6

elseif ($D6 < $LastPosD6)
$DistanceD6 = $LastPosD6 - $D6

endif

if ($DistanceD6 < 40 ) ### Compensate for too short traveling ###
$DistanceD6 = $DistanceD6 + 10
endif

if ($DistanceD6 > 0 )
Sleep ( 10 * $DistanceD6 /( 1/(GetServoSpeed( D6 )+3 ))) ### Time = Distance / speed
release(D6)

endif


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
#26  
@ Richard,
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.
#27  
@Aerius, This is brilliant. Thanks so much for taking the time to share this valuable example of coding. This helps in more ways then you can imagine.

@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. :) BTW, Thanks for editing out your angry and insulting words towards me in post #10. This forum and our community works better when we aren't attacking and insulting each other. ;)
#28  
I find that Digital servos BUZZ more than Analog. Could it be that you just need to switch to Analog?