Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Crunchy Theory on December 03, 2010, 10:09:29 PM

Title: Servo pulse signal range - beyond the limits
Post by: Crunchy Theory on December 03, 2010, 10:09:29 PM
I performed the UART upgrade to my $50 robot so the clock is operating 8x faster (at least I think). Now I'm little confused with all the servo control values in the Sharp IR upgrade since it was written without the increase in clock speed. I thought I correctly compensated for the bump in speed, but all my servo does now is spin in high speed in one direction... it broke a gear off and I'm assuming something else inside that I can't see.

So I'm guessing that I might have sent it a pulse that was way too fast or not nearly fast enough. But would either of those mess up a servo in this way? I might be misunderstanding how the servo works normally when it's maintaining a certain angle. Does the motor keep spinning inside and it's just the gears attached to the pot that hold it back? It's hard to tell now that the gears aren't connected to the motor anymore and I don't want to risk another new servo.

I'm using a HS-85BB micro servo, by the way, if that makes a difference. It looked like it uses the same pulse range as the standard HS-311 so I don't think it should work any differently.

Thanks!
Title: Re: Servo pulse signal range - beyond the limits
Post by: rbtying on December 03, 2010, 10:21:19 PM
The standard servo is a closed loop control system, using the pot as feedback to tell what position the arm is in.  When modified, the pot never moves, so the servo keeps trying to approach whatever position you have set with the PWM.  The farther the change in angle, the faster the servo will move, so speed control is also accomplished in this manner.
Title: Re: Servo pulse signal range - beyond the limits
Post by: Crunchy Theory on December 06, 2010, 02:43:35 PM
The standard servo is a closed loop control system, using the pot as feedback to tell what position the arm is in.  When modified, the pot never moves, so the servo keeps trying to approach whatever position you have set with the PWM.  The farther the change in angle, the faster the servo will move, so speed control is also accomplished in this manner.

So it sounds like if I had the servo originally positioned at 0 degrees and sent it a pulse with a frequency that was way higher than the required 2.4ms pulse for 180 degrees (by accident of course), the servo tried to set itself at an really large angle at such a speed that it broke its own gear? Sounds crazy, like I would have thought there would be some kind of a safety feature to only allow safe movements within its specified range.

Basically I plugged in my servo which was immediately sent a very high pulse, it made a fairly loud "whizzing" sound and moved rapidly, then I heard a snap. I opened it up and the tiniest gear directly on top of the motor has split, so the motor was now continuously spinning disconnected from the rest of the gears.

I'd just like to know if sending the servo a very high pulse beyond the maximum would damage it, to narrow down the possibilities for what broke it.
Title: Re: Servo pulse signal range - beyond the limits
Post by: rbtying on December 06, 2010, 02:54:14 PM
Your hypothesis sounds correct.  The safety feature is the potentiometer, and the mechanical stop that you had to remove... xD.  This kind of thing is actually more likely if you reverse direction really quickly, and there's some significant momentum on the wheel = motor working against gears = gears break  Easiest way to avoid this is to lighten the load, if that's not the issue, try metal-geared servos.
Title: Re: Servo pulse signal range - beyond the limits
Post by: Crunchy Theory on December 06, 2010, 09:04:25 PM
These were unmodified servos, so the potentiometer should have actually stopped them from moving when they got too far. Although your comment about the momentum from one end to the other still sounds possible...

Thanks for your input, btw :)
Title: Re: Servo pulse signal range - beyond the limits
Post by: waltr on December 07, 2010, 08:32:26 AM
These were unmodified servos, so the potentiometer should have actually stopped them from moving when they got too far. Although your comment about the momentum from one end to the other still sounds possible...

Thanks for your input, btw :)

If you sent the servo a pulse width that commands the servo to go beyond to mechanical stops then it will try to do so. And, the greater the distance it needs to travel, error signal, the faster the servo will turn the motor to get there, tries to reduce the error to zero.

I don't know of any built in safety that prevents the servo from trying to move past the mechanical stops. Remember that hobby servos are designed to be used with the manufacture's RC systems (control/transmitter and receiver) and not with a hobbyist's home built electronic circuit. So you must ensure that the pulse width sent to the servo is within the expected range.
Title: Re: Servo pulse signal range - beyond the limits
Post by: KurtEck on December 07, 2010, 09:28:46 AM
It is my understanding (and experience) that with normal analog servos, there is no safety at all.  So if you tell the servo to go beyond it's limits you are very likely to destroy the servo (either break gears, or magic smoke...) Whereas with many digital servos, the signals that are out of range are ignored.

