Analog Engine Data to NMEA 2000: Read Old Gauges and Senders with HALMET
14 min read
On this page
The chartplotter is new and the NMEA 2000 backbone is in. The engine is not. It still has a tachometer driven by the alternator, a needle gauge for oil pressure, a temperature gauge, a couple of warning lights and a fuel gauge that may or may not be honest. You would like to see all of that on the plotter, log it, and get an alarm somewhere other than a small red light behind your knees.
Owners ask about this every season. The usual questions are the same: can I tap the wires that already go to my gauges, will that upset the gauges, and how do I get an RPM number out of the alternator? This guide answers those questions for the Hat Labs HALMET, a board built for this job. It walks through each signal type, the wiring traps, the firmware settings and how to calibrate against the gauges you already trust.
View full size (opens in a new tab)
HALMET, top view. Photo: Hat Labs, from the HALMET documentation.
What HALMET reads
HALMET is a Hat Labs development board with an ESP32, Wi-Fi and an NMEA 2000 interface. It has two kinds of inputs (Hat Labs HALMET docs):
| Inputs | What they read | Limits from Hat Labs |
|---|---|---|
| Analog A1–A4 | A voltage, or a resistance when you fit the CCS jumper for that input | 0–33 V measuring range, 16-bit ADC. Resistance mode tops out at about 300 Ω |
| Digital D1–D4 | On/off signals such as alarm switches, or pulses counted as RPM, fuel flow or a chain counter | Tolerate −32 V to +32 V. A "high" starts at about 1.55 V, with about 0.7 V of hysteresis |
All eight inputs sit behind galvanic isolation. They do not share a ground with the rest of the board, so HALMET can take its power from the NMEA 2000 network without creating a ground loop (Hat Labs hardware docs). The board accepts 5–32 V, so 12 V and 24 V boats are both fine.
HALMET does not come with software installed. You load firmware yourself, which is easier than it sounds and is covered below (Hat Labs usage docs).
Step 1: list your engine's signals
Before you buy wire, walk the engine and the panel with a meter and make a list. Most older engines have some mix of these:
| Signal on the engine | What it is electrically | HALMET input |
|---|---|---|
| Oil pressure, coolant temperature, fuel level with a needle gauge | A resistive sender that forms a voltage divider with the gauge | Analog, passive (voltage) |
| A sender with no gauge, or a new spare sender | A resistance to ground | Analog, CCS jumper fitted |
| Oil pressure or temperature warning light, bilge float | An on/off switch | Digital |
| Tachometer wire from the alternator W terminal, or a tach sender | A pulse train whose frequency rises with RPM | Digital (counter) |
Leave the factory alarm senders and gauges in place. HALMET is a monitor. It adds data and alarms to the network, it does not replace the engine's own protection.
Step 2: resistive senders, with or without the gauge
Most older temperature, oil pressure and tank senders are resistive. How you read one depends on whether the original gauge stays connected.
View full size (opens in a new tab)
(a) With an existing gauge, HALMET measures the voltage across the sender. (b) With no gauge, HALMET drives a current through the sender. Diagram: Hat Labs, from the HALMET usage docs.
The gauge stays (passive mode). Hat Labs explains that panel gauges, thermostatic or magnetic, form a voltage divider with their sender, so the voltage across the sender follows the reading. HALMET measures that voltage without interfering with the gauge. Connect the analog input to the sender's terminal (or the matching terminal on the back of the gauge) and the input's minus to engine ground. Leave the CCS jumper off. The voltage is usually not linear with the reading, and you correct that in software with a curve (Hat Labs usage docs).
This is the answer to the most common worry: you do not need a dual-station sender just to read a value the gauge already shows. The gauge keeps powering the sender, and HALMET only listens.
No gauge (active mode). Connect the sender directly and fit the jumper for that input on the CCS header. HALMET then drives a 10 mA constant current through the sender, which gives 1 V per 100 Ω, up to about 300 Ω (Hat Labs usage docs). Measure your sender's resistance across its full range before you rely on this mode. A sender that reads above about 300 Ω at any point needs a different approach.
View full size (opens in a new tab)
CCS header with jumpers fitted on A2 and A4, which puts those two inputs in resistance mode. Photo: Hat Labs, from the HALMET usage docs.
Never fit the CCS jumper on an input that is also wired to a working gauge. In that case the gauge already supplies the current, and passive mode is the right one.
Step 3: alarm switches and warning lights
Oil pressure and temperature switches, bilge floats and similar on/off signals go to the digital inputs. Hat Labs describes three cases (usage docs):
- A warning bulb is still in the circuit. When the switch is open, the bulb pulls the input to a defined level. No extra parts are needed.
- Nothing else is in the circuit and the switch pulls the line high when it closes. With the switch open, the input floats and reads randomly. Close the PDN (pull-down) solder jumper for that input on the back of the board.
- The switch pulls the line low when it closes. Close the PUP (pull-up) jumper instead.
For normally closed switches the logic is reversed, so pick the jumper that gives a defined level when the switch opens. One more catch from the Hat Labs docs: if the panel lights are LEDs, the voltage drop across them may not pull the input low enough, so enable the pull-down as well. Both jumpers connect a 100 kΩ resistor (hardware docs).
View full size (opens in a new tab)
Back of the board: PDN, PUP and LP solder jumpers for each digital input, and the CAN terminator jumper. Photo: Hat Labs, from the HALMET usage docs.
Step 4: RPM from the alternator W terminal
If your tachometer is driven by the alternator, the W terminal is your RPM source. Owners who have measured it describe an AC signal tapped from the alternator's windings, whose frequency rises with alternator speed. Because the alternator is belt-driven, its speed is a fixed multiple of engine speed, set by the pulley ratio.
Wiring, from the Hat Labs docs (usage docs):
- Run the W wire to a digital input (the example firmware uses D1) and the input's minus to engine ground.
- The W terminal is a low-impedance output. Put an in-line fuse in the wire close to the alternator, so a chafed wire can't short it.
- If the RPM reading jumps around, close the LP solder jumper for that input. It adds a low-pass filter at about 2.3 kHz, which Hat Labs says suits W terminal signals.
Owners commonly connect HALMET in parallel with the existing tachometer, so both keep working. Two problems come up often:
- The old tach stops when the new wire goes on. Owners who hit this usually found W and ground swapped, which grounds the tach signal. Check the polarity before blaming the gauge.
- RPM drops to zero while the engine runs. The W signal comes from the alternator's output, so when an external regulator switches the alternator off, owners report that the tach signal goes with it. If that matters to you, a magnetic pickup reading the flywheel teeth gives a signal that doesn't depend on charging.
How many pulses per engine revolution? It depends on the alternator's pole count and the pulley ratio, and an alternator swap or a new pulley changes it. Don't hunt for a number. Measure it in Step 6.
Step 5: power, NMEA 2000 and an enclosure
- On an NMEA 2000 network, connect HALMET to a drop with the 4-pin terminal block and power it from the network (getting started). The input isolation is what makes that safe from ground loops (hardware docs).
- Without NMEA 2000 (Signal K over Wi-Fi only), use the same connector, connect only − and +, and feed it from any fused 5–32 V source.
- Leave the CAN terminator jumper open. Hat Labs says not to use it on NMEA 2000 networks (hardware docs). Your backbone already has its two terminators.
- Use a waterproof enclosure. Hat Labs notes that the small SH-ESP32 case takes only two or three panel connectors per long side, so an engine install with several inputs needs a bigger box (getting started). Drill plastic walls with a step drill. Hole sizes from Hat Labs: 12.5 mm for an M12 NMEA 2000 panel connector or a PG7 gland, 13 mm for an SP13 panel connector, 16 mm for a PG9 gland.
If you add a new sender to the engine, check the port thread first. NPT and BSPT look alike but differ in pitch: 1/8 in. is 27 threads per inch for NPT and 28 for BSPT, and 3/8 in. is 18 for NPT and 19 for BSPT (Swagelok thread identification guide, page 23). Use a thread gauge or the engine manual, and an adapter rated for the fluid if they differ. Never force a sender that binds.
Step 6: firmware and calibration
Hat Labs documents the HALMET example firmware, built on SensESP. Follow the SensESP getting started guide to install the tools, but open the HALMET example instead of the SensESP template. HALMET's pins differ from other ESP32 boards, so start from the example rather than adapting other code (usage docs). Plain pio run builds the version you flash. The first build downloads the ESP-IDF framework and takes several minutes, and later builds are much faster (firmware README).
Out of the box, the example firmware sets up these inputs (main.cpp):
| Input | Example use | Signal K path | NMEA 2000 |
|---|---|---|---|
| D1 | Engine RPM | propulsion.main.revolutions | PGN 127488, Engine Parameters Rapid Update |
| A1 | Fuel tank sender in resistance mode | tanks.fuel.main.currentLevel | PGN 127505, Fluid Level |
| A2 | Raw voltage | sensors.a2.voltage | Not sent |
| D2 | Low oil pressure alarm | alarm.D2 | Low oil pressure flag in PGN 127489, Engine Parameters Dynamic |
| D3 | Example over-temperature alarm (active low) | alarm.D3 | Over-temperature flag in PGN 127489 |
Every setting below is in the board's web interface once it is on your Wi-Fi, so you don't need to recompile to calibrate.
Bench test the RPM input first. The example firmware outputs a 380 Hz test signal on GPIO 33, and its comments say that connecting this output and ground to a digital input lets you check the counter. With the default setting of 100 pulses per revolution, that reads about 228 rpm (main.cpp). HALMET ships without the GPIO header soldered, so fit it first if you want to run this test (getting started). Disconnect the test wires before you connect the engine.
Calibrate RPM against a handheld tach. The firmware's own comment says its default of 100 pulses per revolution "is rarely, if ever correct" (halmet_digital.cpp). The tacho multiplier converts pulses per second into revolutions per second. Signal K stores revolutions in Hz, so multiply by 60 for RPM (Signal K specification).
- In the web UI, set the tacho multiplier to
1. Therevolutionsvalue now shows the raw pulse frequency, f, in Hz. - Run the engine at a steady speed and read the real RPM, R, from a handheld optical tach (or a tach you trust).
- Set the multiplier to R ÷ (60 × f).
Worked example, made-up numbers: the handheld reads 1,500 rpm and HALMET shows 330 Hz. The multiplier is 1500 ÷ (60 × 330) = 0.0758, which means about 13.2 pulses per engine revolution. Check again at a second engine speed.
Calibrate the tank. A1 converts sender resistance to a level with a curve. The example's starting curve treats 0 Ω as empty and 180 Ω as full (halmet_analog.cpp), which is only a placeholder. Note the resistance HALMET reports with the tank empty, then at known fill points as you fuel up, and enter those pairs in the curve. Set the tank volume and the NMEA 2000 tank capacity in the web UI too.
Add oil pressure from the gauge sender. The example reads A2 as a voltage but does not turn it into a pressure. Wire A2 in passive mode to the oil pressure sender, then add this to main.cpp right after the line that connects alarm_d3_inverted to over_temperature_, inside the same NMEA 2000 block:
// Oil pressure from the existing gauge's sender, read on A2 in passive
// voltage mode. Enter your own voltage-to-pressure pairs in the web UI.
auto oil_pressure_curve =
new CurveInterpolator(nullptr, "/Engine 1/Oil Pressure Curve");
oil_pressure_curve->set_input_title("A2 voltage (V)")
->set_output_title("Oil pressure (Pa)");
ConfigItem(oil_pressure_curve)
->set_title("Engine 1 Oil Pressure Curve")
->set_sort_order(3020);
a2_voltage->connect_to(oil_pressure_curve);
oil_pressure_curve->connect_to(
new LambdaTransform<float, double>([](float pa) { return pa; }))
->connect_to(engine_dynamic_sender->oil_pressure_);
#ifdef ENABLE_SIGNALK
oil_pressure_curve->connect_to(new SKOutputFloat(
"propulsion.main.oilPressure", "/Engine 1/Oil Pressure SK Path",
new SKMetadata("Pa", "Oil pressure")));
#endif
Also add #include "sensesp/transforms/curveinterpolator.h" next to the other includes. This puts oil pressure into PGN 127489 and on propulsion.main.oilPressure, which Signal K defines in pascals (Signal K specification).
To fill in the curve, read the A2 voltage in the web UI next to the gauge: engine off, at idle, and at cruise once it's warm. Enter each voltage with the gauge's pressure in pascals. One bar is 100,000 Pa, and one psi is about 6,895 Pa (NIST conversion factors). Your gauge becomes the reference, so the plotter will agree with it. A coolant temperature sender works the same way, with a curve in kelvin and the dynamic sender's temperature_ input.
Troubleshooting
| Symptom | Check |
|---|---|
| Gauge reading changed after you wired HALMET | Is the CCS jumper fitted on that input? Remove it. A gauge-connected sender uses passive mode. |
| Tank or sender reading pegs at the top | In resistance mode, the sender may be above about 300 Ω at that point. Measure it with a meter. |
| Alarm input flickers or reads random states | The input floats with the switch open. Close the PDN or PUP jumper that matches your switch. |
| RPM jumps around | Close the LP jumper for that input. Check the fuse and the ground connection on the W wire. |
| Old tachometer died when HALMET was connected | W and ground swapped on the input. Fix the polarity. |
| RPM correct at one speed, off at another | Recheck the multiplier at two speeds. A slipping belt also changes the ratio. |
| Nothing on the plotter | Check the NMEA 2000 drop and power, the CAN terminator jumper (it should be open), and the plotter's engine and tank instance settings. |
Honest limits
- It is a development board. You load and edit the firmware yourself, and Hat Labs supports software questions on its discussion boards. If you want a box you configure without code, a dedicated analog-to-NMEA 2000 converter is the other route.
- No 5 V sensor supply. The isolated side offers only a 3.3 V header for external devices (hardware docs). A voltage-output pressure transducer that needs 5 V needs its own supply. Check its datasheet.
- Resistance mode stops at about 300 Ω. Above that, measure in passive mode with your own reference circuit, or use a sender in range.
- Your gauge is the reference. Calibrating to the original gauge makes the plotter agree with it, errors included. For a better number, calibrate against a mechanical test gauge or a known-good thermometer.
- No pulses-per-revolution table here, on purpose. Alternators and pulleys differ, so measure yours.
What you need
- Hat Labs HALMET: four analog and four digital isolated inputs, NMEA 2000 and Wi-Fi, 5–32 V supply.
- A waterproof enclosure, 158 × 90 × 60 mm, with room for several panel connectors.
- An NMEA 2000 M12 panel connector for the network drop.
- Optional: an SP13 2-pin power pigtail for a separate power feed when HALMET is not on NMEA 2000.
- An in-line fuse for the W wire, a meter, and a handheld tach for calibration.
Products in this guide
This document was last updated in November 2026.