MAVLink2HoTT

MAVLink2HoTT is AtMega328p firmware for Graupner RC users.
It works with any autopilot, providing 57600 baud MAVLink stream on 3.3v or 5v TTL level UART.
It was tested with APM 2.x and Pixhawk (original and clones). Graupner MX-16 and MX-20 RCs were tested with GR-12, GR-16 and GR-24 receivers.
GR-12L was also tested, but it doesn’t support text mode for configuration and though it’s usability is limited.
Successful testing with MZ-24 was reported by Klaus. Deepflights reported it to work with MC-32 and GR-16.
Another testing with MC-32 and pictures of MC-32 screen were made by Johannes Lang.
Incompatibility with USB-equipped boards was discovered by Kay Spranger.
Thank you all for your help!

MAVLink2HoTT may be useful with flight controllers with small number of UARTs like some Linux-driven boards. With Pixhawk and even obsolete APM it provides HoTT telemetry support with stock firmware without any patches applied. Just connect it to MAVLink/telemetry port of FC (in parallel with telemetry transceiver or/and OSD module if there are any) and get HoTT telemetry working.

Current firmware v1.4.6 can be loaded into any non-USB AtMega328p 5v 16MHz board and provides emulation of Graupner sensors by receiving and translating MAVLink stream from FC.

Please be aware that AVR boards with on-board USB are known not to work correctly as hardware UART needed to receive MAVLink stream is wired for USB connection.
«Arduino pro mini» clone 5V 16 MHz board was used for development and testing of this firmware.

Current version emulates:

Information shown on RC screen contains

  • Graupner #33611 General Air Module
  • Graupner #33620 Electric Air Module
  • Graupner #33601 Vario Module
  • Graupner #33600 GPS Module
  • Graupner Air ESC family

  • Temperature
  • Absolute air pressure
  • Altitude
  • Climbrates by 1s, 3s and 10s
  • Current
  • Voltage
  • Battery capacity remaining
  • Battery percent used
  • Battery capacity used — Fuel in ml shows used mAh
  • Ground speed
  • Electric time (shows time when motors work or current is above 4A)
  • Flight direction (not heading, but movement direction)
  • GPS satellites number
  • GPS fix type (« - » = No fix; « 2 » = 2D fix; « 3 » = 3D fix; « D » = DGPS; « R » = RTK )
  • GPS coordinates
  • Yaw, Pitch and Roll in degrees
  • Home distance
  • Home direction
  • Armed / Disarmed status
  • Flight mode
  • Current WP number in AUTO mode
  • Heading and distance to current WP
  • MAVLink heatbeat status
  • Throttle (shown in RPM field)



HoTT telemetry summary screen info as shown by RC


EAM, VARIO or GPS modules emulation should be enabled for this screen to be shown
For full information on this screen all three should be enabled
Picture of summary screen in non-auto mode
Summary screen in AUTO mode:
Home section shows home distance and direction.
"Y" character right to "Dir:"
indicates YAW is displayed.
Home section shows home distance and direction.
Blank character right to "Dir:"
means Dir=YAW function is disabled.
Home section shows distance and direction to next WP
Letters “W” and “P”indicate waypoint info is shown instead of home.

MAVLink2HoTT setup screens as shown by RCs

Sensor emulation screen Battery parameters screen Alarm parameters screen Fence alert setup screen Alarm and info tuning screen
Each virtual sensor may be turned on/off.

Cell count
Minimum cell voltage
Maximum cell voltage
Battery capacity
Minimum voltage
Low battery capacity
Low fuel percent
Maximum current
Minimal temperature
Maximal temperature
Minimal altitude
Maximal altitude
Maximal distance
Maximum speed
Maximum climb speed
Maximum sink speed
Tell altitude
Tell land in 3s
Tell land in 10s
Min fuel % uses mAh or Volt
Inter-alrm time
Dir=YAW speed

EMULATION screen

