paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Servo outputs are different from PPM input measure


From: Felix Ruess
Subject: Re: [Paparazzi-devel] Servo outputs are different from PPM input measurements
Date: Sat, 12 May 2012 00:23:58 +0200

Hi,

the chain from ppm input to servo output has intermediate steps and roughly looks like this:

ppm input --(radio.xml)--> ppm_pulses[] --(radio.xml)--> radio_control.values[] --(rc_commands)--> commands[] --(command_laws,servos)--> actuators_pwm_values[]  ppm out

Written in parenthesis is where you configure how to transform one value into the other.

So yours is a simple case without fancy mixing, e.g. looking at the roll command / aileron servo while in MANUAL mode:
  1. PPM sum signal is read and split into channels as specified in your radio xml file.
    It does some sanity checking on the pulse length and frame lenght according to the top attributes in that file.
    This is written to the ppm_pulses array, where you now have the length of the pulse in system ticks.
  2. Now these get converted to radio_control.values array according to the channels in your radio xml file.
    They get scaled to MAX_PPRZ (9600), meaning what you specified as max is 9600, neutral is 0, etc.
    radio_control.values[RADIO_ROLL] now has the value 9600 if the pulse width of that channels was "max" (in your case 2100µs)
  3. Mapping of RC commands to the actual commands as specified in rc_commands section.
    In your case simply copy radio_control.values[RADIO_ROLL] to commands[COMMAND_ROLL]
  4. Applying command_laws (mixing) to get the commands for each servo.
    Again just copying in your case...
  5. Scaling from commands with MAX_PPRZ scale to the actual pwm output signal according to the servos section.
    So for a command of MAX_PPRZ you would get a pulse of 1966µs for your AILERON servo.
I hope this makes it clear where your problem is:
The input of 1966µs is converted to a radio command (but you have 2100µs set as max in your radio file).
command = (input-neutral) * MAX_PPRZ / (max-neutral) = (1966-1553)*9600/(2100-1553) = 7248 pprz_t
But the max value of the servo (which you have also set to 1966µs) will only be used for a command of 9600...

Cheers, Felix

On Thu, May 10, 2012 at 2:58 PM, Tilman Baumann <address@hidden> wrote:
On 10/05/12 12:19, C. Y. Chen wrote:
hi,

im using Lisa/M 2.0, when i install Lisa/M to my aircraft, i found
that the travel of servos significantly smaller than that i just
directly connect servos to receiver.

I suppose you can just increase the min/max settings in your servo section. But that does not explain why they don't match up.

Talking of. Is there a nice way of calibrating the servo capabiities? I would like to somehow set the servo deflection from the ground station software for each servo manually to find the maximal practical timings for each servo.
I suppose there is no harm in defining the min/max levels to something short of the servos or the physical airframe limitations?
A regular RC pilot would never give that much throw on his controls. But a paparazzi should be able to utilize that just fine, right?


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]