Code/Design Review of Marine Engine Monitoring System

I built a project and am hoping somebody would be willing to peer-review it. This is my first post to this forum so my apologies if this is located in the wrong place.

I have an old 1977 marine diesel that lacks decent monitoring. It only has engine temp, oil pressure and a wildly inaccurate tachometer. I built a monitoring system based on the Uno R3.

The system uses six DS18B20 sensors for locations that do not exceed 250F:

  • Raw water entering
  • Raw water exiting
  • Coolant entering heat exchanger
  • Coolant exiting heat exchanger
  • Cylinder head temperature
  • Engine room temperature

There are also two thermocouples connected to MAX31850 amplifiers:

  • Oil temp
  • Exhaust gas temp

The DS18B20 sensors are on a dedicated 1-Wire bus and the MAX31850 amplifiers are on a separate 1-Wire bus.

The RPM is sensed by a SainSmart hall switch with a small magnet on the flywheel.

There are three enclosures:

  • Main enclosure contains the Uno and the MAX31850 boards
  • Dash-mounted enclosure contains a 16 X 2 LCD and a "next’ button. Pressing the next button shows the next sensor
  • Hall sensor is in a small plastic enclosure the size of a tic-tac box and mounted on a bracket near the flywheel

All the sensor leads run to the main enclosure. The dash enclosure is connected to the main enclosure with a length of CAT5/6 cable.

Attached are the code and Fritzing diagram.

The code and documentation live at bitbucket at R_P_Ryan / EngineMonitor / wiki / Home — Bitbucket.

Any feedback would be appreciated.

EngineMonitor.ino (4.24 KB)

ZSensor.cpp (1.94 KB)

Hey R_P_Ryan,

Love your project and also have an old Marine Diesel Engine, I've just got hold of the new MKR GSM 1400 so will be trying to follow your code where i can and setup an Engine monitor as per your bitbucket code. It's a shame no one else has peer reviewed your code over the last 2 years. Anyway Will be happy to keep you updated on how i get along with my progress, which i expect to be pretty slow.

I love the one wire system that you use as well, very cool. I had a bit of a poke about today to see if there was any way to monitor for Water in the oil, I could find some info on the reverse, as in monitoring for oil in the ocean, but not so much on monitoring for water in the engine oil. but for now I'll be sticking with the simple stuff, like the hall effect RPM sensor etc.

I like your bitbucket code site too:
https://bitbucket.org/R_P_Ryan/enginemonitor/wiki/Home

Cheers

smgs