Difference between revisions of "Subsystem/actuators"

From PaparazziUAV
Jump to: navigation, search
m
(pretty code and some stop/min/max motor info)
Line 13: Line 13:
 
Mikrokopter ESCs
 
Mikrokopter ESCs
 
{{Box Code|conf/airframes/myplane.xml|
 
{{Box Code|conf/airframes/myplane.xml|
<pre>
+
<source lang="xml">
 
   <firmware name="rotorcraft">
 
   <firmware name="rotorcraft">
 
     ...
 
     ...
 
   <subsystem name="actuators"    type="mkk">
 
   <subsystem name="actuators"    type="mkk">
     <configure name="MKK_I2C_SCL_TIME" value="50"/> <!-- this is optional, 150 is default, use 50 for 8 motors-->
+
     <configure name="MKK_I2C_SCL_TIME" value="50"/> <!-- only LPC21xx, optional, 150 is default, use 50 for 8 motors-->
 
   </subsystem>
 
   </subsystem>
 
   <define name="I2C_TRANSACTION_QUEUE_LEN" value="10"/> <!-- default is 8, increase to 10 or more for 8 motors-->
 
   <define name="I2C_TRANSACTION_QUEUE_LEN" value="10"/> <!-- default is 8, increase to 10 or more for 8 motors-->
 
  </firmware>
 
  </firmware>
</pre>
+
</source>
 
}}
 
}}
  
* ''MKK_I2C_SCL_TIME'' is specific to LPC21x based boards (e.g. booz) and not necessary for STM32 based boards (e.g. Lisa/M/L)
+
* ''MKK_I2C_SCL_TIME'' is specific to LPC21x based boards (e.g. booz) and has no effect for STM32 based boards (e.g. Lisa/M/L)
  
 
=== XML configuration ===
 
=== XML configuration ===
Line 31: Line 31:
 
* ''ADDR'': the I2C addresses of your motors
 
* ''ADDR'': the I2C addresses of your motors
 
