Skip to the content
2 layers70.6 × 50.3 mmTFUNIPAYLOAD01, the printed circuit board in 3D

Universal interface for TF-ATMON sensor payload.

Size
70.6 × 50.3 mm
Copper layers
2
Thickness
1.66 mm
Parts
81
Nets
70
Pads
266
Tracks, vias
638, 96
Pours
9
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
20 Oct 2020
Updated
30 Mar 2026

Overview

TFUNIPAYLOAD01 is an open-source printed circuit board by ThunderFly-aerospace, from the ThunderFly-aerospace/TFUNIPAYLOAD01 repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 70.6 × 50.3 mm with 81 parts on 70 nets, routed with 638 tracks and 96 vias.

It is built around the ATMEGA1284P-AU, KPTR-3216SURCK and BC817-25, with the SKRTLAE010, BAS516 and BZX585-B5V6,115-JSM among its other parts. Its parts include 29 resistors, 15 capacitors, 7 diodes, 6 connectors and 3 ICs. It belongs with the sensors and measurement and interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

10

README

README.md

TFUNIPAYLOAD01 - universal interface for sensor payload

Reference design of PX4 interface for generic TF-ATMON compatible payload. The purpose of this design is to connect a sensor to the TF-ATMON system, despite that the sensor does not have any driver in the flight stack (autopilot firmware), but at the same time, it is required for atmospheric measurement.

TFUNIPAYLOAD top view

TFUNIPAYLOAD01 bottom view

The sensor is connected to the TFUNIPAYLOAD board using a UART, I2C, GPIO, ADC, or SPI interface. ATmega in TFUNIPAYLOAD01 runs the Arduino firmware, which prepares MAVLink messages to be logged and transported to GCS running TF-ATMON infrastructure described in the block schematics.

TFUNIPAYLOAD block-schematics

Example of use

FMU firmware (PX4 or Ardupilot, for example) is capable of logging MAVLink data from the UART (Telemetry Port). Therefore, the “UART Peripheral” connector on TFUNIPAYLOAD01 is intended for connecting a UART-based FMU using the Pixhawk DS-009 telemetry pinout. Typical devices include flight controllers (autopilot) or companion computers.

Pixhawk standard connector pinout is as follows:

PinSignalVoltage levelsRead/WriteWrite
1 (red)Vcc+5VOptionalOptional
2 (blk)TX (OUT)+3.3 VPX4 -> Payload--
3 (blk)RX (IN)+3.3 VPayload -> PX4Payload -> PX4
4 (blk)CTS (IN)+3.3 V----
5 (blk)RTS (OUT)+3.3 V----
6 (blk)GNDGNDGNDGND

