Skip to content

[EN] TMA‐1 Features and Usage Guide

LUFT-AQUILA edited this page Nov 2, 2023 · 8 revisions

0. Specification

Electrical Characteristics

Parameter Min Typ Max Unit
Supply Voltage 4.5 12 28 V
Power Consumption W
DIN input Voltage 50 V
AIN Input Voltage * V
PIN Input Voltage ** 36 V

* Specified by resistors in ANALOG section
** Specified by resistors in PULSE section

Type-C USB of the ESP32 can also power the entire TMA-1 unit. If the device malfunctions while powered by the USB, it means the power is insufficient. Power the device via VIN connector instead.

Mechanical Characteristics

  • Mounting Hole Diameter: 3mm
  • Mounting Hole Pad Diameter: 6mm

1. Features

1-1. SD Card

TMA-1 datalogger can record all logs to the Micro SD card. The SD card slot is at the STM32F4 development board.

If the SD card is recognized properly, the SD LED on TMA-1 will light up, and it will turn off when the SD card is disconnected or malfunctioning.

To convert binary format logs into human-readable files according to the log protocol, please refer to the TMA‐3 Data Analysis Tool Guide.

  • You must synchronize the RTC time at least once and reboot the device to properly save log file names in actual time.
  • The log file name is saved in YYYY-MM-DD-HH-mm-ss.log format. Since TMA-3 uses the name in the calculation, it should not be changed.

1-2. RTC Real-Time Tracking

TMA-1 datalogger can store actual time information using the RTC(Real-Time Clock), even when the powered off.

The small coin battery on the STM32 development board powers the RTC clock. If you remove the battery, the time will be reset to May 12, 2023, 00:00:00.

The RTC unit can be synchronized in two ways.

  • When using telemetry, the time is automatically synchronized with the TMA-2 relay server when connected.
  • If you do not use telemetry, you can synchronize it with the computer's system time using the TMA‐1 Configuration Tool.

1-3. Telemetry

The TMA-1 can wirelessly transmit logs in real time for remote monitoring. The component in the TELEMETRY area of the PCB is required for this function to work.

It connects to the internet via the driver's smartphone hotspot network and transmits logs to the TMA-2 relay server.

When TMA-1 is connected to the server, the TELEMETRY LED on the board lights up, and it turns off when the connection is lost. Right after the boot, the LED will blink three times if the communication between STM32 and ESP32 is successfully initialized.

  • In practice, Samsung smartphones have the best compatibility with ESP32. iPhone's hotspot networks are the worst.
  • Even if the telemetry is interrupted due to network issues, all logs will be saved to the SD card without loss.
  • If you do not use this feature, you must turn off the Datalogging - Output - Telemetry option in the TMA-1 Configuration Tool. In this case, you do not need to install components in the TELEMETRY area of the PCB.

1-4. Log Output (UART/I2C)

TMA-1 can re-output the collected logs via UART and I2C for the other MCUs onboard(driver displays, etc.).

1-4-1. UART

Logs are transmitted via 115200bps 3.3V UART through the LTX and RTX pins of the Main I/O connector. (Only LTX is used.)

The logs transmitted over UART have an additional 2 bytes header (0x05, 0x12) in front of the 16 bytes of the log protocol.

The Datalogging - Output - Serial option in the TMA-1 Configuration Tool must be enabled for this feature to be active. If not used, it should be disabled for the better performance.

  • The theoretical maximum throughput is 640 logs per second.

1-4-2. I2C

The STM32 transmits the logs to ESP32 through the I2C. It sends the logs to the I2C General Call Address 0x0.

Therefore, if there is another node on the I2C bus listening to the general call address, it could receive log packets too.

  • Logs are transmitted to the I2C port only when telemetry is active and the ESP32 is connected to the server.
  • It can be received via the SDA and SCL pins of the Main I/O connector, but due to I2C bus limitations, long distances are not recommended.

1-5. CAN Traffic Monitoring

Monitors all traffic on the CAN communication bus. Components in the PCB's CAN area are required for this feature.

Supports CAN baud rates of 125 kbit/s, 250 kbit/s, 500 kbit/s, and 1 Mbit/s.

  • The CAN LED on the board turns off when CAN bus errors are detected.
  • To activate this feature, you need to enable the Datalogging - Sensors - CAN option in the TMA-1 Configuration Tool.
  • CAN baud rate can be configured using the TMA-1 Configuration Tool.

