Capacitive sensing ...
 
Notifications
Clear all

Capacitive sensing to determine liquid level

41 Posts
5 Users
3 Likes
3,535 Views
(@tduncklee)
Member
Joined: 3 years ago
Posts: 9
Topic starter  

This may be limited in interest but I'd like to be able to sense the presence of water through a plastic tank. I attempted it with limited success but have not given up yet. I'm sure there is a way. I understand the teensy has some special circuitry that makes capacitive sensing more accurate but I've not tried it yet. I'd either like to have a continuous strip of copper on the outside of the tank that allows me to sense the level or 3 or 4 separate pieces of copper and just get the 3 or 4 indications.

 

I absolutely love your videos! 😁


   
Quote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@tduncklee

Posted by: @tduncklee

This may be limited in interest but I'd like to be able to sense the presence of water through a plastic tank. I attempted it with limited success but have not given up yet. I'm sure there is a way. I understand the teensy has some special circuitry that makes capacitive sensing more accurate but I've not tried it yet. I'd either like to have a continuous strip of copper on the outside of the tank that allows me to sense the level or 3 or 4 separate pieces of copper and just get the 3 or 4 indications.

 

I absolutely love your videos! 😁

There are many YouTube videos showing exactly how to do that with a capacative proximity sensor from eBay and many other places for dirt cheap < $5.

Cheers.


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 
Posted by: @frogandtoad

@tduncklee

Posted by: @tduncklee

This may be limited in interest but I'd like to be able to sense the presence of water through a plastic tank. I attempted it with limited success but have not given up yet. I'm sure there is a way. I understand the teensy has some special circuitry that makes capacitive sensing more accurate but I've not tried it yet. I'd either like to have a continuous strip of copper on the outside of the tank that allows me to sense the level or 3 or 4 separate pieces of copper and just get the 3 or 4 indications.

 

I absolutely love your videos! 😁

There are many YouTube videos showing exactly how to do that with a capacative proximity sensor from eBay and many other places for dirt cheap < $5.

Cheers.

FYI: - Here is a video describing their operation and application - These sensors are relatively affordable:

Capacitive Sensor Explained

Here is an even smarter one: ifm capacitive sensors

Cheers.


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 
Posted by: @tduncklee

This may be limited in interest but I'd like to be able to sense the presence of water through a plastic tank. I attempted it with limited success but have not given up yet. I'm sure there is a way. I understand the teensy has some special circuitry that makes capacitive sensing more accurate but I've not tried it yet. I'd either like to have a continuous strip of copper on the outside of the tank that allows me to sense the level or 3 or 4 separate pieces of copper and just get the 3 or 4 indications.

This will work through a plastic container.

XKC Y25 PNP Non Contact Liquid Level Sensor

Do a search on Amazon for "XKC-Y25-PNP Non-Contact Liquid Level Sensor"

 

If you are interested in this technology I will look for a "how to" for Arduino.


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 

To @byron @will We've been wrestling with measuring water in a tank and one of the ideal ways to do so was always from outside the tank.

@tduncklee started this thread with "This may be limited in interest but I'd like to be able to sense the presence of water through a plastic tank. I attempted it with limited success but have not given up yet. I'm sure there is a way. I understand the teensy has some special circuitry that makes capacitive sensing more accurate but I've not tried it yet. I'd either or 3 or 4 separate pieces of copper and just get the 3 or 4 indications."

@byron There is a really interesting YouTube video pointed out above and I am repeating the reference:

What is interesting for us is although the video is not the XKC-Y25-PNP Non-Contact Liquid Level Sensor we've been exploring, the video shows that by adjusting the sensor, and the XKC-Y25-PNP has the same type of adjustment available, it might not be so important to have the sensor on a flat surface, as I thought. 

I am intrigued by @tduncklee's desire for

"like to have a continuous strip of copper on the outside of the tank that allows me to sense the level"

So it seems that the XKC-Y25-PNP is a capacitor, don't think I knew that!. Could we in this forum design and develop one that is continuous that works outside the tank, or am I just "Pie in the Sky".  I know there are capacitor level sensors that work inside the tank.  Could we somehow marry the technology?

For the benefit of those watching this thread this is a pretty good video that explains capacitors for liquid measurement and shows how to build one:


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1112
 

@wamagee

