usb16: data range depends on servos?

Hi again,

I’ve put my usb16 to work under Debian. I’m testing it by now with Hitec servos #HS-81, using the code written by Brian Peasley (see post here) with very little modification.
I notice the following and questionable behavior: these servos only admit a data range of 1300-4700 and not 500-5500. On 500-1300 and 4700-5500, the servos block (horrible bat noise, by the way :slight_smile: )

This is not really a problem since they still have an angle range superior to 90°, but it can become one if someone uses a software with a different servo model (although I guess the first step before using a new code would be to recalibrate the length of impulsion according to the new servos…)

Well, my question is: is it a common problem that some servos won’t admit the same data range as others ?

Thanks,

__
Den

The short answer is yes, every different type of servo (and to a much smaller extent each individual servo) has its own mechanically limited range. Some smaller servos can even break themselves by pushing against these limits (the HS-81 is pretty rugged for a small servo though), and most servos will wear out more quickly if you leave them pressing against these limits for long periods of time.

Most radio/hobby servo controllers keep you from hitting these stops with very large safety margins, but that means you can’t use the entire motion range of your servo either. The Pololu servo controllers have no safety margin whatsoever, they let you push your servos up against their mechanical limits, so you can use the entire motion range of the servo. The downside is that you have to determine the safe motion range for your particular servos, and you have to keep from going outside that range. Personally it’s a trade off I’m happy to make! The common standard signal pulse range is between 1 milliseconds and 2 milliseconds, while the Pololu controller lets you generate signal pulses between 0.25ms and 2.75ms, two and a half times the signal range!

-Adam

Thanks Adam for your reply.

When you say that a servo can be damaged if it gets too long or too short impulsions in input, how long can it take before it happens (I mean seconds, minutes, …? )

__
Den

Some very VERY small servos (like in the Sub-Micro class), especially off-brands, will break if you run into the mechanical stops just once. Of course with servos that delicate you’ll probably break them just by looking at them funny.

Hitec is a good brand, and their Micro class servos are surprisingly rugged. You’re not going to immediately shear teeth off of the gears or anything, but if you regularly leave them pressing against their mechanical limits they just won’t last as long (months instead of years for example).

-Adam

Hello,

I want to address the “No safety margin whatsoever” comment in case a casual reader gets the wrong impression. Used with the simple commands (MiniSSC II mode or 7-bit commands), our controllers give the typical 1-2 ms pulse ranges. The large 0.25-2.75 ms range available through the special commands ensures that the available range of motion will be limited by your servo, not by our controller.

It’s as if we offered an adjustable power supply that can output 3-15V, and your circuit works on 4-6V. You shouldn’t just hook up your circuit and crank the voltage from extreme to extreme. “No safety margin” is not really a relevant term in this context, and you should set the power supply voltage to 5V to have a ± 1V safety margin.

Similarly, you might find that your particular servo (and each servo will be different) can take pulses from 0.6 ms to 2.3 ms (i.e. 0.59 ms or 2.31 ms makes it hit the mechanical limit). It’s then up to you decide how close to that limit you want to send commands. If you have a large weight on the servo and it’s swinging a long way, you might want to make sure you don’t send anything past 0.7 ms and 2.2 ms so that it doesn’t overshoot into the mechanical limit. If you have almost no load on the servo and you’re moving it slowly or in small increments, you might be able to go closer to the limit without being unsafe.

Other than when very carefully testing the servo range, you should really avoid hitting the mechanical limits. I think an analogous situation is slamming your car into a wall (e.g. you wouldn’t ask, “once I slam my car into a wall, how long can I safely keep pushing the accelerator before the car breaks?”). You can very slowly creep up to the wall until your bumper touches it to establish where the wall is, but after that, you really want to make sure you never hit it. (By the way, you can see again that there is no concept of a “safety margin” inherent in the accelerator interface to your car: it’s up to you to keep a safe distance from obstacles, and that margin is dependent on your particular situation.)

- Jan

Jan, I think you may have misinterpreted my last question here!

Being a newbie in servo handling, I simply wanted to know whether my first experimentations, which produced stressful noises, had had a chance or not to damage my guinea pig-servo.

Your analogy with the accelerator is certainly not in my favor, but in the case of a servo-input, the no-gas point is at the mid-range, and not at 0. One might say that this is a bit counter-intuitive for a gas pedal… :slight_smile:

My point here, is not to do it again just to see how long the HS-81 can take it :wink:

Yeah, I didn’t mean anything negative by the safety margin comment, but I guess it was pretty blunt. Actually I think of it as a very desirable feature!

-Adam

On a more technical note, the tests I made (loop incrementation by 1 of the position described on 2 bytes) tend to prove that the servos (Hitec HS-81) move every 100 increments, so ca. 4-5°/step for the precision.

I find it rather poor compared to the values I gathered in the forum. Could it be due to the power source, or to this narrow input range ?

__
Den

The servo controller does actually change the signal pulse length in half-microseconds for every increment of the absolute position command, the step size you’ll see in practice though is entirely dependent on the internal control system of the particular servo you’re using. For example, standard size Hitec servos have a step of more like 1.5 degrees.

-Adam

Yes, that’s what I find weird: according to my measurements, (which may be inaccurate, but still), my servos have a moving range of 135°for 28 steps.
It’s already not bad, and certainly enough for my project, but I was surprised when I compared these values to those on the forum.

You should definitely be able to do way better than 4 degree resolution. Do you have other servos to try? Is the one that does the 4-degree resolution the same one that hit the end stop?

- Jan

I tested three out of four HS-81 I bought, all with approximately the same results.
I also noticed strange behaviors, like:

  • when sending an absolute command (0x04) going for instance from 1300 to 4700, the step 1400-1500 is made in the other direction, meaning that 1300->1400, 1500->1600, … 4600->4700 generate a clockwise rotation, but not 1400->1500. This weird behavior was also noticed by someone else on the forum.
  • when I send a 0x04 or a 0x03 command just once, it isn’t taken into account. It must be placed in a loop in order to be taken by the servo (Brian Peasley also described this in a post).

__
Den

I don’t know if I’m remembering the same case, but we definitely followed up on a question about the rotation direction, and we verified that the servo controller works correctly. As I mentioned in the other thread, you could try simplifying the code to show the explicit bytes you’re sending. You could also try it with our serial transmitter utility; if you still have a problem with that, at least it should be relatively easy for us to reproduce here.

- Jan