Site Information

 Loading... Please wait...

Blog

ELD Concept: SAE J1939 Data Recording And Display Using Android Or iOS Devices

Posted by Wilfried Voss on

Electronic Logging Device (ELD) ExampleAn electronic logging device (ELD) is electronic hardware that is attached to a commercial motor vehicle engine to record driving hours. The driving hours of commercial drivers (truck and bus drivers) are regulated by a set of rules known as the hours of service (HOS). The Commercial Vehicle Driver Hours of Service Regulations vary in Canada and the United States.

An ELD monitors a vehicle’s engine to obtain data on whether the engine is running, whether the vehicle is moving, miles driven, and duration of engine operation.

Previously, paper logs or electronic onboard recorders (EOBR) were used for hours-of-service tracking. Even though an electronic onboard recorder (EOBR)-style log improves the accuracy of the data, the lack of a consistent data format meant that the logs needed to be regenerated to an equivalent “paper” format for review and enforcement. 

The Record of Duty Status (RODS) definition within the ELD legislation defines a consistent format for enforcement personnel to review, so the ELD Mandate was created.

An ELD is a device that:

  • Records a commercial motor vehicle's driving time
  • Records the driver's hours of operation
  • Is synchronized with the engine of the vehicle
  • Electronically displays and transfers ELD information
  • Monitors engine data such as:
    • Engine power status
    • Vehicle motion status
    • Miles driven
    • Engine hours
  • Records data such as:
    • Date & Time
    • Geographic (GPS) Information
    • Engine hours
    • Vehicle miles
    • Driver identification
    • Vehicle identification
  • Records events such as:
    • Engine power up and shut down
    • Driver login/logout
    • Duty status changes
    • Personal usage
    • Malfunction of diagnostic events

Electronic Logging Device (ELD) Concepts

First of all, in addition to the above listed data recording requirements, an ELD device must have the following hardware capabilities:

  • SAE J1939 (CAN Bus) interface
  • Sufficient Data Storage (e.g. SD Card)
  • Cellular Connection (2G/3G, etc.) to transmit vehicle stats per text message or e-mail
  • Real-Time Clock
  • GPS Support
  • Driver cabin display for driver interaction

There are different approaches to developing an ELD, depending on individual preferences for hardware and programming environments. 

One approach is to combine all necessary hardware components into one system, including the display, which is then mounted inside the climate-controlled driver cabin. This solution also implies that the entire application is designed by using one common programming language for all hardware interfaces. I have described one of these approaches in another post, Electronic Logging Device Concept: Small Form-Factor ELD Based On Raspberry Pi With CAN Bus Port And GSM/GPRS/GNSS Support.

Android/iOS Phone/Tablet

The disadvantage, however, is that you're dealing with non-standard hardware which requires extensive software development efforts, i.e. you're dealing with the programming of various functions such as GPS, cellular communication, etc. Furthermore, you need to design your own enclosure, and it must be reasonably small, otherwise you will encounter problems with driver-acceptance. In regards to the above described system based on the Raspberry Pi, there is the issue of slow startup times.

When it comes to the desire of using standard off-the-shelf components, the most compelling solution is the use of an Android or iOS cell phone or tablet. These devices come with built-in GPS, cellular support, real-time clock, abundant data storage, and, after all, they make a great display. 

SAE J1939 to Bluetooth Gateway With 9-Pin Deutsch Connection Cable

The only part missing in this scenario is the SAE J1939 / CAN Bus interface. 

However, using the Bluetooth (Android) or BLE (iOS) connection, our SAE J1939 to Bluetooth Gateway With 9-Pin Deutsch Connection Cable provides a solution (and we have just recently added a BLE option).

The communication protocol between the gateway and the Android/iOS device is well documented, and we provide sample Java source code to read and write SAE J1939 / CAN Bus data frames.

The main bulk of the final application will be with the Android/iOS tablet/phone, while the functionality of the gateway is limited to reading vehicle data and transmitting them per Bluetooth/BLE. 

Data Definition