Thats something well worth exploring.  Right now I have to get my paint job finished before I get my annual flue jab tomorrow which sometimes means I get to rest up for a day or so.  That will be a good time for me to look at those videos, so will make a more considered comment in a day or so.  

Also I think the pressure sensor as show in the water tank project recently discussed is worth a closer look as it only appears to require one wire to the sensor which you may find you could dangle through the IBC tank opening.  This appears to have the benefit of proven path to measuring the water depth though how accurate or the cost of such sensors I have not looked at.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1112
 

@wanagee @will

and some more reading as I see that the teensy board was mentioned in relation to capacity sensing.

https://www.pjrc.com/teensy/td_libs_CapacitiveSensor.html


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 
Posted by: @byron FYI: @will

Also I think the pressure sensor as shown in the water tank project recently discussed is worth a closer look as it only appears to require one wire to the sensor which you may find you could dangle through the IBC tank opening. 

When I started the "Introducing Myself with my irrigation project" AND I AM NOT EXPECTING THAT YOU @byron READ AND/OR RECALL anything here but a pressure sensor was my favorite back then and posting this more for the interest of those wondering into this new, and exciting to me, thread solely dealing with liquid level measurement.

Posted By: @wamagee on 2021-09-19 10:35 am when he started "Introducing Myself with my irrigation project" thread.

The problem I am currently working on is how to accurately measure tank water levels. Measurements needed at a minimum would be start and stop fill levels for both the irrigation and city water supplies. These values, especially city water, will need adjusted until I figure out optimum values. It would also be really nice to be able to report how much water is in the tanks at any time. So far I've found four basic approaches: 1) A device in bottom of tank that measures water pressure; 2) An ultrasonic sensor like the hc-sr04 in the top of the tank that measures distance from top of tank top top of water; 3) An array of Non-contact Digital Water Level Sensor connected to the outside of the tank; and 4) devices that you drop into the tank that work something like #1 measuring water pressure.

 

Of the above options #4 looks real simple but cost prohibitive and #3 is not desirable since it would require a minimum of 4 devices that would need to be physically moved when adjusting for optimal levels, and then several more devices to report water levels.

 

Option #1 at first glance seemed to be the perfect solution. Simply install in bottom of tank and work with the values it returns. BUT, when my 1 hp pump is pulling water from the tanks I am afraid pressure readings will be significantly changed and so water level computations will not be dependable.

 

Option #2 ultrasonic sensor like the hc-sr04 seems to be a great approach. A significant issue is reasonably inexpensive units that are weather proof need to be almost 12” above top of tank to measure when the tank is full. The hc-sr04 has fantastic accuracy and minimum range and I am really thinking hard about how to weatherproof it. Any suggestions on weather proofing this hc-sr04 gem would be greatly appreciated.

Still #1 seems to be the best solution and the one that drops in the tank is no different, it measures pressure and can be extremely accurate. A foot, two feet, three feet, ... of water has a specific pressure that can then be used to compute volume of water based on tank dimensions. The issue that lead me away from using pressure was that when my pump starts it will affect pressure. 

But with this response I just thought of something. Why not use a relatively cheap pressure sensor in the bottom of my Measurement Stack to validate the ultrasonic sensors when the pump is not running and Drip system is not pulling water.  This would be the same pressure sensor I am using to verify that water input from City Water and River Water are available.  Any thoughts?

 


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 
Posted by: @wamagee

To @byron @will We've been wrestling with measuring water in a tank and one of the ideal ways to do so was always from outside the tank.

@tduncklee started this thread with "This may be limited in interest but I'd like to be able to sense the presence of water through a plastic tank. I attempted it with limited success but have not given up yet. I'm sure there is a way. I understand the teensy has some special circuitry that makes capacitive sensing more accurate but I've not tried it yet. I'd either or 3 or 4 separate pieces of copper and just get the 3 or 4 indications."

@byron There is a really interesting YouTube video pointed out above and I am repeating the reference:

What is interesting for us is although the video is not the XKC-Y25-PNP Non-Contact Liquid Level Sensor we've been exploring, the video shows that by adjusting the sensor, and the XKC-Y25-PNP has the same type of adjustment available, it might not be so important to have the sensor on a flat surface, as I thought. 

That sensor requires either 24V or 48V (depending on what he means by 24v plus and 24V minus) and only indicates water is present at a particular point.

