CAN Data Logger Development AIS 140 Certified 4G Data LOGGER

CASE STUDY SNAPSHOT

Customer : An Automotive Tier 1 manufacturing and supplying AIS 140 certified Intelligent Transport System to Automotive OEMs.
Size : > 51-200
Project vertical : Automotive
Challenge : Need for a robust and unbreakable solution to monitor the commercial trucks while driving in the remote areas and mountain regions. This solution needs to be developed by reusing one of the customer’s existing TCU hardware unit with support for FOTA and COTA.
Solution : CAN data logger solution with online cloud storage and offline storage, software also support FOTA, COTA upgrade from cloud.
Services Availed :  Embedded Firmware Development, RAPIDSEA Automotive Stacks, SkyCase IoT Cloud
Tools and Technologies :
  • Platform: NXP iMXRT1064 at 600MHz
  • Programming Language: Embedded C
  • Operating system: FreeRTOS
  • Data Storage: eMMC chip
  • IDE: NXP MCUXpresso Integrated Development Environment
  • File System: FATFS

INTRODUCTION

Our customer is an established organization and pioneer in the Intelligent Transport System in compliance with AIS-140 for the Automotive commercial vehicles market. As part of their main product, they have got the additional monitoring tool requirement from OEM. They approached Embien to develop the CAN data logger solution using their TCU hardware unit which was used in the AIS 140 certified intelligence transport system.

CHALLENGE

The Data logging service should be reliable without any data packet loss while communication with cloud. Besides, this 4G data logger product was specifically meant for monitoring heavy trucks driving in remote regions where it is highly probable for network disconnection. The software should be robust enough to switch between the live data recording and offline data logging into the respective memory segments when the network goes online and offline. Further, the software needs to be implemented into the existing CAN data logger hardware from the customer and reuse the same hardware and the connector interface.

SOLUTION

Embien’s Connected vehicle development team visited the customer R&D office and gathered the detailed requirements and subsequently made the software requirements and aligned with customer on the features. The customer had also provided their hardware and the software boot platform as support from their side.

Embien had formed a dedicated team for this CAN data logger development project including the project lead, developers, test engineer, etc. and initiated the weekly meetings. The software architecture was made based on the customer requirements on the framework to be used. The expectations from the customer were that the google proto buffer to be used for serialization/deserialization, the data to be logged as binary files with timestamp to conserve space. The files should be written on the eMMC memory chip using the FATFS file system. All of these were considered, and the software was developed and delivered to the customer.

Software Architecture

The overall software design of the CAN data logger consists of the four modules as given below

  1. CAN Communication
  2. Datalogging - live and offline
  3. Cloud Communication
  4. Bootloader and FOTA Upgrade

Rather than reinventing the wheel, Embien's RAPIDSEA components such as J1939 stack, OTA Update module, Store and Forward mechanisms, message Queues were used for this project given that they were proven and readily available. The CAN communication module was configured in interrupt mode and data routed via a message queue to the J1939 stack. PGNs messages of interest were parsed and sent further down to the data logging module.

CAN Data Logger Development

The datalogging module was responsible for serializing the CAN message according to pre-defined proto message template and form the record in protobuf format. At last, the these message record is stored into a file as log. Based on the cloud connection status, the message record will either be stored on live message buffer or offline message buffer.

The cloud communication module of the 4G data logger took care of the connection and upload of CAN data to the cloud server. MQTT protocol was used for data communication and once the connection was established, the offline CAN message records were pushed to the cloud in JSON format.

The FOTA/COTA shared the same cloud communication which was used for uploading the logged data. The firmware file and the configuration file were downloaded using MQTT protocol and flashed into the program memory with the help of bootloader.

Deployment & Validation

Embien team developed an ECU simulator for this project for the validation purpose. This ECU simulator firmware was flashed into the NXP iMXRT1020 development kit and the kit then acted as the ECU and pushed the pre-configured CAN messages continuously with the respective periodicity. The simulator and the 4G data logger hardware are connected via the CAN bus and all the software features are thoroughly tested with the real hardware CAN bus setup.

On the data upload part, Embien team used its own SkyCase IoT cloud server during development. The customer had then integrated the same into their proprietary cloud server.

The OTA module was also tested initially with SkyCase server where the file is downloaded over HTTPS and stored in the run-time RAM memory. Once the full file was downloaded and validated for the file integrity and version, the file was then transferred and written into eMMC data memory using the FATFS file system. The configuration file was also downloaded and saved as a file in the FATFS file system on a different folder, which was used to reconfigure the J1939 stack.

The SW releases were executed with Agile methodology with each epic covers the major software feature. Overall, the software for the AIS 140 certified 4G data logger was developed and delivered in 6 months time including field testing, the full documentation and handing over.

BENEFITS

Some of the benefits our customer enjoyed in this AIS 140 certified CAN data logger project are

  • Achieved reduced time to market as the software developed with the customer’s existing hardware and Embien's RAPIDSEA stacks.
  • ECU simulator was developed by Embien for validating the software without depending on actual vehicle.
  • Integrated 3 axis gyro sensor as additional feature to facilitate identifying the vehicle orientation.
  • Used industry proven MQTT protocol for uploading the CAN messages to cloud.
  • Provided scalability to dynamically configure J1939 CAN messages.

CONCLUSION

Thus, Embien has helped its customer in developing the 4G data logger solution along with the FOTA feature on the customer’s existing AIS 140 certified TCU hardware board to quickly meet the market demands with its expert embedded software development services.

15th Year Anniversary