Journey with Confidence RV GPS App RV Trip Planner RV LIFE Campground Reviews RV Maintenance Take a Speed Test Free 7 Day Trial ×


Reply
 
Thread Tools Display Modes
 
Old 04-26-2020, 11:38 AM   #1
Bus Nut
 
Join Date: Apr 2018
Posts: 421
My take on measuring how much water remains in the tank

I have a forty gallon fresh water tank, but it came as just a rectangular tube with no ports or anything. Just a piece of plastic. I wanted a good way to figure out the water level in the tank, but most solutions used a "liquid level sensor" that would only tell you if there's fluid at a specific level (like 1/2 full), which wasn't good enough for me.


Knowing this ahead of time, I put a paddlewheel style liquid flow meter in the PEX plumbing coming out of the tank, in anticipation of figuring out how to utilize it later. Well, here I am a year later, and I finally got it working!


It uses an Arduino, a display, and an arcade style button, along with a few other goodies to make it nice and fancy. It's powered by the water pump circuit, and measures how much water leaves the tank. It simply subtracts that quantity from the total tank capacity, and voila--now I know exactly how many gallons of water remain in the tanks.




(the decimal light doesn't work, so I know this says: 33.7 Gallons remaining)


I also installed a liquid level sensor in the vent line from the tank, so that when water starts rising through the vent line (i.e. the tank is full), an indicator LED turns on at the fill port so I don't have to spill water out.






It saves the gallons_remaining variable to the onboard memory, so it carries it over even if I turn the water pump off, and I calibrated/tested it to within .1 gallons accuracy. It also tells me how full the tanks are as a percent, and the current flow rate (in gallons per minute). All I have to do is fill up the tanks to max capacity, turn the water pump on (and top off the tanks), and then hold the button for 2.5 seconds and it'll register that the tanks are now full (a full 36.0 gallons).









It definitely isn't an industrial solution, but it totally works for my purposes! And it also was a way to pass time during this quarantine.


I made a post about it on my build thread here (https://www.skoolie.net/forums/f27/t...tml#post383445) but due to character limitations, I couldn't post the code on skoolie.net--the code, commentary, and (Amazon Affiliate) links to the specific items I used are on my build blog here (https://theargobus.blogspot.com/2020...flow-rate.html).



I also had a battery powered clock attached to it, so I could calculate my water usage per day and see how many days I have left at my current usage, but that ended up being too complicated and I decided to keep it stupid simple.


I have two other Arduino gadgets that I think are pretty clever, one is an automatic fan turn on circuit for my electrical compartment (if it gets too warm in there) and the other is a "dash helper" that uses GPS and another Arcade style button to give me speed, percent fuel tank full, distance to go till empty, and an automatic 5 minute shutdown timer. The write up on those are coming soon.

TheArgobus is offline   Reply With Quote
Old 04-26-2020, 11:42 AM   #2
Bus Crazy
 
Drew Bru's Avatar
 
Join Date: May 2016
Location: Grayson County, VA
Posts: 1,428
Year: 1996
Coachwork: Amtran
Chassis: International
Engine: DT466
Rated Cap: 65
Dude, that is slick as hell. I'm jealous of your talents and ingenuity!
__________________
Our Build: https://dazzlingbluebus.wordpress.com/
Drew Bru is offline   Reply With Quote
Old 04-26-2020, 12:12 PM   #3
Bus Crazy
 
kazetsukai's Avatar
 
Join Date: May 2017
Location: Athens, TN
Posts: 1,574
Year: 1999
Coachwork: Amtran
Chassis: International RE
Engine: International T444e
Rated Cap: 76
Quote:
Originally Posted by TheArgobus View Post
I also installed a liquid level sensor in the vent line from the tank, so that when water starts rising through the vent line (i.e. the tank is full), an indicator LED turns on at the fill port so I don't have to spill water out.
I hate my fill port! I think these things are so clumsy, and it leaks inside the wall. I'm looking for replacements.

Quote:
Originally Posted by TheArgobus View Post
I made a post about it on my build thread here (https://www.skoolie.net/forums/f27/t...tml#post383445) but due to character limitations, I couldn't post the code on skoolie.net--the code, commentary, and (Amazon Affiliate) links to the specific items I used are on my build blog here (https://theargobus.blogspot.com/2020...flow-rate.html).
If you plan on doing various code projects you'd like to share, use GitHub and link to there. Automation has been a key feature of my build and I put all of my code there.

Nice work.
kazetsukai is offline   Reply With Quote
Old 04-26-2020, 07:17 PM   #4
Bus Nut
 
Join Date: Apr 2018
Posts: 421
kazetsukai, I've been following your build and your set up is truly a work of fine art! It's definitely inspired me to think of other things I could do, but I I'm out of ideas!


As for this contraption, I realized today on a day trip that I should've oriented it around "gallons used" instead of "gallons remaining". That way, I could just track how many gallons I've used in case I filled it more or less than 36 gallons, which would happen on any surface other than level.
TheArgobus is offline   Reply With Quote
Old 04-26-2020, 07:33 PM   #5
Bus Geek
 
Join Date: Sep 2018
Posts: 2,831
Year: 2007
Coachwork: Thomas Built
Chassis: Minotour
Engine: Chevy Express 3500 6.6l
That’s better than tank sensors because you’re rarely
Level enough.
Danjo is offline   Reply With Quote
Old 05-03-2020, 03:12 PM   #6
Bus Nut
 
Join Date: Apr 2018
Posts: 421
I created a GitHub account for this and my future arduino/raspberry pi gadgets.


https://github.com/TheArgobus/Tank-Level
TheArgobus is offline   Reply With Quote
Old 05-04-2020, 01:25 AM   #7
Bus Geek
 
Join Date: Sep 2015
Posts: 3,856
Year: 2002
Coachwork: Thomas Built Bus
Chassis: Freightliner FS65
Engine: Caterpillar 3126E Diesel
Rated Cap: 71 Passenger- 30,000 lbs.
Excellent! Thank you for sharing your design experiences here and on github.
Native is offline   Reply With Quote
Old 05-04-2020, 08:46 AM   #8
Bus Crazy
 
kazetsukai's Avatar
 
Join Date: May 2017
Location: Athens, TN
Posts: 1,574
Year: 1999
Coachwork: Amtran
Chassis: International RE
Engine: International T444e
Rated Cap: 76
Quote:
Originally Posted by TheArgobus View Post
QQ: Looking at the EEPROM writes: Does the board lose power often?

You have a lot of if blocks with one,two,three,four and references to data[index], probably could separate these into functions. Same with the hack variable checks. It would result in less groups of code that look nearly the same.

To demonstrate, on my sketch If you look at Line 258:
https://github.com/kazetsukaimiko/au...nlink.ino#L258

You can see the boolean function:
Code:
// Is the pinNum a valid digital pin?
boolean validDigitalPin(int pinNum) {
  return ((pinNum >= 0) && (pinNum < NUM_DIGITAL_PINS) && !bannedDigitalPin(pinNum));
}
You could do something similar:
Code:
// General function to compare hack variablees
boolean hackCompare(long compareTo, long delay) {
  return (hack - compareTo) >= delay;
}


// Was the last button press longer than delay (1000, 1500, whatever you pass in)
boolean lastButtonDelay(long delay) {
  return hackCompare(hack_button, delay);
}


// Your old if block:
if (hack - hack_button > 2500) {
  // ...
}


// Your new if block:
if (lastButtonDelay(2500)) {
  // ...
}
Helps with readability a bit... I think? Most of your if blocks can be functions like these. Look at my sketch and see if any of the patterns used would help you at all. I can answer any questions.

You do have good code comments.
kazetsukai is offline   Reply With Quote
Old 05-04-2020, 11:51 AM   #9
Almost There
 
Join Date: Dec 2019
Location: Upstate NY
Posts: 85
Year: 2001
Coachwork: Girardian Handicapped Commercial
Chassis: E-450
Engine: Ford 7.3L
Rated Cap: 9,000
UH MAZE ING!!!!! So cool what people think of. Very impressive.
mc11237 is offline   Reply With Quote
Old 05-04-2020, 01:35 PM   #10
Bus Nut
 
Join Date: Apr 2018
Posts: 421
Kazetsukai, that makes sense... I'm not really familiar with making functions and how to call them, but I'm pretty good at monkey-see-monkey-do and your example really helps. This will clean up the code for the other gadgets too.
TheArgobus is offline   Reply With Quote
Old 05-04-2020, 01:41 PM   #11
Bus Crazy
 
kazetsukai's Avatar
 
Join Date: May 2017
Location: Athens, TN
Posts: 1,574
Year: 1999
Coachwork: Amtran
Chassis: International RE
Engine: International T444e
Rated Cap: 76
Quote:
Originally Posted by TheArgobus View Post
Kazetsukai, that makes sense... I'm not really familiar with making functions and how to call them, but I'm pretty good at monkey-see-monkey-do and your example really helps. This will clean up the code for the other gadgets too.
Hope its not uncalled for, I'm a programmer by trade... we tend to go into PR (peer review) mode the moment we see someone else's code. Great work.
kazetsukai is offline   Reply With Quote
Old 05-05-2020, 09:46 AM   #12
Bus Crazy
 
somewhereinusa's Avatar
 
Join Date: Nov 2010
Location: Andrews,Indiana
Posts: 2,436
Year: 1991
Coachwork: Bluebird
Chassis: AARE
Engine: 3116 Cat 250hp
Rated Cap: Just the two of us.
I really like your idea and thought to carry it on a bit. I have fresh, grey and black tanks. I have tank sensors but, as you said, don't work right if unlevel. Perhaps something like this would work?



The main inconsistency would be body waste to the black tank. My tanks are pretty large and there's just two of us so might be able to add some percent to that figure.

The grey tank is pretty much what came out of fresh tank minus what goes to toilet.

Having results go to phone would eliminate the need for the lcd.
somewhereinusa is offline   Reply With Quote
Old 05-05-2020, 10:52 AM   #13
Bus Nut
 
Join Date: Apr 2018
Posts: 421
That's a clever way to do it and would totally work. Just add like... 10% to the flow meter to the toilet to account for urine and solids? Out of curiosity, I did an NIH.gov search and found this (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4500995/). Apparently the average flush is 128 grams of wet fecal matter, and a rough approximation would be 128 milliliters of human waste per flush--so if your flush volume is, say, 1 gallon (3.8 liters), and you add on average 128 milliliters to that flush, that comes out to adding 3.3% or so to the volume of water that passes the flow meter. Just to be safe, I'd add 5%.


In my humble opinion, I actually prefer to use the standalone screen without a phone, but that's only because I'm borderline Luddite/Amish. A modification I wish I would've made, however, is to somehow put a paddlewheel flow sensor going into the fresh tank--that way wouldn't have to worry about how full the tank is, it would always know how much water I've added and subtracted to the tank.


These sensors are pretty simple--they're just hall effect sensors, so one could make one themselves and simply calibrate it to get the right values.
TheArgobus is offline   Reply With Quote
Old 05-05-2020, 11:03 AM   #14
Bus Crazy
 
Drew Bru's Avatar
 
Join Date: May 2016
Location: Grayson County, VA
Posts: 1,428
Year: 1996
Coachwork: Amtran
Chassis: International
Engine: DT466
Rated Cap: 65
Quote:
Originally Posted by TheArgobus View Post
In my humble opinion, I actually prefer to use the standalone screen without a phone, but that's only because I'm borderline Luddite/Amish.

Dude, Luddite? Really? I wonder what that makes me, I seriously considered just going with an old school sight glass level indicator.


I'm impressed as hell with your inginuity. We bought a SeeLevel monitor and it works alright, but it's just a rough estimate of tank percentage, not an actual indicator of how many gallons of water we have left.
__________________
Our Build: https://dazzlingbluebus.wordpress.com/
Drew Bru is offline   Reply With Quote
Old 05-05-2020, 01:21 PM   #15
Bus Crazy
 
somewhereinusa's Avatar
 
Join Date: Nov 2010
Location: Andrews,Indiana
Posts: 2,436
Year: 1991
Coachwork: Bluebird
Chassis: AARE
Engine: 3116 Cat 250hp
Rated Cap: Just the two of us.
Quote:
Originally Posted by TheArgobus View Post
That's a clever way to do it and would totally work. Just add like... 10% to the flow meter to the toilet to account for urine and solids? Out of curiosity, I did an NIH.gov search and found this (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4500995/). Apparently the average flush is 128 grams of wet fecal matter, and a rough approximation would be 128 milliliters of human waste per flush--so if your flush volume is, say, 1 gallon (3.8 liters), and you add on average 128 milliliters to that flush, that comes out to adding 3.3% or so to the volume of water that passes the flow meter. Just to be safe, I'd add 5%.
The problem is an RV toilet doesn't use a set amount of water. It flows as long as the pedal is down. Different users us different ammounts, etc. I also have a hose to rinse the "skid marks". Might be able to find some figures though.

Quote:
In my humble opinion, I actually prefer to use the standalone screen without a phone, but that's only because I'm borderline Luddite/Amish. A modification I wish I would've made, however, is to somehow put a paddlewheel flow sensor going into the fresh tank--that way wouldn't have to worry about how full the tank is, it would always know how much water I've added and subtracted to the tank.
I'm lazy, it's much easier to just add a bluetooth module then read whatever the serial monitor puts out on the phone.
somewhereinusa is offline   Reply With Quote
Old 05-11-2020, 09:54 AM   #16
Mini-Skoolie
 
Join Date: Feb 2018
Location: Philadelphia, PA
Posts: 12
Year: 1989
Coachwork: Crown
Chassis: Supercoach
Engine: Cummins 8.3L
Thanks a lot for sharing this. I was trying to come up with a solution to integrate water level into our custom touchscreen bus control system (Raspberry Pi and Arduino based) and this is water flow sensor idea is perfect. I'll definitely update with our finished product once it's finished.
jmiraglia is offline   Reply With Quote
Old 05-11-2020, 12:20 PM   #17
Bus Nut
 
Join Date: Apr 2018
Posts: 421
What are you going to use your setup for? Monitoring system stats, like water level, air temp, battery voltage? Something even cooler? I'm in the process of doing this myself, but it's so far down the list of priorities.
TheArgobus is offline   Reply With Quote
Old 05-11-2020, 12:41 PM   #18
Mini-Skoolie
 
Join Date: Feb 2018
Location: Philadelphia, PA
Posts: 12
Year: 1989
Coachwork: Crown
Chassis: Supercoach
Engine: Cummins 8.3L
Our primary use of this is for lighting control and displaying Victron Venus GX console screen that shows the state of all of our electrical/solar components.

I have all lighting wired into a bank of relays that are controlled via arduino (each light is addressable either individually or as configured groups) (arduino is also subscribed to MQTT topic and publishes lighting changes so lights can be controlled/reported on via other network based services).

We use momentary push button switches that are wired into the arduino to allow physical control of lighting groups. (this also allows for any light switch to control any/all lights without needing network to be on, so we have a master switch at the door to turn all lights off).

You can see the attached picture of the current state of this lighting control interface with water level at bottom left (will expand this so touching the water level gives you % left, gallons remaining, gallons used total, gallons used today). We'll be recording a video to cover this setup and code written to make this all possible within the next week.
Attached Thumbnails
IMG_0876.jpg   IMG_0874.jpg  
jmiraglia is offline   Reply With Quote
Old 05-11-2020, 12:46 PM   #19
Bus Crazy
 
kazetsukai's Avatar
 
Join Date: May 2017
Location: Athens, TN
Posts: 1,574
Year: 1999
Coachwork: Amtran
Chassis: International RE
Engine: International T444e
Rated Cap: 76
Quote:
Originally Posted by jmiraglia View Post
I have all lighting wired into a bank of relays that are controlled via arduino (each light is addressable either individually or as configured groups) (arduino is also subscribed to MQTT topic and publishes lighting changes so lights can be controlled/reported on via other network based services).

We use momentary push button switches that are wired into the arduino to allow physical control of lighting groups. (this also allows for any light switch to control any/all lights without needing network to be on, so we have a master switch at the door to turn all lights off).
You're doing more or less exactly what I'm doing with momentary buttons, with some differences under the hood.



I was also thinking of a top-down view of lights/appliances/etc so I could get status and metrics, as well as control everything from a touchscreen UI. Well done.
kazetsukai is offline   Reply With Quote
Old 05-11-2020, 12:50 PM   #20
Mini-Skoolie
 
Join Date: Feb 2018
Location: Philadelphia, PA
Posts: 12
Year: 1989
Coachwork: Crown
Chassis: Supercoach
Engine: Cummins 8.3L
I originally had an AMOLED touchscreen for my touch interface, but it was fragile and broke It was a beautiful looking display though. If you haven't already, checkout superhouse.tv, he makes/sells PCBs for momentary push buttons with RJ45 connectors already soldered on. It makes for some pretty clean wiring (even shielded if you need)
jmiraglia is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


» Featured Campgrounds

Reviews provided by

Powered by vBadvanced CMPS v3.2.3

All times are GMT -5. The time now is 10:06 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2024, vBulletin Solutions, Inc.