For data to be received by the PX4 autopilot, it must have a specific form. Explicitly, it needs to use a serial link with MAVLink v2 packets. In that case, the Tunnel (#385) packets will be stored in the autopilot's log file and forwarded to the GCS. The TFUSBSERIAL01 hardware could be used to easily check for correct wiring.

The following library c_library_v2, which is automatically generated from message definition files, could be used.

Firmware examples

There are multiple Arduino-based firmware examples for different use cases.

TFUNIPAYLOAD

TFUNIPAYLOAD.ino contains a basic example, which listens to MAVLink messages from the autopilot and sends tunnel packets with random data to the autopilot.

TFUNIPAYLOAD_MINIMAL

Since message parsing requires a lot of memory, we have prepared an example where only HEARTBEAT and TUNNEL messages are sent. This example does not require a connected TX (from autopilot), and it is, therefore, suitable for MCUs with less memory.

Source code: TFUNIPAYLOAD_MINIMAL.ino

Tunnel packet sending function

Tunnel packet sending function mav.SendTunnelData(data, sizeof(data), 0, 1, 0); is the main function that enables sending tunnel data to the autopilot. It takes the following as its arguments:

  • data in uint8_t [127] format
  • data length
  • data type (every type of logged data will have its ID - it serves for easy differentiation of different sensors
  • target sysid
  • target compid

If the data only needs to be logged, the target sysid and compid must match the autopilot’s address, which is usually sysid: 1, compid: 1. If the data has to be logged and sent to GCS, broadcast must be set: sysid: 1, compid: 0 or better sysid: 0, compid: 0.

The autopilot only has a limited amount of storage memory (SD card), and it is therefore necessary to ensure, on the payload’s side, that it does not fill up during the flight. Alternatively, a maximum bandwidth on the MAVLink interface can be set in the autopilot. It is not tested what happens when the level set is exceeded[2021/09].

Autopilot configuration

In the autopilot’s PX4 firmware, it is necessary to correctly set the following parameters (MAV_1_FORWARD and others will be visible only after setting the parameter MAV_1_CONFIG and rebooting the PX4):

ParametrValueDescription
MAV_1_CONFIGTELEM 2The port on which MAVLink packets will be expected. Any free TELEM port can be set
MAV_1_FORWARD1Enable message forwarding from this port
MAV_1_RADIO_CTL0
MAV_1_RATE0 B/s
SER_TEL2_BAUD57600It is necessary to configure the port that is set in MAV_1_CONFIG parameter. The setting of the baud rate port.

How to set the parameters in PX4 is described in manual.

How to check that the autopilot correctly receives MAVLink messages?

There are several options to find out whether the message sending is working correctly.

Using the QGC

The message can be easily viewed live in QGC. For this procedure to function, two conditions must be fulfilled.

  1. The message must be broadcast, meaning the message must have set its target sysid and compid to 0, 0.
  2. The computer must be connected via a MAVLink instance that supports message forwarding (e.g., via TELEM1 port using modem or UART-USB converter); autopilot's USB does not support it.

Warning: this procedure will not work if the autopilot is connected via a USB cable to the Pixhawk's USB port.

After opening QGC, connect the autopilot to the computer (via RF modem or an external USB converter connected to the serial port). Once the autopilot is connected, live data (such as autopilot attitude) will become visible. A subsequent click on the QGC logo in the top left corner will open a menu where you select Analyze tools and then open MAVLink inspector in order to see a list of all messages.

listener mavlin tunnel

The list of messages, when functioning correctly, should contain TUNNEL messages.

Using the MAVLink PX4 console

An advantage of connecting via PX4 console lies in its independence from broadcasting settings and the possibility of checking whether the message is received and parsed by the autopilot. If the message is visible here (and the logging is enabled), it is at the same time already logged. With this procedure, a USB cable connection to the autopilot can be used.

Autopilot console can be entered using the following Python script or using QGC.

  • In the case of using a Python script, it is enough to run the python3 script with a parameter of the chosen serial link to which the autopilot/modem is connected.
  • In the case of using QGC, the QGC must be opened in the autopilot console by clicking on the QGC logo (on the top), choosing Analyze tools, and choosing a console.

The received message can then be retrieved using the following command:

listener mavlink_tunnel

The command displays the current tunnel message. Adding the -n 100` parameter will cause a listing of 100 messages (and the new message will display by itself).

If the communication is working properly, the output should look like this:

mavlink tunnel uorb message

From a uLog file

The tunnel message can be logged into autopilot in a standard uLog format. However, because tools like Flight review are unable to display such data format, it is necessary to overcome this problem using a suitable tool. One option is using the PlotJuggler. Another possibility for opening the log is the Jupiter notebook.

Known limitations

  • Avoiding overloading the autopilot's memory with messages must be ensured on the payload side
  • A maximum of 2 devices + modem or 3 devices without a modem can be connected in this way. The limitation is caused by the MAVLink driver, which is only able to connect a maximum of 3 instances of MAVLink devices, and also due to the limited number of UART interfaces of the autopilot.
  • It is not possible for the input of payload messages and output to sik modem to have the same type of MAVLink messages (stream) that would differ only in the number of messages per second. This means that it is not possible to simply select a data stream to be transmitted to the ground from the data stream intended for logging. If it is necessary to log more detailed data (with higher frequency) another MAVLink message must be logged.

Parts

81
QtyValueFootprintReferences
14100RResistor_SMD:R_0805_2012MetricR1, R4, R6, R15, R17, R18, R19, R20, R21, R25, R27, R28, R29, R30
810kResistor_SMD:R_0805_2012MetricR2, R3, R5, R7, R9, R12, R13, R26
4100nFCapacitor_SMD:C_0805_2012MetricC9, C10, C11, C12
4HOLEMlab_Mechanical:MountingHole_3mmM1, M2, M3, M4
310uCapacitor_SMD:C_0805_2012MetricC7, C8, C15
3180RResistor_SMD:R_0805_2012MetricR8, R14, R24
3FiducialFiducial:Fiducial_1mm_Mask2mmFID1, FID2, FID3
3REDMlab_D:LED_1206_millD4, D5, D7
215pCapacitor_SMD:C_0805_2012MetricC3, C4
21uH - DFE252012P-1R0M=P2Inductor_SMD:L_1008_2520MetricL2, L3
222uCapacitor_SMD:C_0805_2012MetricC5, C13
247uCapacitor_SMD:C_0805_2012MetricC6, C14
291kResistor_SMD:R_0805_2012MetricR11, R23
2BC817-25Package_TO_SOT_SMD:SOT-23Q1, Q2
2SKRTLAE010Mlab_SW:KMT031 NGJ LHS C&KSW1, SW2
2TPS631000DRLRPackage_TO_SOT_SMD:SOT-583-8U1, U3
110uFCapacitor_SMD:C_0805_2012MetricC1
14u7Capacitor_SMD:C_0805_2012MetricC2
1511kResistor_SMD:R_0805_2012MetricR10
18 MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
1806kResistor_SMD:R_0805_2012MetricR22
1ATMEGA1284P-AUPackage_QFP:TQFP-44_10x10mm_P0.8mmU2
1BAS516Diode_SMD:D_SOD-523D1
1BLUEMlab_D:LED_1206_millD3
1BZX585-B5V6.115Diode_SMD:D_SOD-523D2
1GREENMlab_D:LED_1206_millD6
1HEADER_2x03Mlab_Pin_Headers:SMD_2x03_WO_pasteJ3
1HEADER_2x15Mlab_Pin_Headers:Straight_2x15J5
1LOGOLOGOG***
1LOGOTF_LOGA:TFG1
1LOGOMLAB_LOGA:Made_in_EUG***
1NL03KT330Inductor_SMD:L_0603_1608Metric_Pad1.05x0.95mm_HandSolderL1
1PC3TestPoint:TestPoint_Pad_D1.0mmTP1
1PC4TestPoint:TestPoint_Pad_D1.0mmTP2
1SM04B-GHS-TBConnector_JST:JST_GH_SM04B-GHS-TB_1x04-1MP_P1.25mm_HorizontalJ4
1SM06B-GHS-TBConnector_JST:JST_GH_SM06B-GHS-TB_1x06-1MP_P1.25mm_HorizontalJ1
1SM07B-GHS-TBConnector_JST:JST_GH_SM07B-GHS-TB_1x07-1MP_P1.25mm_HorizontalJ6
1SM08B-GHS-TBConnector_JST:JST_GH_SM08B-GHS-TB_1x08-1MP_P1.25mm_HorizontalJ2
1SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP1

Similar boards

  • 4 layers90.9 × 50.3 mmUSTSIPIN02, the printed circuit board in 3D

    USTSIPIN02

    ust-modules/USTSIPIN02

    Silicon diode dosimeter and spectrometer.

    174 partsGPL-3.0
  • 4 layers51 × 44.3 mmOrion1, the printed circuit board in 3D

    Orion1

    kanha2907/Gps-using-neom9n-

    Compact GPS breakout board based on the u-blox NEO-M9N module. Includes support circuitry for battery-backed operation, LEDs, and passives—designed for low-power embedded GPS applications.

    70 parts
  • 2 layers37.5 × 19 mmTFRPM01, the printed circuit board in 3D

    TFRPM01

    ThunderFly-aerospace/TFRPM01

    Revolutions per minute (RPM) meter for UAV, rotors, wheels and engines.

    28 parts9GPL-3.0
  • 2 layers45 × 45 mmTFESC02, the printed circuit board in 3D

    TFESC02

    ThunderFly-aerospace/TFESC02

    ESC for BLDC motors for UAVs with I2C interface

    75 parts3GPL-3.0
  • 4 layers80 × 80 mmUSTTHUNDERMILLPCB01, the printed circuit board in 3D

    USTTHUNDERMILLPCB01

    ust-modules/USTTHUNDERMILLPCB01

    THUNDERMILL01 stator PCB

    89 partsGPL-3.0
  • 2 layers50 × 50 mmTFGPSLITE02, the printed circuit board in 3D

    TFGPSLITE02

    ThunderFly-aerospace/TFGPSLITE02

    Compact GNSS Module for Lightweight UAVs

    27 partsGPL-3.0
  • 2 layers136.2 × 85.9 mmBATDATUNIT01, the printed circuit board in 3D

    BATDATUNIT01

    mlab-modules/BATDATUNIT01

    Multiple parallel Li-ion 18650 battery cell module with BMS and data storage with MCU control.

    225 parts5GPL-3.0
  • 2 layers40.1 × 30 mmBLE02, the printed circuit board in 3D

    BLE02

    mlab-modules/BLE02

    Bluetooth 4.1 controller for UART HCI-based BLE and BR/EDR communication with external host MCU.

    41 partsGPL-3.0

Questions

How big is the TFUNIPAYLOAD01 PCB?

It measures 70.6 × 50.3 mm and has 2 copper layers, 1.66 mm thick.

What parts does the TFUNIPAYLOAD01 use?

81 parts, built around the ATMEGA1284P-AU, KPTR-3216SURCK, BC817-25 and SKRTLAE010. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the TFUNIPAYLOAD01 KiCad files?

From the ThunderFly-aerospace/TFUNIPAYLOAD01 repository on GitHub, at the commit this page was made from: the board is hw/sch_pcb/TFUNIPAYLOAD01.kicad_pcb and its schematic hw/sch_pcb/TFUNIPAYLOAD01.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the TFUNIPAYLOAD01 design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).