Wifi boat data monitor - what's left to measure!

  • Thread starter Thread starter GHA
  • Start date Start date

GHA

Well-Known Member
Joined
26 Jun 2013
Messages
12,552
Location
Hopefully somewhere warm
Visit site
Following on from the success of V1, exciting news is that JLCPCB now do a surface mount component assembly service.:cool:
https://jlcpcb.com/smt-assembly
Just over a fiver on top of the ridiculously low costs for 5 or 10 boards.
'Basic" components are pre mounted in the machines and cost what the component costs plus a tiny mounting fee. 'Extended' components aren't pre mounted and have an extra fee of 2 quid something to change the reel.
Loads of components to choose from -
https://jlcpcb.com/client/index.html#/parts

So after a few nights playing came up with this for starters - which should (might) have ----
2 x 4 channel voltage sensors-1 for 20A ammeter, 1 - 5v power, 2 x 25v to ground, 2 differential 25vINA219 current sensor, accurate to 3.2A / 32v
ACS712 bi directional current sensor - 20A
DAC -> 0 - 12vDC
2 x headers for ds18B20 thermometers, daisy chain lots together on 3 wires.
2 x NMEA in/out
Header for external BE280 Temperature/pressure/humidity
RPM sensor to connect to alternator W terminal.

So, all being well, for under fifty quid plus delivery you should get in the post a board to measure lots, sensors all fitted, just solder some headers and terminals and add an ESP32 doit. And write some software for it.. which sends it all to a raspberry pi as signalk to view/save to database/set alarms / whatever...

Schematic here for all to pick holes in and criticize
5hPFADl.png

https://i.imgur.com/5hPFADl.png
https://easyeda.com/paddyb/SigK_Send_copy


A lot of that has been proven to work already - but the engine RPM not so sure about - think this will work from the W terminal on the alternator? Calibration can be done afterwards as long as there's some sort of 3.3v that the ESP32 'RPM' can detect >
gRSR5PK.png


Haven't played with nmea multiplexing either , should work though...?

Or what else is there left to measure? :)

Might add some 12v switches, otherwise must be enough to be getting on with :)
 
Regarding the tacho, I presume the circuit drawn is intended to present square waves to the micro which it will count or time between edges?
If going with that approach, I'd lay out for some 'optional' sginal filtering components. Not sre the opto brings anything to the party?
An F to V convertor circuit going to an analogue input might be better?
 
A lot of that has been proven to work already - but the engine RPM not so sure about - think this will work from the W terminal on the alternator? Calibration can be done afterwards as long as there's some sort of 3.3v that the ESP32 'RPM' can detect >
gRSR5PK.png


Haven't played with nmea multiplexing either , should work though...?

Or what else is there left to measure? :)

Might add some 12v switches, otherwise must be enough to be getting on with :)

well done!

btw, a week ago I received from JLCPCB my first attempt at PCB design. Happy to report it's working (actually rather impressed it does!)

GVD_NMEA2K_v1.55.jpg


Re RPM I used a PC817, R02 is 4k7 1W, Diode a 1N400whatever, and R03 10k
for testing (and for regulating the RPM of the generator with a linear actuator) I can also check 220V by replacing the R02 with a 160K one.

half assembled board for testing:
GVD_NMEA2K_v1.55_2.jpg


Note that I scrapped my ESP32S and reverted back to Teensy3.5 3.6 as analogue read of the ESP is atrocious, but I understand you want the wifi bit so will stick to them.

Other things to do with this:
a truckload of sensing on engine health:
  • coolant, seawater, oil, transmission temps (DS18B20)
  • oil press (engine/transmission) stealing from existing sender
  • installing a seawater pressure sender on the first heat exchanger after the impeller
  • EGT through a MAX31855

tank level monitoring (diesel, freshwater, blackwater)
convert any old NMEA0183 sensors (wind/speed/rudder) to N2K through a MAX232
for you yachties heel and whatever you care out of an MPU9250+

