Cheap Electronic Water Bladder Level Meter

A forum for discussing boat or trailer repairs or modifications that you have made or are considering.
User avatar
Inquisitor
Captain
Posts: 924
Joined: Mon Apr 23, 2007 5:24 pm
Sailboat: MacGregor 26M
Location: North Carolina Mountains

Re: Cheap Electronic Water Bladder Level Meter

Post by Inquisitor »

That is very interesting. Datasheet seems to stress high viscosity oil in the paragraph, yet down in the chart says cold and hot water. One picture showed the inner workings... pair of ellipsoid shaped gears. 8) I'm not real familiar with OB... do you have 2 or 4 stroke? Premix or oil injected? Will your viscosity be in the range this thing says it can handle?

Did you see this? https://hackaday.com/2015/01/09/bluetoo ... n-monitor/ Links are no longer valid... that is usually a sign, he wanted to start marketing it OR he had a serious problem and was worried about liability. You might be able to get hold of him. Either way... sounds like you're on the right path. Far better than a secondary vacuum reading. One of the comments said it clogged up... might want to have a bypass for safety. :)

Please share your progress... here or in new thread. I think that would be something I'd be interested in.
Odysseus, expert on the Siren's call
User avatar
Inquisitor
Captain
Posts: 924
Joined: Mon Apr 23, 2007 5:24 pm
Sailboat: MacGregor 26M
Location: North Carolina Mountains

Making Modifications to the Program (TOTALLY OPTIONAL)

Post by Inquisitor »

Image

