There really is no need to monitor Molly’s engine for failure, as the FUSO Engine Management System seems to alert us via the instrument panel the moment anything is even slightly wrong. Rather we keep track of the diagnostics coming off the engine more for fun and long term trends.
There are two phases to this project. The first is to wire everything up, which was a little more involved than one might think. The second phase is to configure the computer to log the engine metrics and states.
How is it all Wired Up?
The key component to make this work, is a connection kit from Cradlepoint which will connect the OBDII port of Molly to a USB port on the Cradlepoint. These kits, along with the software in the Cradlepoint, are designed to read the engine diagnostics and send to fleet management software. We will use it merely to monitor how Molly is doing and log vital statistics for fun.
The connection kit is the key to the make this work, but we needed to add a few more cables to the mix to make this all work. These different cables when all connected together to form the necessary chain of protocol conversions.
First the OBDII port is converted into a more common, computer friendly format via the B+B Smartworx’s LD3IC-S data-interface adapter. This cable has a serial RS-232 output. However, the Cradleport modem doesn’t understand RS-232, so another cable is required to convert the RS-232 serial format into the USB serial format. This is easy enough, just need a FTDI based, Serial-to-USB converter cable. And between these two protocol conversion cables we have a null modem RS-232 extension cable, which spans the distance from the front of the truck, where the OBDII port is, to the electrical cabinet in the house where the modem is located. Finally, and not shown on the picture above, the modem is connected to the computer via an ethernet cable. RS-232 is a very old and slow communication protocol, but is a good choice for this application as it can tolerates the electrically noisy environment.
The modem includes the software needed to receive the engine diagnostic information and transmit it to our computer.
Cradlepoint sells a serial-to-USB cable they call a COR Extensibility Cable. Unfortunately this solution did not work for us as this cable plugs into the extensibility expansion port, and in our case, that port is already being used by the extensibility dock. So instead we used an FTDI serial-to-USB converter cable and plugged it into the only free USB.
Available Vehicle Diagnostics
There is a long list of possible vehicle diagnostics information available, but not every value is actually available. It all depends on what the OBDII port exposes. For our setup, it seems that FUSO implements the following values:
0x00 Vehicle Speed 0x01 Engine Speed 0x02 Throttle Position 0x07 Engine Coolant Temp 0x08 Ignition Status 0x09 MIL Status 0x0C Fuel Rate 0x0D Battery Voltage 0x0E PTO Status 0x10 Misfire Monitor 0x11 Fuel System Monitor 0x12 Comprehensive Component Monitor 0x13 Catalyst Monitor 0x14 Heated Catalyst Monitor 0x15 Evaporative System Monitor 0x16 Secondary Air System Monitor 0x17 A/C System Refrigerant Monitor 0x18 Oxygen Sensor Monitor 0x19 Oxygen Sensor Heater Monitor 0x1A EGR System Monitor 0x1C Ambient Air Temperature 0x22 Trip Odometer 0x23 Trip Fuel Consumption 0x2C Miles per Gallon
Cradlepoint has a good guide on how to setup the modem and how to enable or disable the above values. We ultimately ended up enabling every value, because you never know when you want to go back in time and see what a specific values was.
We also configured the modem to send the engine diagnostics to our computer along with the GPS coordinates. This way we can see what the engine was doing relative to where Molly was geographically. For example, we can compare throttle position and engine speed with altitude.
The modem sends the OBDII vehicle diagnostics along with the GPS information in a NMEA sentence format. And since GPS sentences were already being sent to the Traccar software, it seems like an obvious place to also send the OBDII information. Although Traccar is built for fleet management and GPS tracking, it actually does not have great support for OBDII information. Fortunately Traccar it is open sourced software, so it is relative easy to extend the software. Just download the source, setup a development environment and code away. I took the previous work completed to ingest GPS NMEA sentences and extended it for the new OBDII sentences. There was one complication with the way the Traccar core pipeline processes line based sentence protocols. After discussing with the maintainers of Traccar, we never really sorted out the best way to implement the code for the Cradlepoint OBDII messages. The code written however works perfectly well.
Traccar has a nice interface to see where vehicles are including tracks, but it is not that good at displaying OBDII information. There is a reporting function available for this, but it is hard to use.
An Alternative Approach – node-red and influxdb
The Cradlepoint modem allows multiple destination servers to be configured at the same time. So, in addition to sending the OBDII information to Traccar, it can also configured to send to the influxdb time series database via node-red. And once the information is in the database, then Grafana can be used to display the vehicle diagnostics, along with other. I think this new approach will be better.