That sort of limits its utility to "is the water here ? now". It can't measure change in height nor direction of flow - is it really worth adding a new voltage and support circuitry for such a one-trick pony ?

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 
Posted by: @wamagee

But with this response I just thought of something. Why not use a relatively cheap pressure sensor in the bottom of my Measurement Stack to validate the ultrasonic sensors when the pump is not running and Drip system is not pulling water.  This would be the same pressure sensor I am using to verify that water input from City Water and River Water are available.  Any thoughts?

I think it counts as a new (potential) solution because the original discussions didn't immediately include the concept of the external stack.

Do you have any particular product in mind so we can check out the accuracy and stability under temperature changes (freezing, I'm looking at you 🙂

Also, depending on the size of the sensor, you may need to increase from a 4" stack to make sure that water flows in and out freely (especially when the pump is running).

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 
Posted by: @will

I think it counts as a new (potential) solution because the original discussions didn't immediately include the concept of the external stack.

Do you have any particular product in mind so we can check out the accuracy and stability under temperature changes (freezing, I'm looking at you

Here is Amazon link to ones that I got to measure input pressure for City and River water. 

https://www.amazon.com/gp/product/B07KK64MC7/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1

 

Posted by: @will

Also, depending on the size of the sensor, you may need to increase from a 4" stack to make sure that water flows in and out freely (especially when the pump is running).

Thinking that 4" or different stack size has NO influence on water flowing out of tank.  Thing is the PVC that feeds the irrigation system is 2".

Backflow Prevention For Forum Overview V003

Does this help or is there something I am missing in what you said?


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 
Posted by: @wamagee
Posted by: @will

I think it counts as a new (potential) solution because the original discussions didn't immediately include the concept of the external stack.

Do you have any particular product in mind so we can check out the accuracy and stability under temperature changes (freezing, I'm looking at you

Here is Amazon link to ones that I got to measure input pressure for City and River water. 

https://www.amazon.com/gp/product/B07KK64MC7/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1

Perfect, thanks.

 

Posted by: @will

Also, depending on the size of the sensor, you may need to increase from a 4" stack to make sure that water flows in and out freely (especially when the pump is running).

Thinking that 4" or different stack size has NO influence on water flowing out of tank.  Thing is the PVC that feeds the irrigation system is 2".

Backflow Prevention For Forum Overview V003

Does this help or is there something I am missing in what you said?

I had no idea what such pressure meter would look like, I imagined it to be larger. So I was thinking that its size might fill the 4" pipe and impede water flowing in or out. The sample part you indicated above looks tiny, so the part about larger pipe is irrelevant.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 
Posted by: @will FYI:byron

That sensor requires either 24V or 48V (depending on what he means by 24v plus and 24V minus) and only indicates water is present at a particular point.

That sort of limits its utility to "is the water here ? now". It can't measure change in height nor direction of flow - is it really worth adding a new voltage and support circuitry for such a one-trick pony ?

My objective in pointing out this video

was not that it would be a candidate for use in my Irrigation System but it demonstrates that it may not be necessary to have the XKC-Y25-PNP Non-Contact Liquid Level Sensor on a flat surface as we've previously discussed.  I do believe that @byron was interested in how to secure the XKC-Y25-PNP Non-Contact Liquid Level Sensor, I think?


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 
Posted by: @will

I had no idea what such pressure meter would look like, I imagined it to be larger. So I was thinking that its size might fill the 4" pipe and impede water flowing in or out. The sample part you indicated above looks tiny, so the part about larger pipe is irrelevant.

Glad we could clear that up!


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 
Posted by: @wamagee
Posted by: @will FYI:byron

That sensor requires either 24V or 48V (depending on what he means by 24v plus and 24V minus) and only indicates water is present at a particular point.

That sort of limits its utility to "is the water here ? now". It can't measure change in height nor direction of flow - is it really worth adding a new voltage and support circuitry for such a one-trick pony ?

My objective in pointing out this video

[snipt]

was not that it would be a candidate for use in my Irrigation System but it demonstrates that it may not be necessary to have the XKC-Y25-PNP Non-Contact Liquid Level Sensor on a flat surface as we've previously discussed.  I do believe that @byron was interested in how to secure the XKC-Y25-PNP Non-Contact Liquid Level Sensor, I think?

Yes, and it also seems that it doesn't even have to be touching the pipe, which opens up all kinds of alternatives to mounting it !

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Page 1 / 3