Above, you will find a screenshot of my Windows machine. On it, you'll see three different browser pages open and all connected to an InqWaterLevel that has no extra components connected. Note the address (192.168.137.222). The top two are Google Chrome and Microsoft Edge attached to the gauge page showing an empty tank. As I suspected, if you try to use Internet Explorer, it's a sad day. :( The bottom-right is connected to the administration page. Using the instructions in STEP 10 viewtopic.php?f=8&t=28178&start=15#p348696 you can see I have the InqWaterLevel connecting to my local area network... thus I can see the pages on my Desktop even though it doesn't have WiFi. Having it so you can access it from a real computer (instead of your phone) is handy during the build phase or if you want to make changes to the program.

I'd be interested if anyone here on the forum is familiar with web design. Are you familiar (or even an expert) using HTML, CSS and JavaScript to build web pages?

That is all that InqWaterLevel is... is a web server hosting web pages that happen to connect back to the server to get some data. In this case, the quantity of water on your boat. Because of this, it is easy to make modifications to the client side pages. As an example, you might get your WeMos board long before you get all the other pieces needed. Since the WeMos board can be programmed and powered without all those other pieces, we can explore with just WeMos board.

In a dynamic web page, JavaScript is used to make changes to the Browser page. Download this https://inqonthat.com/wp-content/upload ... /RADOM.zip and unzip the file. On my screen you can see the index.js file above in Windows File Explorer in the lower left. This is simply a copy of the index.js file that is usually downloaded to update the InqWaterLevel bar graph. I've made a couple of trivial changes to change the color of the bar and to simulate some live data (since the sensors aren't connected).

The question now becomes... how do I make this modified index.js file get used instead of the default index.js file?
  1. Go to the Admin page: <your address>/admin.html
  2. Click on the Files tab. Think of this as a File Explorer on the WeMos computer.
    Image
  3. Now you can simply drag the file from your Windows File Explorer and drop it on the Files screen.
    Image
  4. Now that you've copied this file to the WeMos server, it will be served to browsers instead of the default version. Refresh (press F5) on the browser looking at the gauge page.
    Image
  5. Once you add the sensor to your project, you'll want to come back to this admin tab and right-click on the file and delete it. Refreshing your browsers again, and they will receive the default version.
Odysseus, expert on the Siren's call
User avatar
Be Free
Admiral
Posts: 1340
Joined: Fri Nov 23, 2012 6:08 pm
Sailboat: MacGregor 26X
Location: Steinhatchee, FL

Re: Cheap Electronic Water Bladder Level Meter

Post by Be Free »

I'm usually sufficient with web design. PHP is my poison of choice but I'll use Javascript in a pinch. What do you need?
Bill
2001 26X Simple Interest
Honda BF40D
"If I were in a hurry I would not have bought a sailboat." Me
User avatar
Inquisitor
Captain
Posts: 924
Joined: Mon Apr 23, 2007 5:24 pm
Sailboat: MacGregor 26M
Location: North Carolina Mountains

Re: Cheap Electronic Water Bladder Level Meter

Post by Inquisitor »

Be Free wrote: Fri Mar 12, 2021 9:08 am I'm usually sufficient with web design. PHP is my poison of choice but I'll use Javascript in a pinch. What do you need?
It was a curiosity question... just wondering if there were others with programming background on the forum. I'm primarily a C,C++,C# server-side programmer that in my last years before retirement started getting into web-client-server apps which involved all the above on the server side and the HTML/CSS/JavaScript on the client side. Kind of like the design paradigm and adapted it to the microprocessors. This way I don't have to write native code for iPhone, Android on top of Linux and Windows... just do browser front-ends.
Odysseus, expert on the Siren's call
User avatar
Inquisitor
Captain
Posts: 924
Joined: Mon Apr 23, 2007 5:24 pm
Sailboat: MacGregor 26M
Location: North Carolina Mountains

RF Interference?

Post by Inquisitor »

There are (at least) two ways of converting DC power from 12 volts to 5 volts that these electronics need. I picked the Buck converter method because it uses less than half the power of the linear voltage regulator that is wasted as heat which I don't really want either. I just read that these may cause interference on radios. It did not specify what radio frequency band(s). I imagine different buck converters would affect different bands depending on which frequency they operate. @RADOM, I'd imagine you have a Marine VHF radio??? Although you plan to use yours intermittently, would you mind checking to see if it interferes?

I have (winter, cabin fever projects) plans to do many such projects - anemometer, wind direction, accelerometer for wave frequency and amplitude, thermometers, barometric pressure sensors... etc. All planning to use buck converters. It would be a problem if it interferes with the VHF radio.
Odysseus, expert on the Siren's call
RADOM
Just Enlisted
Posts: 14
Joined: Sat Apr 16, 2005 2:08 pm
Sailboat: MacGregor 26X
Location: Mission, BC, Canada

Re: Cheap Electronic Water Bladder Level Meter

Post by RADOM »

Here's my update: I have received the sonic transducer and the DC converter but unfortunately my wifi board got lost in the mail so I re-ordered that part today. Sigh....
I'll let you know when I have all the parts.
RADOM
Just Enlisted
Posts: 14
Joined: Sat Apr 16, 2005 2:08 pm
Sailboat: MacGregor 26X
Location: Mission, BC, Canada

Re: Cheap Electronic Water Bladder Level Meter

Post by RADOM »

Update: The parts are all here as of yesterday. I ran into a road block trying to get the computer to recognize the board. Turns out I needed to download a CH340 driver available here https://nagesh-uluvar.blogspot.com/2016 ... usb20.html
Once I had the driver installed it was recognized as COM6 and the rest of the install went fine.
So...step 1 and step 2 are complete.
Step 3 will be for another day.
User avatar
Inquisitor
Captain
Posts: 924
Joined: Mon Apr 23, 2007 5:24 pm
Sailboat: MacGregor 26M
Location: North Carolina Mountains

Re: Cheap Electronic Water Bladder Level Meter

Post by Inquisitor »

RADOM wrote: Tue Mar 30, 2021 7:55 pm Update: The parts are all here as of yesterday. I ran into a road block trying to get the computer to recognize the board. Turns out I needed to download a CH340 driver available here https://nagesh-uluvar.blogspot.com/2016 ... usb20.html
Once I had the driver installed it was recognized as COM6 and the rest of the install went fine.
So...step 1 and step 2 are complete.
Step 3 will be for another day.
Great job of ferreting that out! Its been so long since I've configured my system for programming those devices, I'd forgotten about that aspect. Configuring a full development system is a rather PITA and I was trying to save people that level of pain. Let me know if you run into any other problems, so we can note them.
Odysseus, expert on the Siren's call
RADOM
Just Enlisted
Posts: 14
Joined: Sat Apr 16, 2005 2:08 pm
Sailboat: MacGregor 26X
Location: Mission, BC, Canada

Re: Cheap Electronic Water Bladder Level Meter

Post by RADOM »

Soldering all of the components worked fine and I was able to get power to the board via a 12V battery. However, when it came to testing the ultrasonic sensor, I was only able to get readings within about 10cm of the sensors (a reading of about 400). I'm thinking the problem is the sensors are not the P version, even though it was advertised as such on the seller's webpage. There certainly was no P on the back of the board like some of the pictures indicated on the seller's webpage. Is this the same issue you had when using a non-P version of the sensors?
User avatar
Inquisitor
Captain
Posts: 924
Joined: Mon Apr 23, 2007 5:24 pm
Sailboat: MacGregor 26M
Location: North Carolina Mountains

Re: Cheap Electronic Water Bladder Level Meter

Post by Inquisitor »

RADOM wrote: Sat Apr 03, 2021 6:13 pm Soldering all of the components worked fine and I was able to get power to the board via a 12V battery. However, when it came to testing the ultrasonic sensor, I was only able to get readings within about 10cm of the sensors (a reading of about 400). I'm thinking the problem is the sensors are not the P version, even though it was advertised as such on the seller's webpage. There certainly was no P on the back of the board like some of the pictures indicated on the seller's webpage. Is this the same issue you had when using a non-P version of the sensors?
I'm not sure I ever could give you a consistent failure mode. I had five that gave me nothing. I had one that actually worked under one set of conditions and when I put it into a real project... it didn't. I've never had any trouble with the P's as they are actually made for this board that runs at 3.3 volts.

I'd suggest comparing what you have with the pictures in viewtopic.php?f=8&t=28178#p348514. You can zoom in close enough to read chip numbers. And even if you can't, note that they are different sizes and orientations. There is no crystal on the P's front while the non-P has one (ovoid can with 4.000).
Odysseus, expert on the Siren's call
RADOM
Just Enlisted
Posts: 14
Joined: Sat Apr 16, 2005 2:08 pm
Sailboat: MacGregor 26X
Location: Mission, BC, Canada

Re: Cheap Electronic Water Bladder Level Meter

Post by RADOM »

I'm at a bit of a loss as to what to try next. I received another set of ultrasonic sensors. These ones have HC-SR04P stamped on the back but when I hooked all the components up and installed the software, I still can only get my hand about 10cm away from the sensors before the reading drops to zero on the app "add datapoint" reading. About 400 is max reading I can get on the "add datapoint" reading before it drops back to zero. My voltmeter shows 5V going to the Wemos D1-Mini ESP8266 Module so that part is doing its job. My parts seem to all be the same as yours. Any thoughts on a next plan of attack?
Thanks.
User avatar
Inquisitor
Captain
Posts: 924
Joined: Mon Apr 23, 2007 5:24 pm
Sailboat: MacGregor 26M
Location: North Carolina Mountains

Re: Cheap Electronic Water Bladder Level Meter

Post by Inquisitor »

RADOM wrote: Sat May 01, 2021 10:24 am I'm at a bit of a loss as to what to try next. I received another set of ultrasonic sensors. These ones have HC-SR04P stamped on the back but when I hooked all the components up and installed the software, I still can only get my hand about 10cm away from the sensors before the reading drops to zero on the app "add datapoint" reading. About 400 is max reading I can get on the "add datapoint" reading before it drops back to zero. My voltmeter shows 5V going to the Wemos D1-Mini ESP8266 Module so that part is doing its job. My parts seem to all be the same as yours. Any thoughts on a next plan of attack?
Thanks.
I apologize for the delayed response. I've been on out on my first sail in over three years and just now getting back to looking at the Internet. :)

Its rare to get partial results. Usually its either all or nothing. So... let's see if we can first narrow the problem to hardware or software. Can you get me some pictures of your hardware configuration. Mainly I want to see...
  • are you using a bread boarded setup, actually in the final configuration ready to put in a case or its in a case also.
  • a picture during a test... at the point where it drops back to zero.
  • some relative close-ups of the connections. I can't imagine you have anything wrong here as it would flat-out not work.
Just as a thought... try using a harder/larger target... maybe big book / or even the wall if your assembly is moveable.

While doing that, I'll generate a bare-bones program without all the AI logic... simple ping, display results. Maybe my software is causing it. I need to do some clean-out of the boat, but I should be able to get you something later today.
Odysseus, expert on the Siren's call
RADOM
Just Enlisted
Posts: 14
Joined: Sat Apr 16, 2005 2:08 pm
Sailboat: MacGregor 26X
Location: Mission, BC, Canada

Re: Cheap Electronic Water Bladder Level Meter

Post by RADOM »

Congrats on the sail! Hope it was a good one!
No need to apologize! I appreciate you help immensely and this is not an urgent project.

Here are a few views of the boards.


Image

Image

Image

And here is a You-tube video showing the readings.
User avatar
Inquisitor
Captain
Posts: 924
Joined: Mon Apr 23, 2007 5:24 pm
Sailboat: MacGregor 26M
Location: North Carolina Mountains

Re: Cheap Electronic Water Bladder Level Meter

Post by Inquisitor »

RADOM wrote: Tue May 04, 2021 6:26 pm Congrats on the sail! Hope it was a good one!
No need to apologize! I appreciate you help immensely and this is not an urgent project.

Here are a few views of the boards.


Image

Image

Image

And here is a You-tube video showing the readings.
On sail - To put a positive spin on it... the worst day sailing is always better than the best day in the office. But it was decidedly my worst sailing day (weekend). :( I'll be doing a trip report.

Your project looks great and very methodical.

I've been studying the code and my past experiences using these sensors. Here are my thoughts for you to try.
  1. Through several projects using these sensors, I've never experienced your symptoms, until... this project and only once it was in the case. Your symptoms sound just like ones I alluded to in 6b in post viewtopic.php?f=8&t=28178#p348511. But yours is not in a case. Have all your tests been lying flat on a table? Maybe try... putting a pillow under it or holding it up. Maybe the flat table is bouncing the sound back for a second "round" of reflections and the sensor circuit is not able to distinguish between first and second (or third, fourth) round-trip waves.
  2. Try powering without the 12 volt connection, but using the USB cable. This would eliminate DC-DC converter portion of the hardware from the problem.
  3. The software logic does have some code for an upper limit, however, you should see it go to about 4500.
  4. However, I did make a change in the software to handle the case you said you most likely will be using - Turning it on just to get a reading, then powering it off. The version you have now (1.0.0) would have a problem if you had a full bladder and it rested against the sensor. It would show empty. Now it will show properly - Full. I will supply the new version in next post.
Odysseus, expert on the Siren's call
User avatar
Inquisitor
Captain
Posts: 924
Joined: Mon Apr 23, 2007 5:24 pm
Sailboat: MacGregor 26M
Location: North Carolina Mountains

Upgrading InqWaterLevel

Post by Inquisitor »

To upgrade to a new version of InqWaterLevel
  1. Download the new version: https://inqonthat.com/wp-content/upload ... .1.0.1.zip
  2. Unzip it to get: InqWaterLevel.1.0.1.bin
  3. Install software - There are two ways to install an update.
    1. The first way, you are already familiar. However, it will require you to re-configure and re-calibrate the program. Follow the original steps starting at: viewtopic.php?f=8&t=28178#p348549
    2. The second way requires a little one-time setup.
      1. Configure the WiFi on the current version to access your home WiFi network. This will allow you to access the InqWaterLevel device from your home computers - viewtopic.php?f=8&t=28178&start=15#p348696
      2. On your computer, you'll hook up to the InqWaterLevel device.
      3. Go to the admin page and find the Files tab. Described in detail - viewtopic.php?f=8&t=28178&start=30#p348814
      4. Simply drag your InqWaterLevel.1.0.1.bin file over and drop on the Files screen. You'll see an orange progress bar. Once it reaches 100%, give it a few seconds (it needs to reboot) and then go to its app page. You should see the new version number at the top.
        Image
Odysseus, expert on the Siren's call
Post Reply