for us moboers, Bennett trim tab indicators (the most difficult one I've done using coils)

well, that's the ones I've done todate, still a few inputs left for a few more tricks

There's going to be one such board on each engine, one on the generator and one on the lower helm dealing with tanks, temps and other bits and bobs.

As for displaying, I'm using my plotters, small 4inch multidisplays GMI10 a larger Maretron DSM250 and for the winter I'm planning to design a decent multidisplay based on a EVE2 7inch display I bought last year from NewHeaven and just managed to get it running last week (by accident...)

cheers

V.
 
Last edited:
well done!

btw, a week ago I received from JLCPCB my first attempt at PCB design. Happy to report it's working (actually rather impressed it does!)

Looks great! Very impressed with the surface mount assembly service, no way could I ever solder such tiny components and the basic ones are less than a cent!



Re RPM I used a PC817, R02 is 4k7 1W, Diode a 1N400whatever, and R03 10k
for testing (and for regulating the RPM of the generator with a linear actuator) I can also check 220V by replacing the R02 with a 160K one.

Like this?
inggpcc.png





Note that I scrapped my ESP32S and reverted back to Teensy3.5 3.6 as analogue read of the ESP is atrocious, but I understand you want the wifi bit so will stick to them.

I go for the ads1115 for voltage sensing, really accurate and can be configured differential so no earth loops.



Other things to do with this:
a truckload of sensing on engine health:
  • coolant, seawater, oil, transmission temps (DS18B20)
  • oil press (engine/transmission) stealing from existing sender
  • installing a seawater pressure sender on the first heat exchanger after the impeller
  • EGT through a MAX31855

tank level monitoring (diesel, freshwater, blackwater)
convert any old NMEA0183 sensors (wind/speed/rudder) to N2K through a MAX232
for you yachties heel and whatever you care out of an MPU9250+

for us moboers, Bennett trim tab indicators (the most difficult one I've done using coils)

well, that's the ones I've done todate, still a few inputs left for a few more tricks

There's going to be one such board on each engine, one on the generator and one on the lower helm dealing with tanks, temps and other bits and bobs.

As for displaying, I'm using my plotters, small 4inch multidisplays GMI10 a larger Maretron DSM250 and for the winter I'm planning to design a decent multidisplay based on a EVE2 7inch display I bought last year from NewHeaven and just managed to get it running last week (by accident...)

Raspberry Pi with openplottter V2 :) :)
Save it all to a database for making pretty graphs :cool:

just thought, might add a buzzer as well.
 
Last edited:
Sounds brill but you'll be forgetting to look out the hatch.

The looking gets done usually before getting up :)

Despite the amount of ebay tech onboard the cockpit is actually fairly electronics free - only depth/log & sometimes VHF ram mic with gps/ais data. And a space for the tablet under the sprayhood :)
 
I dont understand much if any of that but it sounds great.

Ditto :p

Our (soon to be new to us) boat's manager has built similar; he also has an accelerometer in there and was alerted to one of the fleet running aground on charter (after breaking free from a mooring ball) whilst the crew slept through it! Coupled with looking at the GPS location and depth he had a fair idea of what had happened and could then prioritise the boat for a more lengthy than usual diver inspection.
 
Thanks for the heads up about the PCB maker. I don't have a project needing it right now, but I've certainly done some things in the past that would have been much neater on custom PCBs than the veroboard I built them on.

Pete
 
I go for the ads1115 for voltage sensing, really accurate and can be configured differential so no earth loops.

Presumably one of these little ADS1115 thingies would be ideal in differential mode placed across the resistive fuel sender in my tank to get fuel readings via an Arduino onto N2k, but whilst not interfering with the existing fuel gauge.
 
Presumably one of these little ADS1115 thingies would be ideal in differential mode placed across the resistive fuel sender in my tank to get fuel readings via an Arduino onto N2k, but whilst not interfering with the existing fuel gauge.
Probably! :)
Though not being rich enough to own any n2k kit yet to play with it. Seems JLCPCB to CAN devices in their surface mount components so might work , VAS would more likely be yer man for that. Also might need a microprocessor to convert the voltage data into CAN data.
 
Thanks for the heads up about the PCB maker. I don't have a project needing it right now, but I've certainly done some things in the past that would have been much neater on custom PCBs than the veroboard I built them on.

Pete

Likes ideal for stuff like that, bunch of boards designed to take wago connectors might look great :cool:
 
2 projects I have been thinking about is a way of measuring the weight of LPG left in my gas container.