allows selecting what Graupner sensor modules will be emulated.

As HoTT requests data 3 times per second and each sensor is requested twice, less sensors enabled will cause faster data update.

Be sure to power cycle RC and receiver on model after changing emulation setup

BATTERY screen

allows setting battery parameters.
All of these parameters are mandatory as they are used in internal calculations.

Cell number = number of cells in battery used

Cell min and max voltage and capacity are used to calculate battery health

"Minimum input voltage" alarm is raised if battery voltage is beyond minimum. Battery field in summary display is inverted and voice alert is sent to RC. This alarm is mandatory and may be disabled only in RC voice alert trigger menu.

ALARM PARAMETERS screen

provides parameters for user-configurable alarms

« Min voltage »

  • raises "Sensor one minimum voltage" voice alarm
  • battery field in summary display is inverted.
  • May be switched off.

Low capacity raises "Capacity" alarm when remaining capacity is less or equal to parameter value.
May be switched off.

Minimum fuel % controls "Minimum fuel" alarm activation.
Fuel percent alarm may work in two modes:

  • Capacity mode
  • Voltage mode.
Mode is set in alarm/info screen.

In capacity mode it will be triggered when remaining battery capacity is lower or equal to desired percent value.

In voltage mode it will be triggered when battery voltage will be equal or lower than desired percent of useable battery voltage range.
E.g. if full battery voltage is 25.2v and low voltage is 19.8v (this is calculated from cell number and low and high cell voltages), battery range will be 25.2 - 19.8 = 5.4 v. If alarm is set to e.g. 25%, range percent voltage will be 5.4 * 25% = 1.35v and triggering threshold will be 19.8 + 1.35 = 21.15v.
This mode is useful in circumstances where battery cannot output full energy. These are cold and hot conditions and old battery cases.

Max current, min and max temperature control corresponding alarms.

These alarms are optional and may be turned off.

FENCE ALERTS screen

is used to control fence alarm settings such as

  • Min altitude
  • Max altitude
  • Max distance
  • Max speed
  • Max climb rate
  • Max sink rate

These alarms are optional and may be turned off.

ALERTS / INFOS screen

contains some more tuning parameters.

If “Tell altitude” is on, you’ll get voice info when UAV passes 20,40,80,100,200,400,800 and 1000 meter boundaries up or down.

Tell land in 3 seconds activates "Negative difference 3 seconds" voice alarm if UAV with current sink speed will meet land in 3 seconds.

Tell land in 10 seconds activates "Minimum altitude" voice alarm if UAV with current sink speed will meet land in 10 seconds.

If “Min fuel % uses” is set to “volt” minimum fuel alert will be triggered (if enabled) when current main voltage passes boundary of desired percent between battery maximum and battery minimum.

Eg. if max cell voltage is 4.2v, min cell voltage is 3.2v and battery contains 6 cells (all set in battery screen) and low fuel alarm is 20%, then alarm will be triggered at 6*(3.2+20%*(4.2 – 3.2))=20.4v.

If “Min fuel % uses” is set to “mAh”, alert will be triggered at desired percent of battery capacity remaining. Eg. if capacity is 10000 mAh and low fuel alarm is 20%, alarm will go when there’s 2000 mAh or less.

"Inter-alrm time" parameter defines minimal interval in seconds between voice alarms are sent to RC.
Please note, that RC has it's own internal queue and voice alarm already got by RC may be played more than once.

"Dir=YAW speed" parameter defines ground speed threshold (in m/s) for switching summary screen "Dir" field to display YAW instead of travel direction. If enabled (this also requires GPS and VARIO sensors to be enabled), "Dir" field of summary screen displays YAW when ground speed is lower or equal to parameter value, when motors are disarmed and also when there's no GPS lock. "Y" character appears right to "Dir" value indicating YAW is displayed. "G" character at same place tells that GPS direction is displayed. This also means GPS data is available and consistent. No character shown means this function is disabled and GPS travel direction is displayed if available.