The communication protocol between the gateway and the Android/iOS device allows the programming (filtering) of the necessary vehicle data, i.e. the phone/tablet needs only to deal with data that are mandatory for ELD functionality, which also limits the data stream to the bare minimum.

The following defines SAE J1939 parameters (PGNs) that are appropriate to provide information such as engine power status, vehicle motion status, miles driven, engine hours, and more.

All parameters (with the exception of the Vehicle Identification Number) as described in the following are transmitted to the tablet using a programmable frequency. The tablet should fetch the data needed for the individual screens, while it ignores the data not needed.

Vehicle Motion Status

  • PGN 65132 (0xFE6C) Message Frequency: 50 ms
    2 bits, Pos. 1.7 – 1.8
    00 – Vehicle motion not detected
    01 – Vehicle motion detected
    10 – Error
    11 – Not available

Vehicle Speed

  • PGN 65132 (0xFE6C) Message Frequency: 50 ms
    2 bytes, Pos. 7 - 8
    1/256 km/h per bit, 0 offset

Miles Driven

  • PGN 65217 (0xFEC1)
    Message Frequency: 1 sec
    4 Bytes, Pos. 1 – 4: Total Vehicle Distance
    5 meters/bit – 0 offset
    4 Bytes, Pos. 5 – 8: Trip Distance
    5 meters/bit - 0 offset

Engine Hours

  • PGN 65253 (0xFEE5)Message Frequency: 5 sec
    4 Bytes, Pos. 1 – 4: Engine Hours
    0.05 hr/bit (180 sec = 3 min), 0 offset

Fuel Level

  • PGN 65276 (0xFEFC) Message Frequency: 1 sec
    1 Byte, Pos. 2: Fuel Level
    0.4%/bit – 0 offset

Engine Oil Level

  • PGN 65263 (0xFEEF)Message Frequency: 0.5 sec
    1 Byte, Pos. 3: Engine Oil Level
    0.4%/bit – 0 offset

Engine Coolant Level

  • PGN 65263 (0xFEEF)Message Frequency: 0.5 sec
    1 Byte, Pos. 3=7: Engine Coolant Level
    0.4%/bit – 0 offset

Engine Coolant Temperature

  • PGN 65262 (0xFEEE)Message Frequency: 1 sec
    1 Byte, Pos. 1: Engine Oil Level
    1 deg C/bit, -40 deg C offset

Vehicle Identification Number (VIN)

  • PGN 65260 (0xFEEC) Message Frequency: On Request
    ASCII string of variable length (up to 200 characters)

ELD Screens

The following refers to screen samples displayed on a phone/tablet. It must be understood that these screens represent a concept and that their design may appear differently on an Android/iOS phone/tablet.

Driver Login

Vehicle Status

Event Input

Event Log

Dashboard

Monitoring SAE J1939 Data Using The Raspberry Pi Plus PiCAN2 CAN Bus Interface Board

During the past years, we have received multiple inquiries in regards to creating an Electronic Logging Device (ELD) using the Raspberry Pi in combination with our PiCAN2 CAN Bus interface board, where the PiCAN is being used to monitor SAE J1939 data.The mere monitoring of SAE J1939 data (Parameter Group Numbers - PGN) is fairly easy, [...]

Read More »


Data Acquisition From Heavy-Duty Vehicles Using The SAE J1939 CAN Bus

Modern vehicles have electronic control units (ECUs) to control various subsystems such as the engine, brakes, steering, air conditioning, and infotainment. These ECUs (or simply `controllers') are networked together to share information, and output directly measured and calculated data to each other. This in-vehicle network is a data goldmine for improved maintenance, measuring vehicle performance and [...]

Read More »


The Federal Motor Carrier Safety Administration (FMCSA) Electronic Logging Device (ELD) Rule

An electronic logging device (ELD) is electronic hardware that is attached to a commercial motor vehicle engine to record driving hours. The driving hours of commercial drivers (truck and bus drivers) are regulated by a set of rules known as the hours of service (HOS). The Commercial Vehicle Driver Hours of Service Regulations vary in [...]

Read More »