Clone wiki

EngineMonitor / Home


The EngineMonitor is an Arduino-based system for older marine diesel engines. It provides diagnostic information that is typically found only on modern engines. Diesel engines are robust and many of the ones built since the 60's are still in operation, however they lack the electronic monitoring capabilities to determine they are functioning correctly.

The Arduino platform provides a wealth of monitoring and networking capabilities at a fraction of the cost of retrofitting an engine with purpose-built electronics. In Agile fashion, Version 1.0 provides the minimal features necessary to provide basic diagnostic information. Subsequent features are planned to network the EngineMonitor, with both onboard networks such as NMEA, as well as Internet of Things networks such as SigFox, XBee and WiFi.


This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


EngineMonitor code, schematics and artifacts are provided for recreational purposes only. This system is not to be relied upon when safety is at stake. There are no warranties or guarantees provided. You assume all risks related to the construction or use of this system. You agree to indemnify all developers and contributors of this project should any negative consequences arise from the use of this information and software.

Version 1.0 Features

  • Small enclosure located near dashboard with LCD display and push-button to read next temperature

  • Arduino and break-out boards located in sealed box in engine room

  • Raw water in temperature

  • Raw water out temperature

  • Coolant entering heat exchanger temperature

  • Coolant exiting heat exchanger temperature

  • Cylinder heat temperature

  • Engine room temperature

  • Exhaust gas temperature (in progress)

  • Oil temperature (in progress)

  • Highly accurate tachometer

  • Fahrenheit is the default however it is easy to change to Celsius.

Copy of Version 1.0.png

Version 2.0

Version 2.0 uses a Raspberry Pi to retrieve sensor data from the Arduino and publish it from a webserver.
See Version_2_0


See Temperature Sensors for descriptions of the sensors used in this project

There are tons of sensors available. The DS18B20 temperature sensor comes in many forms, from the raw chip to sensors with threaded fittings. You can also make your by drilling a recess in a bronze plug.

These are available for about $8 each:


There are three project boxes:

  • A small enclosure for the Hall sensor. This is mounted near the flyweel.

  • An enclosure for the Arduino and break-out boards. This is mounted in the engine room

  • An enclosure for the LCD display. This is mounted near the dashboard

All the sensor leads run to the Arduino enclosure. Use a piece of 13 conductor sprinkler cable to connect the Arduino to the LCD enclosure. Sprinkler cable is low cost and available at Home Depot of various places online where you can purchase it by the foot. Or you can two pieces of CAT6 (or better, CAT6A).

The Bill of Materials can be found under EngineMonitor / Docs / LCD_bom.html

If You Are New to Arduino

There are a few simple projects that are well documented on the Arduino site. These projects are intended for the novice to help learn about the Arduino platform. The EngineMonitor is basically a combination of these projects. If you are new to Arduino I recommend you complete the following projects. This way you can learn about the different components in EngineMonitor before attempting to build the complete project:

  1. Blinking LED:

  2. Push button switch:

  3. DS18B20 temperature sensors:

  4. LCD screen:

  5. Hall effect sensor for RPM:

Overview of Directions

  1. Order a beginners Arduino kit that includes a breadboard and wires.

  2. Download and install the Arduino IDE (IDE stands for integrated development environment). Play around with some of the simple examples like blinking LED to get the hang of it.

  3. Take a piece of wood and using foam double-stick tape secure a breadboard on each side of the Arduino.

  4. Wire up all the electronics on the breadboards before soldering. This makes it easier to understand the layout and make changes before anything gets soldered.

  5. Each BS18B20 temperature sensor has a unique address. You will need to run a utility program that queries each sensor and prints out the addresses to the serial monitor. Run the program "Discover Addresses" and copy the output to a text editor. This provides all the addresses. After obtaining the addresses you will replace the values in the file ZSensor.cpp. Once you have the addresses you will not know which of the sensors is assigned the address. Using the heat from your finger you can touch each sensor and determine which address goes to which sensor. Then you can label each sensor with a piece of tape and sharpee pen and move the values in ZSensor.cpp around so they are in the correct position.

  6. Once the sensor addresses are updated in ZSensor.cpp then load the EngineMonitor program onto the Arduino. If all the wires are setup correctly then it should work fine. If you are having problems you can uncomment the lines that write out the serial monitor and see what's happening

  7. After everything is working then you can start soldering the wires in place to make permanent connections. You can also embed the DS18B20 sensors in bronze plugs or attach to the locations in the engine however you wish. Attaching the RPM sensor takes a bit of finesse and creativity. A bracket needs to fabricated to hold the hall sensor close to the flywheel. The Hall sensor should be entirely enclosed in a plastic box. It is able to read the magnet through plastic. A box the size of a Tic-Tac container is about right.