CAN Message

CAN 2.0A (standard) uses 11 bits, and CAN 2.0B (extended format) uses 29 bits to represent CAN message IDs.

However, according to the log protocol specification, TMA-1 can only use 8 bits in the key field to store CAN IDs.

As a result, all CAN messages are recorded in the log with only the lower 8 bits of the message ID.

In other words, both 0b11110000(0xF0) and 0b11011110000(0x6F0) will be treated as the same message ID in the log, with the key value being 0xF0.

Termination Resistor

There should be one 120Ω termination resistor at each end of the CAN bus, for a total of 2 resistors.

The TMA-1's CAN transceiver comes with a built-in 120Ω resistor. When designing your vehicle, make sure to consider this for the CAN bus configuration.

If there are already two termination resistors in other devices, you should remove the transceiver's 120Ω termination resistor.


1-6. Digital Signals

TMA-1 records the digital HIGH/LOW of 8 DIN channels. Components in the PCB's DIGITAL area are required for this feature.

It recognizes LOW for 0V and HIGH for 1V or higher input. It can handle inputs up to 50V.

  • Data is recorded every 100ms.
  • To activate this feature, you need to enable the Datalogging - Sensors - Digital option in the TMA-1 Configuration Tool.

1-7. Analog Signals

TMA-1 records analog voltages using 4 AIN channels. Components in the PCB's ANALOG area are required for this function.

The voltage is recorded by the STM32's 3.3V ADC through the voltage divider circuit in the ANALOG area, allowing various analog voltages by properly setting the voltage divider resistor values. For guidance on setting voltage divider resistor values, refer to the TMA‐1 DIY Guide.

  • Data is recorded every 100ms.
  • To activate this feature, you need to enable the Datalogging - Sensors - Analog option in the TMA-1 Configuration Tool.

1-8. Wheel Speed Meter (Digital Pulse Period)

TMA-1 measures the period of digital signals by detecting rising edges on 4 PIN channels. Components in the PCB's PULSE area are required for this feature.

When two rising edges are detected on all 4 input channels, the time difference between rising edges in each channel is recorded.

Most wheel speed sensors output a square waveform using magnets, as shown below:

Wheel Speed Sensor Waveform

By properly setting the voltage divider resistor in the PULSE area, you can define the voltage threshold that separates HIGH and LOW for the digital waveform.

Refer to the TMA‐1 DIY Guide to set the voltage divider resistor based on your wheel speed sensor's specifications.

  • Measurement is activated every 100ms.
  • If the time difference between rising edges exceeds 1 second, the timer is reloaded and precise timing cannot be measured.
  • To activate this feature, you need to enable the Datalogging - Sensors - Pulse option in the TMA-1 Configuration Tool.

1-9. 3-Axis Acceleration

TMA-1 records 3-axis acceleration every 100ms. Components in the PCB's ACCELEROMETER area are required for this feature.

  • The measurement range is ±4g.
  • To activate this feature, you need to enable the Datalogging - Sensors - Accelerometer option in the TMA-1 Configuration Tool.

1-10. GPS Location Information

TMA-1 records GPS location every 100ms. Components in the PCB's GPS area are required for this feature, and an external antenna must be attached.

It interprets location information from NMEA GPRMC messages received from the GPS module.

  • To activate this feature, you need to enable the Datalogging - Sensors - GPS option in the TMA-1 Configuration Tool.
  • While you can use the basic antenna provided with the module, it may result in reduced sensitivity.

1-11. Power Voltage / CPU Temperature

TMA-1 records power voltage and STM32F4 core temperature every second. These are basic functions that cannot be deactivated.

The maximum supply voltage of TMA-1 is 28V, but the voltage exceeding 26.4V will be recorded as 26.4V.


2. Connectors

2-1. Main I/O Connector (J1)

  • Model: Molex Mini-Fit Jr. 5569-24A
  • Mate: Molex Mini-Fit Jr. 5557-24R
  • Mate Terminal: Molex 5556T

VIN DIN0 DIN2 DIN4 DIN6 AIN0 AIN2 PIN0 PIN2 LOG_TX SDA CAN_H
1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24
GND DIN1 DIN3 DIN5 DIN7 AIN1 AIN3 PIN1 PIN3 LOG_RX SCL CAN_L

2-2. UART DEBUG Connector (J2)

  • Model: 2.54mm Pin Header
1 TX
2 RX
3 GND