Customer
An American developer of innovative products and services for mobile communication devices.
Project
Development of an onboard data logger, a portable device for monitoring and diagnostics of the vehicle’s technical condition with such functions, as logging the route of the vehicle, recording conversations between passengers in the passenger compartment and transmitting all information over a wireless channel to the control and coordination center.
Objective
The onboard data logger is a small device, a little more than the size of a matchbox, which is installed in a standard diagnostic connector of any vehicle with OBD II vehicle diagnostics support. All cars manufactured after January 1, 1996, support this standard.
The OBD II interface describes five low-level protocols:
- ISO 15765 CAN (Controller Area Network)
- ISO 14230 KWP2000 (Keyword Protocol 2000)
- ISO 9141
- SAE J1850 VPW (Variable Pulse Width Modulation)
- SAE J1850 PWM (Pulse Width Modulation)
Chrysler cars, all European cars and most Asian manufacturers use the ISO 9141 or ISO 14230 KWP2000 protocols. General Motors cars use SAE J1850 VPW, while SAE J1850 PWM is the standard for Ford models.
The functions of the device include collection, storage and transmission of information about the vehicle’s route (using the Global Positioning System (GPS)), recording of passengers’ conversations and technical condition diagnostics. The device records the following diagnostic parameters:
- Coolant temperature
- Number of engine revolutions
- Fuel consumption
- Vehicle speed
- Air conditioning system status, etc.
The collected information is transmitted to the control and coordination center over IEEE-802-11b/g Wi-Fi (if the vehicle is within the area of network coverage) or through direct connection over the USB interface.
Promwad’s experts had to perform the following tasks:
- Development of software for collecting, processing, storing and transmitting data to the control and coordination center
- Development of the enclosure design and structure, circuitry redesign
Interaction with the onboard data logger should be achieved using a graphical user interface. The software should run automatically when the device is connected to the USB port.
Solution
Major development tasks include:
- Software development and testing
- Development of a graphic user interface
- Development of software for hardware testing at the place of production
1. Hardware
The device is powered by the Atmel AT91SAM9RL64 processor with the ARM 9 kernel. The program and data memory includes 32 MB SDRAM and 1024 MB NAND Flash. The device implements the following communication interfaces: IEE802-11b/g Wi-Fi; USB 2.0 device; GPS; CAN; ISO9141, ISO14230, VPW, PWM.
Vehicle control unit emulators by such manufacturers, as Bowser Electronics and ScanTool.net, LLC, were used for testing and debugging vehicle diagnostics protocols.
2. SoftwareÂ
While developing software for the onboard data logger, various open software applications were used, including
- Linux kernel v.2.6.35
- U-boot bootloader 2010.09
- Bootstrap initial bootloader v.1.15
- Wireless tools utilities for interaction with WiFi networks
- OpenSSL for data encryption
- GPSD server for connecting with GPS
- Buildroot 2010.08 for the product firmware assembly
It should also be noted that during software debugging, the engineers detected and successfully corrected an error in the multi-block data transfer algorithm in the standard driver of the Linux kernel v. 2.6.35 AT91 MCI. The correction data were included in the kernel release v.2.6.37.
Support for such OBD protocols, as ISO9141, ISO14230, PWM and VPW, was implemented as software by implementing OBD control real-time logic on the processor.
Major software modules:
- Module for interaction with user software through the USB interface which implements the business logic
- GPS data logging module
- GPS time synchronization module
- OBD diagnostics data logging module
- Audio file recording module (wav files)
- System resource control module
- Control elements support module
- Service utilities (software update, logging, etc.)
Additionally, the device implements specialized software for automated testing of its working capacity at the stage of mass production.
For interaction with the portable onboard data logger, a configuration utility was implemented on the PC side, which runs under Windows XP and provides the user with a sequence of steps for configuring the device and testing its functionality. The device interacts with a PC through the USB interface. The user interface was designed using Qt4.7.0, QWT-5.2.0 and QSerialPort.
Here is an example of using a user utility for monitoring GPS parameters in real time:
Advantages
- Effective use of Linux kernel capabilities for real-time tasks
- Reliable fault-tolerant firmware upgrade without losing user data and settings
- Full control of devices both via USB and Wi-Fi
- An encrypted configuration file
- An intuitive graphical user interface
- The enclosure features protection against unauthorized disabling of the module
Technologies | Embedded Linux, gpsd, ODB-II, Qt4 |
Interfaces | USB 2.0, Wi-Fi, CAN, ISO9141, ISO14230, VPW, PWM, UART, SPI |
Programming languages | C, C++, bash |
Development tools | GCC, GNU make, buildroot, qtcreator, qmake |
Project management tools | SVN, redmine |