Round water tank level sensor
-
I've been searching online for a project like this and it looks great. I'm doing something similar with an oil tank and have everything up and running, but the sketch I'm using is really basic, it just returns distance to oil level. Is it possible to change your sketch to allow for a rectangular tank, rather than cylindrical?! I'm an absolute beginner when it comes to coding unfortunately so any advice would be great. Thanks.
@Huw-Thomas Not so much a coding issue Huw, it's basic mathematics once you have the depth to surface and the cross section is a constant over the range.
You will know or be able to measure the height from the sensor head to the outlet and the full mark. Everything between is a proportion of height multiplied by floor area whether it is capacity or spare capacity... -
I've been searching online for a project like this and it looks great. I'm doing something similar with an oil tank and have everything up and running, but the sketch I'm using is really basic, it just returns distance to oil level. Is it possible to change your sketch to allow for a rectangular tank, rather than cylindrical?! I'm an absolute beginner when it comes to coding unfortunately so any advice would be great. Thanks.
-
Yes I realise that , I just wasn't sure at first where I needed to change things in the sketch. I think I've worked it out. I have zero experience in reading programming code so couldn't at first find the PiR^2h equation to change it, but now I've found it.
-
Yes I realise that , I just wasn't sure at first where I needed to change things in the sketch. I think I've worked it out. I have zero experience in reading programming code so couldn't at first find the PiR^2h equation to change it, but now I've found it.
@Huw-Thomas Sounds like you are heading in the right direction.
The water percent available calculation should work unaltered for a rectangular tank and you have already foundwaterAvail = PI* pow(tankRad,2)*(((fullHeight-outletHeight)+sensHeight)-pingHeight)/1000; // calculate water available in litresThat is the line that will need the change with the suggestions from above.
-
@Boots33 Have you thought about sending the days available. i.e. calculate daily usage and divide that by the water that is still available? would have to roll the numbers i.e. say take the last two weeks of how much the water dropped in a day averaged out... if that makes sense. :)
-
@Boots33 Have you thought about sending the days available. i.e. calculate daily usage and divide that by the water that is still available? would have to roll the numbers i.e. say take the last two weeks of how much the water dropped in a day averaged out... if that makes sense. :)
@lawrence-helm The tank that I am monitoring is used primarily for garden watering and topping up the pool, so it does not really have a regular sort of use. We also live in an area of frequent rainfall so the tank can stay at 100% for weeks on end.
I can see that your idea would be a good addition to the sketch if the tank was to be used for general house duties where more frequent use would likely give a more meaningful result.
-
Sorry for bumping up an old question but I’m in the same boat of requirement.
And to my surprise there are quite a few new sensors in town:
This one has 2 transducers instead of 1 therefore has less minimum detection distance as compared to JSN SR04T. It is also completely sealed and waterproof.
Ebay spam link removed by moderator
Before finalizing on this I had bought another one which was a waterproof modified version of HC-SR04 from here
Ebay spam link removed by moderator
The 1st one is much more rugged and waterproof as compared to the latter one.
-
Sorry for bumping up an old question but I’m in the same boat of requirement.
And to my surprise there are quite a few new sensors in town:
This one has 2 transducers instead of 1 therefore has less minimum detection distance as compared to JSN SR04T. It is also completely sealed and waterproof.
Ebay spam link removed by moderator
Before finalizing on this I had bought another one which was a waterproof modified version of HC-SR04 from here
Ebay spam link removed by moderator
The 1st one is much more rugged and waterproof as compared to the latter one.
@ritesh-t If you have not already found it you may also benefit from the thread by @zboblamont which can be found here. It addresses some issues of unstable readings that were occurring when the water in the tank was at a lower level.
-
@ritesh-t If you have not already found it you may also benefit from the thread by @zboblamont which can be found here. It addresses some issues of unstable readings that were occurring when the water in the tank was at a lower level.
@boots33 To be fair that was specific to the SR04-2.0, the technology has moved on a bit since non-waterproof twin head devices were the standard, but I confess having discovered the error it verifies with the Class-D quality water meter on the house-side. I may have to recalibrate the Litres/mm but the tank shape is not uniform cross section.
@Ritesh-T All you can do is try the version you bought, but the original suffered badly inside a sealed tank where moisture was very high indeed, and housing it to protect the board may prove tricky. That was my reasoning for going with the parking sensor button type with remote board, plus the sensor is a snug fit in the end of 3/4" pipe/socket. The only recurring problem is condensation below -10c, perhaps your environment is different or have better luck with yours. -
I made a sensor like this myself. i took a non-water proof one and drilled holes to match the sensor in some plexiglass. and sealed around it with silicone. This worked until florida tried to drowned me out and flooded my entire sensor housing lol
-
I made a sensor like this myself. i took a non-water proof one and drilled holes to match the sensor in some plexiglass. and sealed around it with silicone. This worked until florida tried to drowned me out and flooded my entire sensor housing lol
@crankycoder
Bad luck on the storm, presumably a weatherproof box lid/side drilled out per your plexiglass original was the next version? -
Sorry for bumping up an old question but I’m in the same boat of requirement.
And to my surprise there are quite a few new sensors in town:
This one has 2 transducers instead of 1 therefore has less minimum detection distance as compared to JSN SR04T. It is also completely sealed and waterproof.
Ebay spam link removed by moderator
Before finalizing on this I had bought another one which was a waterproof modified version of HC-SR04 from here
Ebay spam link removed by moderator
The 1st one is much more rugged and waterproof as compared to the latter one.
@ritesh-t I presume you are aware the device you bought is 5v?
Not so sure of their claim that the reduced blind-spot of 2cm is down to dual diaphragms, the original dual from memory had the same 20cm blind-spot as the remote and also was 5v only. -
@crankycoder
Bad luck on the storm, presumably a weatherproof box lid/side drilled out per your plexiglass original was the next version?@zboblamont actually it was more of a "not completed" type of thing. i didn't finish the connection between the bottom part that houses the sensor and the top cap. so it got knocked over and water soaked in. so i will be redoing it and will just complete it this time :)
-
I have problems with the same sensor, the minimum or shortest measurement is 40 cm, and yet in its technical characteristics it says that the minimum is 20 cm.
Will we have to calibrate something?
Thank you
-
interesting, i will buy same sensor too