Go Down

Topic: Servo Library (Read 720 times) previous topic - next topic

erik

As far as i know there is a standard that says:
1 ms = - 45 degrees
1.5 ms = 0
2 ms = + 45

but:

- the feedback of a servo is done with a potmeter, correct me if i'm wrong but they have a tolerence of 10%.
- the joystick in the transmitter is made with potmeters having the same tolereance, each channel also has a trim, again a tolerance, to my knowledge there is a adjustment inside a good (analog, don't know about digital) zeroing out the errors of the transmitter.

This leaves us in the best case with a 10% error and worst case more than 20% but planes and cars have a mechanical trimming.
To compensate all this the servos travel more +-45 degrees some even go beyond +-90 degrees.

Notice that when you buy multiple 'identical' servos that each of them will be different in behavior, one cannot just replace a servo without trimming the plane,  car.... as the zero degrees position wil have shifted, there is no adjusment inside a servo.
Because in RC moddeling only +-45 degrees is used, the travel error wont be noticed, if one goes beyond specs as on this board most of us do, nothing is guarenteed.

I would propose that we search for the limits of each and every servo we use, trim the software and never exchange one servo with another to avoid retrimming of the software.

I hope this helps.

Erik


bwevans

I think a software servo library (which I assume is what the Wiring example is) would be great. Yeah there have to be some coveats but thats ok. I come from using the PICAXE platform which has a "servo" command that allows the pin to be specified and the angle to be specified.

Because of the .75 to 2.25ms pulses every 20ms they simply used a servo position that ranged from 75 to 225. This worked nicely within a byte variable you just have to be sure not to give it a number beyond that range. Also not all servos could drive the full 180 (sometimes not 2 servos of the same make & model) so it would sometimes require testing the limits of each particular servo by starting with a smaller range.

Keep it simple!

Cheers.

Go Up