The Backstory

I recently purchased a 2013 model year boat and in style of Mavromatic, I wanted to “hack/mod” the onboard electronics ASAP.   The previous owner had installed a Lowrance HDS 7 Gen 3 GPS/Chartplotter and added a NMEA 2000 backbone to use a Lowrance EP-60R fuel flow sensor (that I later found was clogged, a simple back-flush blow of compressed air fixed it).

After numerous hours of research, I found out the fuel flow sensor was pointless to me given the engine is fairly new and has EFI and an onboard ECU that can provide that data.   The challenge was how do you get the all that data onto the NMEA 2000 network?

The answer was to install the Mercury VesselView Link.  Given my boat, while a 2013 model (non-DTS), still had the traditional analog gauges it required I installed a SmartCraft harness that could connect to the VesselView Link.   Thanks to the fine support team at Mercury Marine, I give them my engine/drive serial numbers and they looked up the harness I had installed and provided the part numbers my boat needed to add SmartCraft and then the VesselView Link.

Once I got the VesselView Link installed, I could see all the data I wanted on the Lowrance MFD.  The next step was I wanted to move the Engine Trim from Analog to Digital so I could feed that data into the VesselView Link (needed for Eco Mode to work).

This is where things got complicated… if I simply moved the engine trim sensor connector from Analog to Digital, per the instructions from the tech folks at Mercury Marine, my analog trim gauge would become non-functional.  To be fair, Mercury Marine has a little box that connects up to the SmartCraft junction box and can convert the SmartCraft data to control analog Gauges (called the “AGI”) but that added a bunch of other complexities, the main one being that the SmartCraft connector I’m using (back of engine) doesn’t have the Tach signal used to send the data to the AGI (and would require a Mercury tech to program the ECU’s Tach signal from Analog to Digital PCM).  To further complicate matters, my boat builder didn’t use the Mercury 14-pin hardness that has the SmartCraft (CANbus) connector at the helm drop, so I’d have to rig something up to get that signal to my helm — perhaps running a whole new harness 😖.  Plus, I’d most likely have connect up all my gauges to the AGI… not worth it to get to back to parity — if I’m doing this, I wanted to go with a custom hardware solution that can add more value.

The Solution

So I did what any respectable technology geek would do… find a way to turn the analog gauge into a digital one so I can get the Trim (and other data) from the NMEA 2000 bus.

The first thing I did was research if there was anyone that has used a MCU to access data from the NMEA 2000 bus.  We are so lucky to live in a time where there’s an open source community willing to help folks out.   I found this great NMEA2000 library by ttlappalainen and found the DisplayData2 example code that can output the Engine Trim data.   I also decided to use a Teensy 3.2 as the main processor given it’s teensy size I had to fit it all into the gauge housing (and design a compact PCB).   I hadn’t tested anything yet — but was confidant I could get any software/code working.

Knowing I had the ability to access the NMEA2000 bus, I wasn’t as confident from a hardware design/volumetric standpoint.    Since I already have a standard 2″ analog gauge hole in my helm (and no place to install a newer square MFD) I was limited to what I could fit.  I researched what LCD screens I could possibly use.   I found that 1.38″ – 1.5″ round LCD screens used for smart watches fit perfectly into a blank gauge housing.  I was planning on using an STM32 with a 1.5″ round MIPI-DSI display (may still do that someday) but found that getting into quality graphics frameworks that make designing interfaces easily and quickly costs thousands of dollars (e.g. touchGFX).  Instead, I found this clever screen from 4dsystems, uLCD-220RD.  I order one up and then got familiar with their IDE and environment… within two days I had the display showing a digital example of my analog gauge.

BAM!

So, at this point, I had trim data on the NMEA 2000 bus, a way to get the trim data from the bus, a screen that could fit into a 2″ hole and a screen that I successfully put my design on and it looked good — not 1990’s LCD graphics looking but current smartphone like quality.

I then ordered up a couple blank gauge housings — yes, they exist and are used to fill unused holes. When I received them, I though I could get inside of them… nope!  These gauges are sealed, the plastic housing and the lens are bound by the chrome/tin ring.  Meaning, the ring is rolled around both pieces sealing the gauge and lens in place.  I had to cut the back off.  Doing so carefully, I got inside the gauge.

I then began to fit the screen to the bezel — a little bit of finessing and I got it to all fit.

Once I got the screen to fit things started clicking!  I moved onto the PCB design.  I used Eagle to design the schematic and PCB that interfaces a Teensy 3.2 to a MCP2551 (or MCP2562) as well as the screen and even added some circuitry so I could scrap all this LCD screen business if it didn’t work and just convert the NMEA 2000 Trim data to good old Analog.

I decided to not put a DC-DC convertor on my board but instead a droppable one from Pololu.  That takes the 12V from the NMEA 2000 bus and steps down to 5VDC — only because the whole gauge seems to be drawing less than 90mA total from the 12v side.   I shipped the PCB design off to OshPark.

Looking good!

Next, I fired up Fusion 360 by Autodesk to begin designing the case adapter and back housing.  This took a few tries getting the sizing just perfect… 3d printed in the same “warm white” filament.  The adapter ring is connected to the back housing using tiny screws sourced at my local model train store (they are tiny!).  I even designed the PCB holder as part of the back housing.  I also cannibalized some of fastening elements from the blank gauge onto my 3d printed case.  Last bit on the case was finding a NMEA 2000 panel mount connector.

There was still one piece I was stuck on… how do I cycle between screens?  This is intended to be a quick-look a multifunction display.  I didn’t want a touch screen because it would ruin the look of the gauge, plus, I want the LCD to be sunk back a bit so sun/glare isn’t a problem.  Then I thought, hey, why not take advantage of that metal ring that caused me so much grief… I carefully attached some wires behind the metal ring and enabled capacitance touch on the Teensy.  That worked like a charm — a tap of the bezel now cycles throw the screens… YAHTZEE!

Putting it all together

All the parts arrived including the PCB’s and I started putting all the pieces together.  Things fit great and for the most part I’m done with the physical hardware elements.  I’m now working on the software side of things.  Deciding what screens I want to have, etc.  I’ve built a debugger tool and have attached it to the network on the boat and data is pouring in.

In part 2, I wrap things up and show how it works and looks in the boat.

Let me know if you find this all interesting or have any questions leave them below.

 

 

Tags: , , , , , , , , , , , , ,
Share: