Hello,
Absolutely, let’s break down how to configure your Teltonika TFT100 tracker to read data from your Li-Ion battery via CAN, based on the provided specifications.
Understanding the Battery’s CAN Protocol:
Baud Rate: 500kbps (default, but configurable).
Identifier (ID): 11-bit standard identifier.
CAN Standard: CAN 2.0B.
Query Mechanism: The tracker (host) sends a request, and the battery management system (BMS) responds.
Request Format:
ID: 0x100
DLC: 0 (or any data, but 0x5A is recommended).
Response Format:
ID: 0x100
DLC: 8
Data: 8 bytes containing battery information (total voltage, current, remaining capacity).
Data Verification: CRC-16 checksum.
Byte Order: High byte first, low byte last.
Teltonika TFT100 Configuration Steps:
Hardware Connection:
Connect the CAN High (CAN_H) and CAN Low (CAN_L) wires from your battery to the corresponding CAN High and CAN Low pins on the Teltonika TFT100.
Ensure a common ground connection between the battery and the tracker.
Terminate the CAN bus correctly. If your battery and the Teltonika are the only 2 devices on the CAN bus, then you will need a 120 ohm terminating resistor at each end of the CAN bus.
Teltonika Configurator Software:
Download and install the Teltonika Configurator software on your computer.
Connect the TFT100 to your computer via USB.
Open the Configurator software and connect to the device.
CAN Configuration:
Navigate to the CAN settings within the Configurator.
Set the following parameters:
CAN Baud Rate: 500 kbps.
CAN mode: CAN2.0B
CAN ID type: Standard 11 bit.
Find the section that allows you to create CAN records. This is where you will set up the requests and parsing of the responses.
Creating a CAN Record (Request and Response):
Request:
Create a new CAN record.
Set the CAN ID to 0x100.
Set the DLC to 0, or if you want to follow the OEM recommendation, set the DLC to 1 and the data to 0x5A.
Set the Transmission type to “Transmit”.
Set the transmission period to your desired frequency. (For example every 10 seconds).
Response:
Create a new CAN record.
Set the CAN ID to 0x100.
Set the DLC to 8.
Set the Transmission type to “Receive”.
Now you need to configure the data parsing. This is the most complex part.
You will need to use the Teltonika Configurator’s data parsing features to extract the voltage, current, and remaining capacity from the 8 bytes of data.
Important: You will need to know the exact byte order and data format of the voltage, current, and capacity values within the 8-byte response. Refer to the OEM documentation for this information.
CRC-16: You will need to implement the CRC-16 verification in the Teltonika Configurator’s data parsing. This may require some scripting or custom logic within the Configurator. The Teltonika configurator has a virtual sensor section, and within those virtual sensors it is possible to create formulas. It is highly likely this is where the CRC-16 calculation will need to be implemented.
Data Conversion: You will likely need to apply scaling and offset values to the raw data to convert it into meaningful units (e.g., volts, amps, percentage).
Data Transmission:
Configure the TFT100 to transmit the parsed battery data to your monitoring platform (e.g., Teltonika RMS).
You can map the parsed data to specific I/O elements or parameters within the tracker.
Important Considerations: ReadWorks
OEM Documentation: The OEM documentation is crucial. Pay close attention to the data format, byte order, scaling factors, and CRC-16 calculation.
Testing: Thoroughly test the configuration in a controlled environment before deploying it in the field.
Troubleshooting: Use the Teltonika Configurator’s debugging tools to monitor CAN traffic and identify any issues.
Teltonika RMS: Using Teltonika Remote Management System (RMS) will greatly assist in the remote monitoring and configuration of your device.
CRC-16 Implementation: The CRC-16 calculation can be complex. Ensure you have a clear understanding of the algorithm and how to implement it within the Teltonika Configurator.
Example (Conceptual):
Let’s say the battery response data is formatted as follows:
Bytes 0-1: Total Voltage (mV, high byte first)
Bytes 2-3: Current (mA, high byte first)
Bytes 4-5: Remaining Capacity (%, high byte first)
Bytes 6-7: CRC-16.
You would need to configure the Teltonika Configurator to:
Extract the 2-byte values for voltage, current, and capacity.
Convert them from big-endian to the tracker’s internal representation.
Apply any necessary scaling factors (e.g., divide voltage by 1000 to get volts).
Perform the CRC-16 check on the first 6 bytes and compare it to the last 2 bytes.
Remember to adapt these steps to the specific details of your battery’s CAN protocol.
Best Regards