NT Data Logging: Difference between revisions

From STorM32-BGC Wiki
Jump to navigation Jump to search
No edit summary
Line 32: Line 32:


The NTLoggerTool is open source (GPL3). Anyone is highly welcome to contribute to it.
The NTLoggerTool is open source (GPL3). Anyone is highly welcome to contribute to it.
== Logged Data ==
The data logger "spies" on the STorM32's Tx line, i.e., is capable of recording all data transmitted from the STorM32 to the NT modules. The points in the controller loop at which data are "sampled" are indicated in this sketch:
[[File:Storm32-nt-logger-data-sources-01.jpg|880px|center]]


== GUI Settings ==
== GUI Settings ==


The data logger "spies" on the STorM32's Tx line, is capable of recording all data transmitted from the STorM32 to the NT modules. However, which data is emitted by the STorM32 can be controlled by the parameter {{PARAMNAME|NT Logging}}, found in the {{GUI|Expert Tool}} window.  
However, not all data samples may be send out. Which data are emitted by the STorM32 can be controlled by the parameter {{PARAMNAME|NT Logging}}, found in the {{GUI|Expert Tool}} window.  


{| class="wikitable"
{| class="wikitable"
Line 68: Line 74:


It can happen that not all data can be transmitted in one cycle, if the computational load and data rate are too high. This mostly occurs with both 2nd Imu and full data logging. In that case the raw data is distributed over several cycles.
It can happen that not all data can be transmitted in one cycle, if the computational load and data rate are too high. This mostly occurs with both 2nd Imu and full data logging. In that case the raw data is distributed over several cycles.
The points in the controller loop at which the data are "sampled" are indicated in this sketch:
[[File:Storm32-nt-logger-data-sources-01.jpg|880px|center]]


== Live Recording ==
== Live Recording ==
Line 84: Line 87:


The USB-TTL adapter's Tx line '''''must not''''' be connected the STorM32's Rx line, i.e., should be left floating.
The USB-TTL adapter's Tx line '''''must not''''' be connected the STorM32's Rx line, i.e., should be left floating.
== Logged Data ==

Revision as of 11:25, 29 March 2016

A data logger can be connected to the NT bus, which allows us to record on a micro SD card a substantial amount of data for each cycle of the controller loop. It thus records the data with the maximal possible time resolution. Furthermore, the logger is quite small and can be easily mounted on-board. As a result one can get highly accurate and informative data taken in the real flight condition. This hopefully will allow use to better diagnose any troubles, such as jello or micro vibrations in the video, and find solutions to resolve them.

The data logger option also suggests many other applications. For instance, it can be used to dynamically balance the motors and propellers.

NT Logger Module

P1100441rcg.JPG P1100682-kl.JPG P1100685-kl.JPG

The NT logger module is connected to the NT bus, as any other NT module.

The micro SD card must be formatted with FAT32. The firmware author uses the Windows tool. Using the SD Association formatting tool didn't yielded any noticeable advantage.

The micro SD card should be of very high speed. Unfortunately, not any card works equally well. Little experience is available so far:

micro SD card experience reported by
SanDisk Extreme SDHC 16GB UHS-I Class 10 U3 very good, missing frames just every once in a while OlliW
Kingston 8GB HC class 4 don't work OlliW
Kingston 32GB HC class 4 don't work OlliW

NTLoggerTool

For analyzing the recorded data, the NTLoggerTool is available, providing tools such as FFT, and others. It also allows us to convert the data into other formats, most notably into .cfl files. The .cfl files are suitable for the program BlackboxExplorer for STorM32, which is a decendant of CleanFlight's BlackboxExplorer. The NTLoggerTool also allows us to record directly the data on the NT bus usiang a USB-TTL adapter, which enables many work-bench tests and procedures.

The NTLoggerTool is steadily advancing with fast pace, and any manual would be quickly outdated. For a discussion it is best to join the STorM32 NT thread at rcgroups.

The NTLoggerTool is open source (GPL3). Anyone is highly welcome to contribute to it.

Logged Data

The data logger "spies" on the STorM32's Tx line, i.e., is capable of recording all data transmitted from the STorM32 to the NT modules. The points in the controller loop at which data are "sampled" are indicated in this sketch:

GUI Settings

However, not all data samples may be send out. Which data are emitted by the STorM32 can be controlled by the parameter NT Logging, found in the [GUI:Expert Tool] window.

NT Logging basic pid accgyro accgyro_raw
SetLogger
CmdAhrs
SetMotorAll
CmdPid CmdAccGyro CmdAccGyroRaw
Imu1 & Imu2 & Imu3
“off” - - - -
“basic” x - - -
“basic + pid” x x - -
“basic + accgyro” x - x -
“basic + accgyro_raw” x - - x
“basic + pid + accgyro” x x x -
“basic + pid + ag_raw” x x - x
“full” x x x x

It can happen that not all data can be transmitted in one cycle, if the computational load and data rate are too high. This mostly occurs with both 2nd Imu and full data logging. In that case the raw data is distributed over several cycles.

Live Recording

It is also possible to "spy" on the STorM32's Tx line using a USB-TTL adapter, and record the data using the NTLoggerTool.

The USB-TTL adapter must be capable of handling 2.000.000 bauds. Adapters with FT232 (FTDI) work out of the box. Adapters with CP2102 may be configured to do so, see How to configure CP2102 USB adapters for high baud rates.

The USB-TTL adapter is then connected to the NT bus as follows:

USB-TTL adapter GND -> STorM32 GND
USB-TTL adapter Rx  -> STorM32 Tx

The USB-TTL adapter's Tx line must not be connected the STorM32's Rx line, i.e., should be left floating.