Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
actuators_faulhaber module

Actuators Driver for the Faulhaber controller

Based on the velocity controller inside the MC5004 controller, a simple position controller is implemented.

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="actuators_faulhaber">
b'<define name="FAULHABER_P_GAIN" value="0.07" />\n '
b'<define name="FAULHABER_MAX_VELOCITY" value="14000" />\n '
b'<configure name="FAULHABER_DEV" value="UARTX" />\n '
</module>

Module configuration options

Configure Options

  • name: FAULHABER_DEV value: UARTX
    Description: UART port (default UART4)

Define Options

  • name: FAULHABER_P_GAIN value: 0.07
    Description: Proportional gain for the position controller
  • name: FAULHABER_MAX_VELOCITY value: 14000
    Description: Maximum velocity for the position controller

Module functions

Init Functions

These initialization functions are called once on startup.

Event Functions

These event functions are called in each cycle of the module event loop.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw actuators_faulhaber.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="actuators_faulhaber" dir="actuators" task="actuators">
<doc>
<description>
Actuators Driver for the Faulhaber controller
Based on the velocity controller inside the MC5004 controller, a simple position controller is implemented.
</description>
<configure name="FAULHABER_DEV" value="UARTX" description="UART port (default UART4)"/>
<define name="FAULHABER_P_GAIN" value="0.07" description="Proportional gain for the position controller"/>
<define name="FAULHABER_MAX_VELOCITY" value="14000" description="Maximum velocity for the position controller"/>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="Faulhaber">
<dl_setting var="faulhaber.mode" min="0" step="1" max="3" shortname="mode" values="INIT|VELOCITY|ERROR|REQ_ERROR|RESET_ERROR" module="modules/actuators/actuators_faulhaber" handler="SetMode"/>
<dl_setting var="faulhaber.p_gain" min="0" step="0.001" max="1"/>
<dl_setting var="faulhaber.max_velocity" min="0" step="100" max="100000"/>
<dl_setting var="faulhaber.setpoint_position" min="0" step="1000" max="3600000"/>
<dl_setting var="faulhaber.real_position" min="0" step="1000" max="3300000"/>
</dl_settings>
</dl_settings>
</settings>
<dep>
<depends>uart</depends>
<provides></provides>
</dep>
<header>
<file name="actuators_faulhaber.h"/>
</header>
<init fun="actuators_faulhaber_init()"/>
<!-- Controller runs at half the speed of the periodic -->
<periodic fun="actuators_faulhaber_periodic()" freq="50"/>
<event fun="actuators_faulhaber_event()" />
<makefile target="!sim">
<configure name="FAULHABER_DEV" default="UART4" case="upper|lower"/>
<define name="FAULHABER_DEV" value="$(FAULHABER_DEV_LOWER)"/>
<define name="USE_$(FAULHABER_DEV_UPPER)"/>
<define name="$(FAULHABER_DEV_UPPER)_BAUD" value="B115200"/>
<file name="actuators_faulhaber.c"/>
<test>
<define name="USE_UART0"/>
<define name="USE_UART4"/>
<define name="PERIODIC_FREQUENCY" value="500"/>
<define name="FAULHABER_DEV" value="uart4"/>
<define name="get_servo_min_FAULHABER" value=""/>
<define name="get_servo_max_FAULHABER" value=""/>
<define name="get_servo_idx_FAULHABER" value=""/>
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart0"/>
</test>
</makefile>
</module>