Charge transfer capacitance measurement

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I need to measure the level of water inside a tank with a plastic wall about 5mm thick, but since this is just an hobby project I'm in no hurry. I will use a capacitance sensor to detect the water level in a non invasive way, since the water is ultra-pure so I don't want to put any sensors inside the tank.

 

Water has a high dielectric constant, so it should be easily detected by this method.

 

I want to use the charge transfer method, like QTouch does, but I don't want to use the library, I don't like the opacity of everything QTouch related, especially those AVR chips that have QTouch peripherals with undocumented interfaces. C'mon, is a touch interface really such a big deal it has to be kept under such secrecy? Please...

Well, sorry for the rant.

 

I will follow the info in the World version of the QTouch  patent, WO0031553 (A1), and this document from Cypress. I also read this thread, seems the poster got it but was afraid to post the code because QTouch is patented.

 

Should I care about that, since the patent has lapsed in my country and in most of Europe?

Has anyone implemented this method without the QTouch library and could share some useful links?

Regarding the sensor, what shape should it have for best sensitivity? It needs immunity from people moving near the tank.

 

Finally, here is a pic from the patent, showing exactly what I want to do:

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You say you need to measure the level inside the tank but is that the absolute level of water from 0% to 100% or just a point at which the system says that the tank is full?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just detect if it's full.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

to detect the water level in a non invasive way

Sorry, I don't have an answer regarding the QTouch methodology.

 

I'd just mention that alternative "touchless" approach is to put a $2 (USD) HC-SR04 ultrasonic module above the water looking down at the water surface, and measuring the height to the water surface.

 

This is an incredibly cheap sensor, and it works well.

 

It is very easy to interface to a micro, just pulse the Trigger pin and read the pulse width on the Echo pin.

 

JC  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, I'll look into it.

 

Edit: couldn't fight my Ebay purchasing addiction and ordered a pair: http://www.ebay.com/itm/2PCS-Ultrasonic-Sensor-Module-HC-SR04-Distance-Measuring-Sensor-for-arduino-SR04-/311452271386

Last Edited: Mon. Feb 6, 2017 - 06:44 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I already obtained some results, using the assembly described by Atmel:

 

 

 

For my test I used Cs = 33nF and a 68pF cap to simulate the capacitance sensor (a bit high I suppose, next I'll try with 10pF). The resistor is 1k as recommended. Here is the waveform obtained at SNSK with the program I wrote:

 

 

So the method works in perfectly controlled conditions. It's a start.

 

Main source; include file.

 

Edit: forgot to say test chip is an ATmega168PA@16MHz (Arduino Pro Mini)

Last Edited: Tue. Feb 7, 2017 - 02:17 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Congratulations on your success. I had a liquid level problem that I tried to solve in a similar way. ( Prototype was fine -- there were physical restrictions in the actual system that made it impossible.

 

Anyway, not knowing anything about QTouch, I just did the following.

 

Made a 555 oscillator and sent the output to a metal plate on one side of the container. Put another plate on an adjacent side. I could fairly easily detect the increase in signal when water was even with the plates.

 

I first saw something like that when I owned an RV. The water tank had metallic tape strips on the side with wires leading off somewhere. These apparently fed the water level indicator on a litttle indicator panel.

 

Just relating my experiences. Good Luck with your project.

 

hj

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the info, I'll test that also, in my case access to adjacent sides is possible. And I did tried a few experiments with a 555 before going for the micro, and also with a lm339, for me it's easier to set up a few analog experiments quickly just to see if it kind of works before going for the MCU and having to start coding wink