Vx Aviation MakerPlane M-PWR-2 Series User manual

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 1 of 16
M-PWR™-2
DUAL CHANNEL VARIABLE-SPEED TRIM MOTOR CONTROLLER WITH AUTO-TRIM
THE ULTIMATE TRIM CONTROLLER™ OPEN SOURCE DESIGN

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 2 of 16
Ray Allen
Servo
Ray Allen
Servo
orange
green
blue
white
white
NC
NO
C
Snap-Action
Flaps Switch or
Airspeed
Sensor
Master 12 Volt bus
(8 to 18 VDC)
5A pullable
circuit breaker, for
22 AWG
22 AWG 22 AWG
orange
green
blue
To Servo Position
Indicator
A1
A2
AM1
AM2
RXD
SPD
TXD
FIX
FLT
B1
B2
BM1
BM2
PWR GND
Pitch Servo
Roll Servo
M-PWR™-2
Pitch (Elevator)
Roll (Aileron)
white
white
To Servo Position
Indicator
PILOT
TRIM
SWITCHES
OPTIONAL
COPILOT
TRIM
SWITCHES
TM
13
6
12
5
15
2
9
14 7
10
3
11
4
1 8
Copilot
Trim Enable
Switch
A-
A+
B-
B+
Motor Speed
Controls
Figure 1. Typical Installation of, M-PWR-2X (Baseline Version)

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 3 of 16
Ray Allen
Servo
Ray Allen
Servo
orange
green
blue
white
white
NC
NO
C
Snap-Action
Flaps Switch or
Airspeed
Sensor
Master 12 Volt bus
(8 to 18 VDC)
5A pullable
circuit breaker, for
22 AWG
22 AWG 22 AWG
orange
green
blue
To Servo Position
Indicator
A1
A2
AM1
AM2
EFIS RXD
SPD
TXD
TXD
FIX
FLT
B1
B2
BM1
BM2
PWR GND
Pitch Servo
Roll Servo
A-
A+
B-
B+
M-PWR™-2
Pitch (Elevator)
Roll (Aileron)
white
white
To Servo Position
Indicator
PILOT
TRIM
SWITCHES
OPTIONAL
COPILOT
TRIM
SWITCHES
Copilot
Trim Enable
Switch
IDEC AL6Q-M13P-Y or
similar legend lamp/switch
Dimmer voltage
TM
13
6
12
5
15
2
9
14 7
10
3
11
4
1 8
RXD
Motor Speed
Controls
Nose Down
Nose Up
Right Wing Down
Left Wing Down
AM1AM2Mode
Nose Down
Nose Up Ground
Ground
+12V
+12V
BM1BM2
Ground+12V
Mode
Left Wing Down
Right Wing Down
+12VGround
Figure 2. Typical Installation of M-PWR-2A or M-PWR-2AT (Enhanced Versions)

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 4 of 16
DESCRIPTION (M-PWR-2X, M-PWR-2A, M-PWR-2AT)
The M-PWR-2 is a two-channel variable speed trim motor control device developed primarily for amateur-
built aircraft applications. The device features two all-electronic motor drive channels in one compact
package, capable of controlling Ray Allen (RAC) or Firgelli servo motors directly. Fast and slow motor
speeds are independently adjustable for each channel and are selectable using an external sensor or EFIS
serial airspeed information for speed scheduling.
Each motor channel is capable of driving up to 1.2 amps with power supply voltages from 8 to 18 volts.
Protection is provided against electrostatic discharge and voltage surges on all inputs.
As an open source hardware design, the M-PWR-2 device is a platform for development. A basic two-
channel variable speed trim motor control is provided in the Baseline (X-suffix) version and users may
develop their own firmware using the provided driver source code as a starting point. The M-PWR-2 uses
a Microchip PIC13KF22 CPU and is compatible with the readily available MPLAB IDE and PICKIT
development tools.
An enhanced feature set is available at extra cost by upgrading to the A or AT-suffix version
microcontroller. In the M-PWR-2A device, the on-board RS-232 interface extracts serial airspeed
information from Dynon SkyView or Garmin G3X air (ADAHRS) data streams. This information may be
used to replace or augment physical airspeed or flaps sensor switches. The airspeed threshold is easily set
in flight by using an external pushbutton switch and indicator lamp.
The M-PWR-2AT version adds Dynon SkyView auto-trim capability to the M-PWR-2A feature set.
Autopilot status information is extracted from the Dynon SkyView SYSTEM control streams and a
proprietary algorithm adjusts the pitch and roll trim motors to keep the aircraft in trim whenever the
autopilot is operational.
A unique feature of the A and AT-suffix versions is the ability to detect and correct a stuck input trim
switch or wiring fault. When a fault is detected, a lamp is illuminated, the faulted input is ignored and the
external pushbutton switch is used to temporarily assume control of the input until the fault is corrected.
Since the lamp and switch are required for EFIS mode indication and airspeed threshold programming,
there are no extra hardware costs in providing input fault detection and correction.

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 5 of 16
MOTOR COMPATABILITY LIST
The following are typical servo motors used to control trim systems in amateur-built aircraft. Any motor with up to
1.2 Amp stall current is usable with the M-PWR-2 device.
RAY-ALLEN COMPANY (RAC)
Model Stall Current
T2-7A 800 mA
T2-10A 800 mA
T3-12A 800 mA
T4-5 400 mA
FIRGELLI TECHNOLOGIES
Model Stall Current
L12 series 450 mA
L16 series 650 mA
BASELINE OPERATION (M-PWR-2X-VERSION)
TECHNICAL SUMMARY
Dual trim motor control capability in one compact package.
1.2 Amp drive capability for each channel with short-circuit and over-temperature protection.
Drives common Ray-Allen or Firgelli servo motors.
8 to 18 volt operation with surge protection.
Independently adjustable high and low motor speed settings for each channel.
High or low speed selection using an external flaps or airspeed sensor switch.

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 6 of 16
INSTALLATION (BASELINE)
1. Connect the M-PWR-2X device according to Figure 1.
2. With the aircraft motionless on the ground, turn on the aircraft electrical power.
3. If a flaps sensor switch is use, extend the flaps and using a screwdriver, adjust the A- and B- speed
controls to set the desired trim motor speeds for slow flight. Test by activating the pilot trim switches for
the two channels.
4. Retract the flaps or disconnect the airspeed sensor and adjust the A+ and B+ speed controls to set the
desired trim motor speeds for cruise flight. Test by activating the pilot trim switches for the two channels.
5. If installed, confirm that the copilot trim switches and copilot trim enable switch are operating.

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 7 of 16
ENHANCED OPERATION ( M-PWR-2A, M-PWR-2AT VERSIONS)
TECHNICAL SUMMARY
The A-suffix version upgrade adds the following features to the Baseline X-suffix version operation:
In-flight programmable EFIS airspeed threshold for motor speed scheduling.
Trim switch fault detection and correction.
The AT-suffix version adds the following features to the A-suffix version operation:
Dynon SkyView auto-trim operation.
INSTALLATION (ENHANCED)
GROUND CONFIGURATION
1. Connect the M-PWR-2A or M-PWR-2AT device according to Figure 2. It is very important to connect the
wiring correctly in order for auto-trim to work properly with the M-PWR-2AT version. It is possible to
connect the wiring so that manual trim controls work properly, but auto-trim works in reverse. This is
dangerous and must be avoided.
2. If desired, install the optional flaps switch or airspeed sensor switch and copilot trim switches. Since the
EFIS airspeed information will be used for motor speed selection, the flaps or airspeed switch will only be
used in the event of an EFIS failure or misconfiguration.
3. With the aircraft motionless on the ground in still air, turn on the aircraft electrical power.
4. If a flaps sensor switch is used, extend the flaps.
5. Configure the appropriate EFIS serial output to provide valid air (ADAHRS) data at 115,200 bits per
second. If the M-PWR-2AT version is being used, both a valid air (ADAHRS) data stream and a valid
SYSTEM data stream must be selected from a Dynon SkyView system for auto-trim to work.
6. Observe that FLT lamp is flashing slowly to indicate it is receiving valid data from the EFIS.
7. Set Reversionary Mode by depressing the FIX push-button switch for several seconds until the FLT lamp
illuminates, then release. Reversionary Mode initializes the device properly for further settings and sets
the proper polarity for the SPD input. Do not skip this step even if there is no external flaps switch or
airspeed sensor installed.
8. Using a screwdriver, adjust the A- and B- speed setting potentiometers. This sets the desired trim motor
speeds for slow flight. Test these settings with the pilot and copilot trim switches to run the motors.
9. Fully retract the flaps or disconnect the airspeed sensor, if installed. Otherwise, proceed to the next step.
10. Using a screwdriver, adjust the A+ and B+ speed setting potentiometers. This sets the desired trim motor
speeds for cruise flight. Test settings by activating the appropriate trim switches.

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 8 of 16
IN-FLIGHT CONFIGURATION
When the aircraft is taxiing, the FLT lamp should be slowly flashing, indicating that the M-PWR-2A device
is receiving proper data from the EFIS. The FLT lamp flashing will stop when above approximately 20
knots indicated airspeed.
To set the airspeed threshold for speed scheduling, perform the following procedure:
1. With the autopilot turned off, in cruise flight at the desired threshold speed with the EFIS properly
configured, depress the FIX push-button for several seconds until the FLT lamp illuminates, then
release the push-button. This will permanently store the airspeed threshold value. This setting
procedure may be repeated as necessary.
For speeds above the airspeed threshold, the trim motors will operate at the speeds set in Ground
Configuration using the A+ and B+ potentiometers. Below this threshold, the trim motors will operate
at the speeds set by the A- and B- potentiometers.
Should the EFIS fail or be shut down in flight, selection of the motor speed settings will default to the
external flaps position or airspeed switch, if installed. Otherwise, the motor speeds will use the A-
and B- settings, which are normally the fastest speed of operation.
2. M-PWR-2AT and Dynon SkyView only: With the aircraft near neutral trim and the autopilot turned
on, observe the behavior of the aircraft. If the trim controller was installed correctly, every several
seconds the aircraft will automatically adjust pitch and roll trim as required to maintain neutral trim
and the FLT lamp will flash as the trim motors run. If the controller was not installed correctly, the
aircraft trim will diverge from a neutral trim state and the autopilot must be turned off until the
wiring is corrected or trim controller tuning is performed.
If the aircraft cannot converge to a smooth neutral trim setting, adjust the A+ and B+ potentiometers
on the trim controller anti-clockwise. These are the cruise flight pitch and roll trim speed
adjustments, respectively. Conversely, if it takes a long time to converge to a neutral trim setting, try
turning the potentiometers clockwise. This may take several tries to get the best setting.
Note that if manual trim operation is performed with the autopilot engaged, auto-trim functions will
turn off for several seconds. This is a safety feature to allow manual override of trim when the
autopilot is engaged.
Auto-trim functions do not operate with the Garmin G3X system.

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 9 of 16
HOW AUTO-TRIM WORKS
The auto-trim function of the M-PWR-2AT uses a proprietary algorithm that senses the control forces in the pitch
and roll autopilot servo motors, as represented in the SYSTEM serial data stream. It integrates this force
information over many frames of data and determines a correction value to run the trim motors. When a trim
motor is running in auto-trim mode, the FLT lamp will illuminate.
Once the trim motors finish a correction, the algorithm waits for the action to take effect and the aircraft to
stabilize. The auto-trim function process is then repeated. If the aircraft is substantially out of trim, it may take
several minutes to converge on a neutral trim point. Once a near-neutral trim point is achieved, only small
corrections will occur.
At any point during the process, manual trim operation automatically disengages the auto-trim system for several
seconds, after which it automatically re-engages. To turn off auto-trim, disengage the autopilot. To permanently
turn of auto-trim, deselect the EFIS SYSTEM information serial data stream and keep the air (ADAHRS) data stream
active.
Auto-trim is only available for the axes as selected by the EFIS autopilot mode. Altitude or pitch hold, for example,
will only enable auto-trim on the pitch axis, while heading or track hold will only enable auto-trim on the roll axis.
With both altitude/pitch and heading/track modes engaged, auto-trim is enabled on both axes.

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 10 of 16
M-PWRTM-2
Dual Variable Speed Trim Motor Controller
The Ultimate Trim ControllerTM
Power Input: 9-18 VDC, 5A
Motor Drive: PWM variable speed up to 1.2A, each
channel. Short circuit protected.
Controls: 0-5 VDC, 0-18 VDC (SPD input).
Serial RS-232, EFIS input.
A-A+B-B+
FAST SLOW
1 2 3 87654
12 13 14 159 10 11
PWR
FLTBM2
AM2
B2A2
FIX
RXD
A1
B1
AM1
BM1
SPD
TXD
GND
Figure 3. Device Label
Figure 4. Device PCB Assembly

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 11 of 16
2.20
0.866 0.66
1.640.28 0.28 ref
0.875
0.313
0.30
0.30
0.30 Ø 0.188 typ
TOP
END
HAMMOND 1591MFLBK
Figure 5. Case Machining Guide

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 12 of 16
AUTO-TRIM EXPERT TUNING GUIDE
Adjustments to the auto-trim factory default tuning parameters are possible with the appropriate hardware
configuration. Changes from the factory defaults may lead to improper or dangerous flight operational
conditions. A complete understanding of the effect of changing parameters is critical to the correct tuning of the
auto-trim operation and it is recommended that only small changes be made at any one time. Thorough flight
testing must be performed after a tuning adjustment.
ATTACHING AN EXTERNAL SERIAL TUNING PORT
Install a wiring harness that uses a 9-pin female DSub connector as shown in Figure 6. This allows tuning from a PC
using a USB to Serial Adapter. For bench-top tuning, the trim controller may be powered with a 12 volt power
supply or a 9 volt ‘transistor’ battery. For in-aircraft tuning, simply connect the DSub connector to the trim
controller as shown. Power will be supplied by the aircraft.
All tuning of the trim controller must be performed on the ground, never in flight!
The trim controller automatically determines that a computer is connected to the serial port when it is powered up
and a welcome message is displayed on the computer along with the allowable commands. Once tuning is
complete, the computer must be disconnected and the power recycled for the trim controller to operate in normal
flight mode. Do not connect the computer or serial port adapter while the trim controller is already powered on,
as this may destroy previous device tuning configurations.
The PC must use a serial port emulation application, such as TeraTerm VT to connect to the trim controller.
Configure it for 115,200 bits per second operation, 8 bits, no parity, 1 or more stop bits and no flow control.
M-PWR-2
FIX
TXD
15
7
16
8 to 18 VDC
PWR GND
1 8
+ -
9-pin DSUB Female Connector
USB to Serial
Adapter
USB Cable
PC
15
2
3
5
Existing FIX
Pushbutton
Figure 6 Expert Tuning Setup

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 13 of 16
TUNING PARAMETERS
For reference, the Dynon SkyView EFIS transmits up to 8 complete frames per second when configured with both
the ADAHRS and SYSTEM data frame outputs. Autopilot pitch and roll force indications are transmitted in the data
frames and may vary between -80 and +80 force units in each frame. These force indications are integrated by the
controller to determine the pitch or roll trim correction required.
The formula for Runtime (pitch or trim servo motor run time at each adjustment, event repeating every Tframes)
is:
n=1
N
F(n)
10 * 2M
1*
Runtime = P * 32767
-32768
Where Pis the polarity of the channel;
Nis the number of integration frames;
F(n) is the autopilot servo motor force;
Mis the attenuation coefficient; and
nis the internal frame number counter.
Notes:
A negative Runtime indicates a trim motor direction reversal.
T is the trim adjustment repetition period, measured in frames. Tmust be > 2N.
The Summation function for F(n) uses saturating 16-bit integer arithmetic.

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 14 of 16
TUNING PORT
The tuning port allows configuration of the trim controller functions using the following commands:
S<nnnn> Speed scheduling airspeed threshold in deciKnots, 0000-9999.
X<n> External SPD input polarity inversion state. 0=normal, 1=inverted.
N <nnnn> Number of frames to integrate, 0001-9999.
P <pn> Pitch polarity and attenuation. Polarity is + or -, attenuation is 1-9. 9 is the highest attenuation.
R <pn> Roll polarity and attenuation. Polarity is + or -, attenuation is 1-9. 9 is the highest attenuation.
T <nnnn> Number of frames in one trim adjustment period (0001-9999). Must be > 2N.
V Display hexadecimal values of tuning parameters.
? Display command help.
EXAMPLE: FACTORY DEFAULTS
Typing the following commands restores the controller to factory defaults.
S0900<Enter> Set 90 knots for speed scheduling airspeed threshold.
X0<Enter> Set external SPD input polarity to normal.
N0032<Enter> Set 32 frames of integration between trim adjustment events.
P+4<Enter> Set pitch direction normal, divide integration value by 2^4 (equal to 16).
R+4<Enter> Set roll direction normal, divide integration value by 2^4 (equal to 16).
T0064<Enter> Set 64 frames (8 seconds) between trim adjustment events.
The pitch and roll polarity signs allow the reversal of trim motor direction if the aircraft wiring is incorrect by
changing the polarity from a ‘+’ to a ‘-‘. The pitch and roll attenuation coefficients divide the result of the trim
integration computations by 2^n. If the number of trim integration frames is increased, the attenuation values
should also be increased appropriately. For example, when doubling the number of integration frames, the
attenuation values should be increased by 1. Reducing the attenuation values will make the trim motors run
longer.
To assist in debugging, there is a ‘view parameters’ command to display tuning parameters:
V<enter> View tuning parameters in hexadecimal format:
==== TUNING DATA IN HEXADECIMAL ====
====================================
Speed Threshold 0384
SPD Polarity Status 00
Integration Frame Count 0020
Pitch Direction and Attenuation +04
Roll Direction and Attenuation +04
Trim Adjustment Frame Count 0040

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 15 of 16
The Speed Threshold is normally set during in flight configuration using the FIX pushbutton as described in this
manual. It may also be set using the ‘S’ command. The default is 900 deciknots (0x0384 hex).
The SPD Polarity Status is set as 0 for normal (non inverted) operation and 1 for inverted operation of the SPD
input. This is normally set during ground configuration using the FIX pushbutton as described in this manual. It
may also be set using the ‘X’ command. The default is 0 (false).
The Integration Frame Count is part of the numerator of the integration calculation and is set using the ‘N’
command. Increasing this number will make the trim adjustments less sensitive to turbulence but slower to
respond to airspeed changes. The default is 32 (0x0020 hex) which provides 4 seconds of integration time (32
frames/8 frames per second).
The Pitch Direction and Attenuation is set using the ‘P’ command to control the polarity of the pitch trim motor
AM1 and AM2 pins and to set the denominator for the trim control calculation. Increasing this number will make
the pitch trim motor run time shorter. Decreasing this number will make the pitch trim motor run time longer and
will make the aircraft respond more quickly to airspeed changes. The default is +4.
Similarly, the Roll Direction and Attenuation is set using the ‘R’ command to control the polarity of the roll trim
motor BM1 and BM2 pins and to set the denominator for the trim control calculation. The default is +4.
The Trim Adjustment Frame Count is set using the ‘T’ command. Trim motor adjustment times will normally only
be one or two seconds each, so the AT Trim Period setting provides several seconds of settling time after a trim
adjustment is made. Making this number larger will make the aircraft slower to respond to airspeed changes.
Making this number too short may cause erratic auto-trim operation. The default is 64 (0x0040 hex). This allows 8
seconds (64 frames/8 frames per second) before repeating the computation.

VXD-1305001D3 © 2013, 2014 Vx Aviation. All rights reserved. Page 16 of 16
OPTIONS
M-PWR-2X Basic open-source dual trim motor controller. Source code is available for download.
M-PWR-2A Enhanced dual trim motor controller with EFIS controlled motor speed and input fault detection
and correction. This version also Includes a pushbutton switch with integral LED lamp for FIX and
FLT functions.
M-PWR-2AT M-PWR-2A version, plus auto-trim capability.
DOCUMENT REVISION HI STORY
Issue Number
Date
Purpose
VXD-1304001D1
Febuary 8, 2014
Initial Product Release
VXD-1304001D2
June 24, 2014
Added M-PWR-2AT auto-trim version and updated
Figure 2 wiring diagram. Removed ability to cascade
controllers and added support for bench-top and in-
aircraft tuning.
VXD-1304001D3
July 12, 2014
Removed capability of sending long text strings from
terminal emulator program to tuning port. Tuning port
is not buffered and can only handle manually entered
commands. Added ability to adjust airspeed threshold
and SPD input polarity from tuning port. Various
wording changes made to enhance clarity.
Licensed under the TAPR Open Hardware License (www.tapr.org/OHL)
This manual suits for next models
3
Table of contents