Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Servo

Status
Not open for further replies.
They certainly have counter timers, I'm not sure about the CCP module, but as a frequency counter it goes to over 50MHz when only using a 4MHz clock.

In any case, by using a 4MHz clock the PIC would do the same - but you appear to be completely ignoring the point of this thread?. Either would exceed the resolution of the servo pulses, so there's not much point in fighting to get the maximum resolution possible?.
 
Servo pulses are analog. While there is a dead band when the servo is close to neutral this doesn't exist when the servo is under load with an error signal more than the dead band (about 3-5 degrees). Under load the higher the resolution you have the better your ability to control it. Keep in mind a servo seldom has it's full useable range available, usually there are control rods which make the maximum throw of the servo in normal situations small, perhaps 10-50% of the full throw, 1us seems fine until that 1000 step resolution turns into a useable step resolution of only 100-500 steps.

First you call me silly. Then you say resolution doesn't matter, followed by a PIC at four times the speed can do the same thing while stateing that a PIC's async timer can count to 50mhz (which can't help you with a servo signal) I appear to be the only one between the two of us still on the topic of this thread. This is a clear cut application where using an AVR gives an obvious and large advantage over a PIC, that's one of the reasons I use them =)
 
Sceadwian said:
This is a clear cut application where using an AVR gives an obvious and large advantage over a PIC, that's one of the reasons I use them =)

I'll ask again, what resolution does the servo output from a radio control receiver provide?, or the servo itself accept? - I think you'll find, that in THIS case, your 'large advantage' is probably entirely imaginary?. If there was the resolution available, I agree that if AVR instructions are all as short as PIC ones (I've never checked the datasheets), then running at four times the clock speed would give higher resolution for something which required it.
 
Nigel. Standard servo's are analog, the resolution is essentially infinite, the resolution of the servo pulse width when a standard servo is under load is directly proportional to the torque applied to the servo arm and the distance away from the desired neutral position the servo is at.

All AVR basic arithmatic instructions are single cycle, multiplication (on devices that have it) and word instructions are 2 cycle. Most memory access is 2 instruction except flash memory which is 3. I/O read write and bit toggle instructions are single cycle. Worst case scenario are the load program memory from index register and post inc/dec instruction which is 5 cycles.
 
Sceadwian said:
Nigel. Standard servo's are analog, the resolution is essentially infinite

Have you ever used a servo?, I know they are (or were) analogue, but their resolution isn't 'essentially infinite' it's actually really fairly low, which is all it needs to be.

the resolution of the servo pulse width when a standard servo is under load is directly proportional to the torque applied to the servo arm and the distance away from the desired neutral position the servo is at.

Perhaps that makes sense?, but I don't understand it? :p it might just be that it's written badly?.
 
All non-digital servos are analog (obvious). Their resolution is infinite under load outside of their deadband. The resolution is only low under NO LOAD, in an anlog servo oscilation occurs under low or no load.
 
Last edited:
Sceadwian said:
All non-digital servos are analog (obvious). Their resolution is infinite under load outside of their deadband. The resolution is only low under NO LOAD, in an anlog servo oscilation occurs under low or no load.

Perhaps we'll have to agree to disagree then? :)
 
Would you like me to measure it?
 
Curious myself =) I'll see what I can do this week.
 
While PIC instructions run at 4*Tosc, the PWM peripheral can provide pulse width resolution of 1*Tosc. How much resolution is actually needed for that 1-2 msec pulse?

Code:
 4 MHz clock, 250-nsec step,  4000 steps
 8 MHz clock, 125-nsec step,  8000 steps
20 MHz clock,  50-nsec step, 20000 steps
40 MHz clock,  25-nsec step, 40000 steps
 
At first, I assumed Nigel's question about servo resolution was rhetorical, but it appears not to have been taken that way by others. Here is some practical input from an everyday flyer.

Most radio transmitters give 512- or 1024-step resolution. Some of the very newest claim 2048-step (maybe more) resolution.

Servo resolution is a bit harder to find. JR claims its DS8231 servo has the highest resolution. That is claimed to be 5900 steps per 120 degrees rotation. Many, if not most servos are limited to 60 degrees. If one assumes the 5900 steps is really achieved and uses a 0.5" radius servo arm, then one step is approximately 0.0002" (0.005 mm) at the perimeter. Obviously, positioning accuracy in a model airplane with that servo will be limited by slop in the servo gears and other factors in the linkages, not by electronic resolution. Even with 512-step resolution, the change perimeter distance is only 0.002".

The model I am going to fly today has 512-step resolution with the transmitter (Vision 8SP), JR digital servos and Volz analog servos. One cannot see a single-step change in the control surfaces, but one can see errors in repeat positioning accuracy of the surfaces. Those errors are due to a variety of factors, including reproducibility of the servo positioning.

There may be much more accurately made control linkages out there, but it is hard to imagine that 0.0002" makes any difference, particularly if the wind in blowing.

Thus, as shown by Mike, a 4 or 8 MHz on a PIC should give more than adequate positioning for model aircraft and cars. John
 
Might I just mention, that you presumeably are talking about high quality RC and servos here?.

A great many RC servo modules, adding facilities to cars, boats, and aircraft have been built using BASIC STAMPS, which really offer pretty low resolution, with interpreted software routines for both reception and transmission.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top