OpenMarine

Full Version: Cheap tank level sending units - and a thought about dual station
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If you search banggood.com for "marine level sender" they have some relatively inexpensive KUS (previously Wema) tank level sending units. I like the design, seems like little to go wrong with it. The Moeller one I have cost more than that and is complex and poorly made by comparison; it has been a source of problems. 

For my diesel tank since a single station sending unit can't be measured by two gauges in parallel, I was thinking perhaps I could put a simple relay in, so that when the key is off, sailing and dockside, Openplotter can measure the fuel level, and when the key is on it shows on the engine gauges. 

I've played with some inductive sensors, but they don't work on metal tanks, and are not as easily configured in WilhelmSK or Kip for example.
Hi,
I work along the same lines. I tried inductive sensors for blackwater, they work great for glass and plastic. However, my Ovni has several mm of aluminium walls in the tank. I needed to buy some more expensive sensors and I'll test this sensor over the weekend (at 20 EUR each I try with one first). For non water liquids like hydrocarbons the measurements as less simple, specially when you want to do it none intrusive. Please post more of your findings and experiences.

Project page : https://sites.google.com/site/olewsaa/ya...el-monitor

Ole
Hi Ole, yes it was your great posts on here and that had me playing with the inductive sensors. I do hope to get a couple of them working on my plastic blackwater holding tank where a float sensor would be icky.

Where would you put your code tank-level.py to get it running and reporting data to signalk, on an Openplotter instance? (For just a couple of sensors I wouldn't even need the PCF8574A.)

I see your code does the job of translating the readings of the individual sensors to a single decimal ratio which would indeed be easily configured in Kip, WilhelmSK, and other signalk clients.
Thanks for the positive feedback.
All my code is posted on github, yacht computer. Project pages in signature. I use Arduino sketch as I'm more familiar with Arduino IDE and like the 
low level language C. Micropython is another nice option. 

I will update the code and experiences with the new sensors. 
I plan to test the blackwater tank with the new sensor over the weekend. The spec claim that it could read through metal.
This is the sensor.
 

Ole
I guess where I'm lost is where to implement this code. I know Sailoog recommended that an Openplotter plugin could be made, but in the interim it seems SignalK Server plugins has become a good way to distribute this kind of thing. I'm not much of a coder but it seems like one could use https://github.com/jncarter123/signalk-r...-pi-bme280 as a template and make it do what you do with the PCF8574A in tank-level.py. Then a breakout board like https://www.waveshare.com/pcf8574-io-exp...-board.htm could make this a reasonably accessible undertaking for more boaters. Does this seem right?
One fellow claims that by putting an aluminum plate between a non-contact sensor and a too-thick plastic tank wall he was able to increase sensitivity sufficiently for it to work.
https://www.robotshop.com/community/foru...or/27463/4

This is possibly a dumb question, but might there be a way to use some of these non-contact sensors in combination with resistors between them to vary resistance based on how many were lit up, maybe a variation on a divider circuit, so that they could be used with an ADC chip already implemented on Openplotter, or even a real analog gauge?
(2019-05-03, 04:37 PM)Saqqara Wrote: [ -> ]One fellow claims that by putting an aluminum plate between a non-contact sensor and a too-thick plastic tank wall he was able to increase sensitivity sufficiently for it to work.
https://www.robotshop.com/community/foru...or/27463/4

This is possibly a dumb question, but might there be a way to use some of these non-contact sensors in combination with resistors between them to vary resistance based on how many were lit up, maybe a variation on a divider circuit, so that they could be used with an ADC chip already implemented on Openplotter, or even a real analog gauge?

Since they are on/off the best option is to feed the signal to RPi and handle them there, I use a loop to add 1/4 for each of them that is triggered. 
for (int j=0;j<num_sens;j++){
      tanklevel += inc * (~(digitalRead(sensor_pin[j]))&1) ;
The code is found here on github. I display the value (float) as a value of 0-100% (numerically 0-1.0) using an analog dial on the SignalK instrument panel. 
Messing around with Analog to digital converters are better left to signals that are continuous in nature, most common oil pressure, voltages, current etc.
My mantra is  to keep it simple. 

Ole
(2019-05-01, 06:52 PM)olewsaa Wrote: [ -> ] I use Arduino sketch as I'm more familiar with Arduino IDE and like the 
low level language C.

Have you tried visual studio code with the platformio plugin for esp programming? Took me a little while to get into it but definitely a fan now. The library's can be saved with the code so if you come back to some code after a while the sketch will still work ok even if updated libraries would break it. And the auto complete makes life so much easier, plus debug better so you don't have to upload every time to find a silly little bug. Worth trying for a few days. Free and opensource, one of microsofts better moments Smile

Sent from my SM-T813 using Tapatalk