Wire everything together on a breadboard before soldering. This allows you to load the code onto the Arduino and test everything. It also makes getting the addresses of the DS18B20 sensors easier


There are several included sketches for testing the wiring. This allows you to assemble and test one of the circuits. For example, you can wire up just the MAX3150 amplifiers and run testThermocouple(0); in the TestTemperatures sketch. Then you can add in the DS18B20 sensors and run testTempSensors(). These test routines print out the temperatures to the serial monitor.

After getting the temperatures all working you can add in the Hall sensor and run testHallSensor() in TestAllSensors.

Tip: If you are having problems uploading the code from the IDE to your Arduino board it may because the USB socket on your computer is low-power. Look for a USB socket on your computer that has small image of a battery charging next to it. These sockets provide higher power and work better with the Arduino. If this does not work you can try disconnecting the power and ground wires on the Arduino, then connecting the USB cord, loading the code, and then reconnecting the wires.


  1. Setup the MAX31850 circuits with K-type thermocouples connected.

  2. Run testThermocouple(0) and testThermocouple(1) in the TestTemperatures sketch to get the addresses for these sensors

  3. Setup the DS18B20 circtuit and run the DiscoverAddresses to get the addresses of these sensors. Update the addresses in the TestTemperatures sketch and run it to ensure everything is working properly

  4. Setup the Hall sensor circuit and run the TestAllSensors sketch.

  5. Setup the LCD circuit and run the TestAllSensors sketch to ensure all the sensors and LCD is correctly setup

  6. Setup the push button circuit and run the TestAllSensors function.

  7. After all tests have passed load up the EngineMonitor sketch.

  8. Toggle through the measurements to ensure everything is working properly. The button needs to pressed for a full second to switch to the next sensor.

  9. The power supply is a basic 5v USB car charger plug. Connect a USB cable between the Arduino and the charger. Wire the charger into the 12v supply on your boat.

  10. After everything is working correctly the hardware and software are all integrated and the project is ready to be soldered up.

Final Soldering

I recommend using a solderable breadboard for the permanent system. I am using

The easiest way to start the project is to copy the Ardiuno code into your Arduino editor. However if you wish to contribute use this GIT link to clone the project: $ git clone

Breadboard diagram:

A higher resolution image is located in the source directory under Docs\EM1.jpg


Closeup of Arduino Pins


Closeup of LCD Pins



Notes on parts: * The above vendors and parts should be used to ensure they behave as expected. * The LCD screen above is low-cost. More expensive one may have a better display and this may be important on boats. If you choose to use a better LCD just ensure it is HD44780 complaint * Temperature sensors and thermocouples come in many forms. Use the ones that fit your application best. Just ensure the two thermocouples are K-type. The DB18B20 sensors are used in six places where temps do not exceed 250 degrees F. The thermocouples are used for the oil and EGT which get hotter.

Setup Instructions

  1. Install the Arduino IDE from

  2. Download the OneWire library. See . Expand the zip file and place the OneWire folder in C:\Program Files (x86)\Arduino\libraries .

  3. Download the DallasTemperature library. See . Click the "Download as Zip" and install the Arduino-Temperature-Control-Library-master as above.

  4. Download the EngineMonitor folder from the source link on the left.

  5. Launch the Arduino IDE and open the file EngineMonitor.ino.

  6. Click the checkmark in the upper-left corner of the IDE to ensure the program compiles correctly. If there are any error then the libraries or the EngineMonitor files are not setup correctly.

  7. Connect the Uno to the computer via USB cable.

  8. Click the -> right arrow button in the upper left corner of the IDE. This loads the software onto the Uno. The LCD should briefly print out the "Starting Up" message then display the temperature of the Raw Water In sensor.

  9. On the breadboard, click the button to page through the list of temperatures. To test the RPMs wave a magnet in front of the Hall sensor at least ten times while the Arduino is in RPM mode.

Building the enclosures

See Building and Connecting Enclosures


If you need help, have any issues to report, or have any recommendations please create an issue using the link on the left.