Editing configuration is done with RC cursor keys and SET key.
Left/Right keys select active page
Up/Down keys select active row.
SET key activates parameter editing.

In editing mode Up/Down keys increase/decrease value,
Left key sets value to OFF (if allowed),
Right key sets value to default,
SET key saves value and exits editing mode.

Connections

This firmware uses custom low-footprint interrupt-driven half-duplex software serial library and must use PIN 3 (D3) of AtMega328p chip.

Use direct connection from PIN 3 to T-pin of Graupner receiver.
No resistors needed.



Data provided by MAVLink2HoTT Graupner sensor modules emulation

Sensor data GAM EAM VARIO GPS ESC
Temperature * *

*
Air pressure *



Local altitude * * * *
Climb/sink rate * * * *
Climb/sink rate by 3 seconds * * * *
Climb/sink rate by 10 seconds *
* *
Battery current * *

*
Battery voltage * *

*
Remaining batt capacity * *

*
Remaining fuel percent *



Throttle range (shown in RPM field) * *

*
Ground speed * *


Electric time
*


Flight direction


*
Yaw


*
Nick


*
Roll


*
Satellites number


*
GPS fix type


*
Home distance


*
Home direction


*
Next WP distance in AUTO mode


*
Next WP direction in AUTO mode


*
GPS coordinates


*
GPS time


*
ARMED/DISARMED state

*

MAVLink heartbeat status

*

Minimal and maximal altitude

*

Flight mode

*

Next WP number in AUTO mode

*

Summary screen display
* * *

Alarms provided by MAVLink2HoTT sensor modules emulation
I = inverse display V = voice message S = summary screen inverse display

Alarm GAM EAM VARIO GPS ESC
Minimum input voltage IV IVS

IV
Sensor 1 minimum voltage IV IVS

IV
Maximum current IV IV V V I
Capacity IV IV V V I
Minimum fuel IV V V V
Maximum altitude IV I IV IV
Minimum altitude IV I IV IV
Maximum distance

V IV
Maximum speed V V
IV
Maximum climb/sink rates IV IV IV IV
Spoken altitude messages V V V V
Land in 3 seconds sinking IV IV IV IV
Land in 10 seconds sinking

I

If alarm is to be used at least one sensor emulation supporting desired alarm should be enabled. Eg. if max alt alarm is wanted to work GAM or VARIO or GPS sensors emulation enabled will provide both inverse display and voice alarm. EAM will provide inverse display only.

Troubleshooting


Please, follow these steps to check your setup:
  1. Check whether your AVR328p board doesn't have on-board USB and runs 16MHz clock as only 5V 16MHz non-USB boards are supported.
  2. Download latest firmware HERE
  3. Disconnect AVR board from any circuits
  4. Flash firmware with FTDI (or other USB-RS232/TTL) cable
  5. Disconnect FTDI cable from board and reconnect it watching board LEDS.
  6. After power on you should see power LED on and some flashes of other LED: one short flash = bootloader start, five short flashes, then one long flash, then LED off = firmware started.
  7. Disconnect power from board and connect it to Graupner receiver T-pin. Also connect power and ground from AVR board to GR-[whatever-you-have]
  8. Switch on tour RC and power on AVR board with GR. After LED flashes, mentioned in [6], you should see LED flashing continiously about 2 flashes per second. This means HoTT link is established and you may see text mode menu pages under «telemetry»/«telemetry & data view» of your RC.
  9. If previous is OK, connect serial port to MAVLink source. Power on you system.
  10. After led flashes described in [6], led wil make three short flashes on MAVLink stream detection. Led will continue flashing in irregular manner. At this time you should see telemetry data.
  11. Configure MAVLink2HoTT to your needs from RC using text mode pages.

All firmware versions are HERE.

© 2013-2020 Michel Kosloff