Kurt
Title: Re: Servo pulse signal range - beyond the limits
Post by: VegaObscura on December 07, 2010, 11:05:40 AM
Its frightening to think that making a mistake in your programming can result in destroying hardware components.  Especially the actuators, which are usually the most expensive part of any robot.
Title: Re: Servo pulse signal range - beyond the limits
Post by: knossos on December 07, 2010, 11:16:12 AM
Its frightening to think that making a mistake in your programming can result in destroying hardware components.  Especially the actuators, which are usually the most expensive part of any robot.

Well there's a lot of ways your programming could result in destroying hardware.  For example a program that makes your robot drive full speed into a wall or off a cliff.
Title: Re: Servo pulse signal range - beyond the limits
Post by: waltr on December 07, 2010, 11:38:36 AM
Its frightening to think that making a mistake in your programming can result in destroying hardware components.  Especially the actuators, which are usually the most expensive part of any robot.

Well there's a lot of ways your programming could result in destroying hardware.  For example a program that makes your robot drive full speed into a wall or off a cliff.

Or have the throttle in your car stick.
Title: Re: Servo pulse signal range - beyond the limits
Post by: Crunchy Theory on December 07, 2010, 12:08:57 PM
I suppose I'll need to get my hands on an oscilloscope then...

This is some good information, actually. It'd be cool if Admin could add this to his servo tutorial, unless he mentioned this and I missed it - in which case I deserve the loss of my servos  ;D
Title: Re: Servo pulse signal range - beyond the limits
Post by: KurtEck on December 07, 2010, 12:39:01 PM
I forgot to mention, that it is my understanding that micro servos are much more delicate than standard servos and most probably have plastic gears that do not take any abuse.  I have only owned a couple of these and killed most of them.  I am currently not using any...

So far in the several years I have been doing robotics, I think I have only killed maybe 3 standard servos.  I have found the hitec 645mg (metal gears) to handle a reasonable amount of abuse and I have only killed 1 of these.  I had two other brand equivalent ones when I first built my CHR-3 hex robot and both of these have died.  One the gears completely seized up.  The other seized and the motor burned the bottom of the servo case off... 

So if I were you, I would probably try testing out your servo code with a standard servo and be ready to hit the power switch. 
I suppose I'll need to get my hands on an oscilloscope then...
But having hardware test equipment like an Oscilloscope or Logic Analyzer does come in handy for things like this.

Good Luck
Kurt
Title: Re: Servo pulse signal range - beyond the limits
Post by: Soeren on December 07, 2010, 12:45:03 PM
Hi,

Or have the throttle in your car stick.
Back in time, I had an old BSA 500 (chopper) with a less than perfect air filter (read: none) and the kill switch about 15 cm over the ground, slightly behind the seat.
More than once, the throttle locked up in the fully open position (due to "dust") and the first time it happened, I was going towards a T-cross, with much too high speed for turning (around 100km/h) and nothing but a plov'd up field if going straight.
Talk about acrobatics needed to reach the kill switch, standing on one foot rest, holding the handlebar same side with one hand and reaching down - hey, did I mention it had a Loooong front fork with a quite small front wheel and the brakes were fit for going 30km/h...
Well, I managed to kill it, but being young and stupid, I had to get into the same misery a lot of times before I added a proper (but ugly) air filter and a handlebar mounted kill switch.

Morale... You don't even need electronics to get into serious trouble  ;D
Title: Re: Servo pulse signal range - beyond the limits
Post by: Soeren on December 07, 2010, 12:52:52 PM
Hi,

I suppose I'll need to get my hands on an oscilloscope then...
You should always know what a circuit does, before attaching anything even remotely valuable to it. A 'scope is more or less indispensable for electronics in general (at least when you have used on already).

However, as a cheaper way to test servos... I have seen a servo controller circuit that had a generic 2 line LCD telling the pulse width (and perhaps the frequency? - it was a long time ago) and it shouldn't be hard to build a monitor like that with a controller and a display, that just measured the output from any servo circuit.