{{Box Code|conf/airframes/myplane.xml|
 
{{Box Code|conf/airframes/myplane.xml|
<pre>
+
<source lang="xml">
 
   <section name="ACTUATORS_MKK" prefix="ACTUATORS_MKK_">
 
   <section name="ACTUATORS_MKK" prefix="ACTUATORS_MKK_">
 
     <define name="NB" value="4"/>
 
     <define name="NB" value="4"/>
 
     <define name="ADDR" value="{ 0x52, 0x54, 0x56, 0x58 }"/>
 
     <define name="ADDR" value="{ 0x52, 0x54, 0x56, 0x58 }"/>
 
   </section>
 
   </section>
</pre>
+
</source>
 
}}
 
}}
  
 
You also need the matching [[Rotorcraft_Configuration#Supervision|Supervision section]].
 
You also need the matching [[Rotorcraft_Configuration#Supervision|Supervision section]].
 +
MKK specific values for SUPERVISION defines:
 +
* ''STOP_MOTOR'' : 0, optional, as the default is already 0
 +
* ''MIN_MOTOR'' : 3
 +
* ''MAX_MOTOR'' : 200
  
 
== Asctec v1 ==
 
== Asctec v1 ==
 
These controllers already to the mixing themselves, so the [[Rotorcraft_Configuration#Supervision|Supervision]] section is not needed.
 
These controllers already to the mixing themselves, so the [[Rotorcraft_Configuration#Supervision|Supervision]] section is not needed.
 
{{Box Code|conf/airframes/myplane.xml|
 
{{Box Code|conf/airframes/myplane.xml|
<pre>
+
<source lang="xml">
 
   <firmware name="rotorcraft">
 
   <firmware name="rotorcraft">
 
     ...
 
     ...
 
     <subsystem name="actuators" type="asctec"/>
 
     <subsystem name="actuators" type="asctec"/>
 
   </firmware>
 
   </firmware>
</pre>
+
</source>
 
}}
 
}}
  
 
== Asctec v2 ==
 
== Asctec v2 ==
 
{{Box Code|conf/airframes/myplane.xml|
 
{{Box Code|conf/airframes/myplane.xml|
<pre>
+
<source lang="xml">
 
   <firmware name="rotorcraft">
 
   <firmware name="rotorcraft">
 
     ...
 
     ...
 
     <subsystem name="actuators" type="asctec_v2"/>
 
     <subsystem name="actuators" type="asctec_v2"/>
 
   </firmware>
 
   </firmware>
</pre>
+
</source>
 
}}
 
}}
 
=== XML configuration ===
 
=== XML configuration ===
Line 67: Line 71:
 
Only for stm32 based autopilot boards (eg. Lisa/M, Lisa/L)
 
Only for stm32 based autopilot boards (eg. Lisa/M, Lisa/L)
 
{{Box Code|conf/airframes/myplane.xml|
 
{{Box Code|conf/airframes/myplane.xml|
<pre>
+
<source lang="xml">
 
   <firmware name="rotorcraft">
 
   <firmware name="rotorcraft">
 
     ...
 
     ...
Line 74: Line 78:
 
     </subsystem>
 
     </subsystem>
 
   </firmware>
 
   </firmware>
</pre>
+
</source>
 
}}
 
}}
  
Line 80: Line 84:
 
=== XML configuration ===
 
=== XML configuration ===
 
{{Box Code|conf/airframes/myplane.xml|
 
{{Box Code|conf/airframes/myplane.xml|
<pre>
+
<source lang="xml">
 
   <servos min="0" neutral="0" max="0xff">
 
   <servos min="0" neutral="0" max="0xff">
 
     <servo name="FRONT" no="0" min="1000" neutral="1000" max="2000"/>
 
     <servo name="FRONT" no="0" min="1000" neutral="1000" max="2000"/>
Line 87: Line 91:
 
     <servo name="RIGHT" no="3" min="1000" neutral="1000" max="2000"/>
 
     <servo name="RIGHT" no="3" min="1000" neutral="1000" max="2000"/>
 
   </servos>
 
   </servos>
</pre>
+
</source>
 
}}
 
}}
You also need the matching [[Rotorcraft_Configuration#Supervision|Supervision section]] and define the ''SUPERVISION_STOP_MOTOR'' to the pwm value you need to send to your controllers for stopping the motors.
+
You also need the matching [[Rotorcraft_Configuration#Supervision|Supervision section]].
 
+
Example PWM specific values for SUPERVISION defines:
 +
* ''STOP_MOTOR'' : 800
 +
* ''MIN_MOTOR'' : 1000
 +
* ''MAX_MOTOR'' : 2000
  
 
[[Category:User_Documentation]] [[Category:Subsystems]]
 
[[Category:User_Documentation]] [[Category:Subsystems]]

Revision as of 11:28, 30 March 2012

This subsystem only needs be explicitly specified for rotorcrafts where there are several different actuators implementations and you have to add the correct one depending on the ESCs you use.

Currently possible actuators subsystems are

  • mkk
  • asctec
  • asctec_v2
  • pwm_supervision
  • skiron
  • heli

MKK

Mikrokopter ESCs

File: conf/airframes/myplane.xml
  <firmware name="rotorcraft">
     ...
   <subsystem name="actuators"     type="mkk">
     <configure name="MKK_I2C_SCL_TIME" value="50"/> <!-- only LPC21xx, optional, 150 is default, use 50 for 8 motors-->
   </subsystem>
   <define name="I2C_TRANSACTION_QUEUE_LEN" value="10"/> <!-- default is 8, increase to 10 or more for 8 motors-->
 </firmware>
  • MKK_I2C_SCL_TIME is specific to LPC21x based boards (e.g. booz) and has no effect for STM32 based boards (e.g. Lisa/M/L)

XML configuration

required defines in section ACTUATORS_MKK:

  • NB: number of motors
  • ADDR: the I2C addresses of your motors
File: conf/airframes/myplane.xml
  <section name="ACTUATORS_MKK" prefix="ACTUATORS_MKK_">
    <define name="NB" value="4"/>
    <define name="ADDR" value="{ 0x52, 0x54, 0x56, 0x58 }"/>
  </section>

You also need the matching Supervision section. MKK specific values for SUPERVISION defines:

  • STOP_MOTOR : 0, optional, as the default is already 0
  • MIN_MOTOR : 3
  • MAX_MOTOR : 200

Asctec v1

These controllers already to the mixing themselves, so the Supervision section is not needed.

File: conf/airframes/myplane.xml
  <firmware name="rotorcraft">
     ...
    <subsystem name="actuators" type="asctec"/>
  </firmware>

Asctec v2

File: conf/airframes/myplane.xml
  <firmware name="rotorcraft">
     ...
    <subsystem name="actuators" type="asctec_v2"/>
  </firmware>

XML configuration

You need the matching Supervision section.

PWM Supervision

Only for stm32 based autopilot boards (eg. Lisa/M, Lisa/L)

File: conf/airframes/myplane.xml
  <firmware name="rotorcraft">
     ...
    <subsystem name="actuators" type="pwm_supervison">
      <define name="SERVO_HZ" value="400"/>
    </subsystem>
  </firmware>

The define SERVO_HZ sets a higher update frequency for the pwm controllers which is needed for good response times.

XML configuration

File: conf/airframes/myplane.xml
  <servos min="0" neutral="0" max="0xff">
    <servo name="FRONT" no="0" min="1000" neutral="1000" max="2000"/>
    <servo name="BACK" no="1" min="1000" neutral="1000" max="2000"/>
    <servo name="LEFT" no="2" min="1000" neutral="1000" max="2000"/>
    <servo name="RIGHT" no="3" min="1000" neutral="1000" max="2000"/>
  </servos>

You also need the matching Supervision section. Example PWM specific values for SUPERVISION defines:

  • STOP_MOTOR : 800
  • MIN_MOTOR : 1000
  • MAX_MOTOR : 2000