This uses a strain gauge load cell the on fitting a new full container the reading is set to full (9 kg in my case) and when the weight gets down to full less the 9 Kg the reading will be zero or whatever is the reading inbetween.

A way of taking the analogue outputs from an old type radar scanner and convert to the messages needed by one of the OpenCPN input message formats to display radar on OCPN chart plotter.
 
Probably! :)
Though not being rich enough to own any n2k kit yet to play with it. Seems JLCPCB to CAN devices in their surface mount components so might work , VAS would more likely be yer man for that. Also might need a microprocessor to convert the voltage data into CAN data.

planning to test ADS1115 thingies, ordered six pieces (two different types) from Hong Kong (decided to drop China...) took them over a month to arrive in Athens yesterday. Could be up to a couple of weeks to make the 330km to Volos :D
Have space for them on my PCB, so will go straight to testing.
 
Like this?
inggpcc.png

exactly!
used pulseIn like this:

int high_time, low_time;
double enginePRM;
float time_period, freqACvalue, freqHZ;
ExponentialFilter<float> ACHZ_ACDFilter(15, 0);

#define EngineRapidParamsUpdatePeriod 500


void EngineRapidParams() {

static unsigned long EngineRapidParamsNextUpdate = millis();
tN2kMsg N2kMsg;

////////////////////////////////////////////////////////////
// EngineRPM / AC Hz
// useful for tuning the generator RPM using a linear actuator

high_time=pulseIn(freqPIN,HIGH,100); //check 1000 with produced values!
low_time=pulseIn(freqPIN,LOW,100);

time_period=high_time+low_time;
time_period=time_period*0.0001;
freqACvalue=1000/time_period;

ACHZ_ACDFilter.Filter(freqACvalue);
freqHZ = ACHZ_ACDFilter.Current();
enginePRM = freqHZ*5.0;

note that with different multiplications I get my Iveco engine (x5), or the 220V output of the generator Hz (x50) which helps me tune the RPM of the Yanmar generator which doesn't have an alternator and hence cannot reliably set the rpm with a push/pull actuator as I wanted to do.

V.
 
2 projects I have been thinking about is a way of measuring the weight of LPG left in my gas container.

This uses a strain gauge load cell the on fitting a new full container the reading is set to full (9 kg in my case) and when the weight gets down to full less the 9 Kg the reading will be zero or whatever is the reading inbetween.

A way of taking the analogue outputs from an old type radar scanner and convert to the messages needed by one of the OpenCPN input message formats to display radar on OCPN chart plotter.

that's a great idea Roger!
I've spent a morning in July dragging the empty 3.5lt bottle a good two miles to and fro only to have to order one from some 60miles away...
Wonder if we can get decent, cheap and humidity resistant such sensors. Also need some care when refitting not to impose extra stresses due to the hose and the way it's routed (could be different each time!) else you have to everytime reset and recalibrate the thing.
Then you need to decide a fluid level to use in order to display it on any N2K device. Unfortunately the options are:
N2kft_Fuel=0,
N2kft_Water=1,
N2kft_GrayWater=2,
N2kft_LiveWell=3,
N2kft_Oil=4,
N2kft_BlackWater=5

so at a guess, you go for Oil, better than livewell :nonchalance:

V.
 
2 projects I have been thinking about is a way of measuring the weight of LPG left in my gas container.

This uses a strain gauge load cell the on fitting a new full container the reading is set to full (9 kg in my case) and when the weight gets down to full less the 9 Kg the reading will be zero or whatever is the reading inbetween.

Now I happen to know that if those cheap kitchen scales which do up to 15Kg break... taken apart an ESP32 can , with the addition of a little ebay board for a few quid, weigh accurate to under a gramme :cool: (for a day I knew how heavy each Euro coin was).
Which is on the back burner for an anchor snubber rope tension meter :)
 
exactly!
used pulseIn like this:



note that with different multiplications I get my Iveco engine (x5), or the 220V output of the generator Hz (x50) which helps me tune the RPM of the Yanmar generator which doesn't have an alternator and hence cannot reliably set the rpm with a push/pull actuator as I wanted to do.

V.
Thanks, looks like it should do the trick :encouragement:

Was that coming off the 'W' terminal? Heard that should work.
 
Top