Monitoring Installation – Part 2

We monitor quite a bit of “stuff” in Molly. Maybe too much stuff. But once the monitoring infrastructure was put in place, it was just too easy to add extra sensors and monitor more things. So we did.

In Part 1, we produced a prototype to make sure things would work and select the best components and software for the job. In this part, we go over the end-to-end setup and highlight how all this effort adds to our overland experience. And of course, there are even more detail posts on the nitty-gritty.

The grand vision is to quietly log everything and anything, so we can recall these logs later when needed. Once all of the sensors are installed, it is practical free to continuously log.

Our logs fall into one of seven main areas:

  • Location. Obviously latitude, longitude and altitude, but also other information about the quality of the GPS location fix and course and speed.
  • Truck. The Engine Control Unit (ECU) provides vital statistics of the truck.
  • Environment. The inside and outside temperatures, relatively humidity and barometric pressure
  • Batteries. Mainly the house batteries, but also the truck batteries. Monitor the volts, current in or out and state of charge,
  • Solar. So we can make sure our generating capability is working.
  • Water. Fresh and waste water levels. Mainly to monitor water consumption.

Sometimes you wake up in the morning wondering what the overnight low temperature was? Or maybe at the end of a long day you would like to know how many vertical meters you just drove? These and many more questions can be quickly answered.

Additionally, we can mix and match the information across these above seven areas. For example, we log our energy consumption, and later we might want to see if it changes over time or with outside temperature. And we can associate any measurement when it was made, but also where it was made, as we constantly record our location.

We all also calculate some derived values and place them in the time-series database. For example, water consumption can be derived from cumulative changes in water level.

To allow for these more complex queries, the information needs a little structure in our time-series database. Influxdb supports both fields and tags, which serve slightly different purposes. Fields are a good place to store values from the sensors, while tags are used to store metadata about the values, like what sensor produced the value or what source is associated with the field values. This is especially useful when you have two instances of the same thing, like two fresh water tanks, as the field key is the same in both cases, but the tag values will be different so each can be queried independently. And then there are measurements, which are like tables or groups of like fields with a retention policy. Enough about how data is stored in Influxdb.

In Molly the influx database will be stored on the computer. Ideally it would be stored on the Network Attached Storage (NAS) device because it has disk redundancy. And while Synology supports running Docker containers, it is not supported on our particular NAS model. Maybe we need the DS620slim?

Data Model (Illustrative)

Measurement
  |--- Field Keys [Field Value units]

Location
  |--- Latitude [Degrees]
  |--- Longitude [Degrees]
  |--- Altitude [meters]
  |--- Satellites in View [Number]
  |--- Horizontal Dilution of Precision [Relative]
  |--- Time of fix [hhmmss UTC]
  |--- Velocity Made Good [KPH]
  |--- True Course [Degrees]

Truck
  |--- Vehicle Speed [KPH]
  |--- Engine Speed [RPM]
  |--- Throttle Position [%]
  |--- Engine Coolant Temp [ºF]
  |--- Ignition Status [On/Off]
  |--- MIL Status [On/Off]
  |--- Fuel Rate [GPH]
  |--- Battery Voltage [V]
  |--- Misfire Monitor [On/Off]
  |--- Fuel System Monitor [On/Off]
  |--- Comprehensive Component Monitor [On/Off]
  |--- Catalyst Monitor [On/Off]
  |--- Heated Catalyst Monitor [On/Off]
  |--- Evaporative System Monitor [On/Off]
  |--- Secondary Air System Monitor [On/Off]
  |--- A/C System Refrigerant Monitor [On/Off]
  |--- Oxygen Sensor Monitor [On/Off]
  |--- Oxygen Sensor Heater Monitor [On/Off]
  |--- EGR System Monitor [On/Off]
  |--- Ambient Air Temperature  [ºC]
  |--- Trip Odometer [km]
  |--- Trip Fuel Consumption [gallons]
  |--- Fuel Efficiency [MPG]

Environment
  |--- Temperature [ºC]
  |--- Pressure [millibars]
  |--- Relative Humidity [TH%]
  |--- Heat Index [ºC]
  |--- Humindex [no units]
  |--- Dew Point [ºC]

Battery
  |--- Volts [V]
  |--- Amps [A]
  |--- State of Charge [%]
  |--- Time Remaining [hours]
  |--- Time Since Last Full Charge [seconds]
  |--- Depth of Last Discharge [mAh]
  |--- Depth of Average Discharge [mAh]

Solar
  |--- Charge State
  |--- Battery Potential [Volts]
  |--- Generating Current [Amps]

Water
  |--- Available [liters]
  |--- Consumed Water [liters]
  |--- Time since last Full/Empty Tank [mins]

Tags
  |--- Source
  |--- Sensor