CL Drive - STMicro Hardware
Demonstrator - Oct 24
BFF CL Driver
Migration to
STMicro Hardware
Demonstrator
Project |
Video Clip 1 -
CL
Power-up Calibration Movements
Video Clip 2
CL
Auto Pilot Following Movements
CL Drive Hardware Migration
Before I stopped making cards in 2021 the
Control Loader
system was the most popular project on the site.
Unfortunately since then the system has been effectively
unavailable for home cockpit builders.
It was originally designed for home cockpit
builders and I've been looking for some time now for a way
in which the system might be made available again. Migrating
to off the shelf drive hardware may be one way to do
this....
STMicro's STM32 Nucleo-64 microcontroller development boards
with their 3 phase motor driver expansion boards always
looked like a potential route and recently, with the help of
some well targeted embedded system engineering support, it
has been possible to make good progress on a CL Drive
demonstrator project using that hardware.
STMicro based
CL Drive System Schematic |
The STM32 Nucleo-64 evaluation hardware
topology leads to a system configuration of one
microcontroller board mounted with one 3 phase motor driver
board to drive one
Control Loader axis.
UART is used as the comms method between the
PC CL software and the STM microcontroller cards with a
separate UART channel for each CL axis. Each UART connection
is via a USB-UART isolated converter - this maintains full
electrical isolation between the CL drive and the PC USB
system.
The CL software running on the PC is a
modified version of the
original software
(supports MSFS & X-Plane 12), and the 3 phase servo motors
and flight yoke mechanics are the same as used in the
original CL system.
The STM32 NUCLEO-64 boards used in the
project are the
NUCLEO-F446RE microcontroller board with the
X-NUCLEO-IHM08M1 low voltage 3-Phase brushless motor
driver expansion board (see right). I've been able to use
the cards in their as-supplied configuration with only
simple jumper settings used to make any required
configuration adjustments.
The IHM08M1 can drive a single BLDC motor at
up to 48V DC and 15A(rms) drive current, this makes it a
good match for the range of servo motors used in the CL
system and the F446RE microcontroller is a newer generation
than those used in the original BLDRV3 cards and runs
considerably faster and has more memory.
The project has involved re-writing the
microcontroller firmware from scratch - although STM provide
several motor drive sample solutions the encoder feedback,
space vector modulation scheme used to commutate the motors
in the CL drive meant no existing STM firmware solution is
available for a CL drive.
The coding is now at a stage where the
software structure is established and all the CL loading
components are present and working (aerodynamic, fixed,
weight, vibration, friction, damping, detents, A/P following
etc), the PC comms via UART is fast and solid and
preliminary card condition monitoring is in place
(temperature, current, voltage). This has allowed me to
spend some time flying with the new CL drive using both XP12
and MSFS (I continue to use FSX for some testing because it
loads faster!).
Performance and Initial Thoughts
The CL drive runs very nicely and reliably,
in fact you quickly forget that it is a new drive system
when flying with the CL flight yoke. The motor commutation
is smooth at the stalled/nearly-stalled motor conditions
present in a CL drive so producing smooth force feel at the
flight controls. The STL220N6F7 Power MOSFETs used on the
IHM08M1 board warm only modestly when driving the currents
used by the motors (typically < 10amps) making it likely
that additional heat sinking will not be required.
Dual Axis CL
driver setup using STM Hardware |
The modified PC CL Software updates the
2-axis demonstrator drive with new loading data at about
60Hz and the cards update motor torque demand at 500Hz with
on-board calculations taking place for the control lag
sensitive load components to maintain output loading
stability as before.
The motor drive is by torque demand for
normal manual flying, and by position demand when Auto Pilot
is engaged and the drive simulates the control actions of
the A/P (see videos).
Similar power-up calibration methods are used
as before with automatic power-up calibration movements the
default. These require only quadrature encoder feedback and
so the original requirement for hall sensor feedback has
been dropped. The opportunity has also been taken to
simplify the drive motor connections and the new drive
adapts automatically to any encoder and motor phase
connection wirings when calibrating.
Overall the performance of the 2-axis
demonstrator drive is very encouraging, so I'll probably
continue its development - further housekeeping coding is
needed for error handling, full temperature and current
monitoring and other card protection features.
The CL software also needs to be further
developed to run with the new drive and some project
documentation will be needed if there are builders out there
who may wish to try it.... The comms data structures are
much simplified from the previous system (partly because
each card handles a single drive axis only) and I hope to be
able to write a useable API for the cards. This would allow
builders to use them with their own CL software.
Although the firmware development is taking
place using the full STM32 Integrated Development
Environment, flashing the microcontrollers with finished
firmware can be done using STM's simpler
STM32CubeProgrammer software directly through a USB
connection to the cards. The
NUCLEO-F446RE comes with a built-in programming link (ST_Link)
and so does not need further separate programming hardware.
Looking further ahead, custom drive cards
could be designed based on the STM evaluation board designs
provided by the vendor and as such the demonstrator
microcontroller firmware would port directly to those cards.
A Couple of Videos
One giving a quick overview of the
demonstrator system and showing the automatic power-up
calibration movements driven by the new hardware.
https://youtu.be/sx70I3Kg1Pc
This one shows the new drive in Auto-Pilot
following mode - the flight controls are moving with the A/P
flight control actions for a GA aircraft flying in a storm.
https://youtu.be/15OqcIkxt08
© This site is
copyrighted, If you'd like more information or have any
comments please contact me at