{"id":681,"date":"2011-06-30T10:41:01","date_gmt":"2011-06-30T14:41:01","guid":{"rendered":"http:\/\/soulysolar.mudventions.com\/?p=681"},"modified":"2011-07-28T09:27:19","modified_gmt":"2011-07-28T13:27:19","slug":"capacitive-liquid-level-sensor","status":"publish","type":"post","link":"https:\/\/soulysolar.mudventions.com\/?p=681","title":{"rendered":"Capacitive Liquid Level Sensor"},"content":{"rendered":"<p>Capacitive sensors of all sorts have been an interest of mine. They become interesting when you start to discover the huge variety of applications they are used for. While doing research for the new Control Panel in our airstream, I came across a couple of varieties of what appear to be a capacitive liquid level sensor for tanks. The <a href=\"http:\/\/www.tankedge.com\/products.html\">TechEdge<\/a> moda sensors appear to be capacitive based if you download there <a href=\"http:\/\/www.tankedge.com\/downloads\/MODA_AutoCal_Manual.pdf\">moda sensor manual<\/a> and have a look.<\/p>\n<p>These sensors incorporate two sheet aluminum plates that when stuck in proximity to one another on the tank form a small capacitor between them. Filling the tank with water changes the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Dielectric\">dielectric<\/a> and therefor the capacitance. I decided to conduct a little experiment to see if I could do something similar.<\/p>\n<p><a href=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/Oscillator.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-682\" title=\"Oscillator\" src=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/Oscillator-300x169.png\" alt=\"\" width=\"300\" height=\"169\" srcset=\"https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/Oscillator-300x169.png 300w, https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/Oscillator.png 681w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><!--more-->The above simple circuit uses a schmitt trigger gate to produce a square wave.\u00a0 Basically the cap charges and discharges through the gate and the resistor.\u00a0 This happens over and over and the period of the resulting square wave depends on the value of the cap and resistor combined.\u00a0 Its a very neat little circuit and can be used for all <a href=\"http:\/\/www.beam-wiki.org\/wiki\/NuFlector\">sorts of stuff<\/a>.<\/p>\n<p>I took the basic circuit and replaced the capacitor with the aluminum plates on the tank. In my case I used a plastic 250 ml graduated cylinder. I cut a piece of\u00a0 of 2 inch aluminum foil tape in half and fixed one piece on either side of the flask. Then taped on wires with copper tape that has a conductive backing. That gave me a good connection to the aluminum foil tape without soldering. I measured the resistance to be less then an ohm so its making good contact.<\/p>\n<p><a href=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010001_800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-683 aligncenter\" title=\"OLYMPUS DIGITAL CAMERA\" src=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010001_800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010001_800-300x225.jpg 300w, https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010001_800.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010002.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-684 aligncenter\" title=\"OLYMPUS DIGITAL CAMERA\" src=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010002-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010002-300x225.jpg 300w, https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010002-1024x768.jpg 1024w, https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010002.jpg 1600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The output of the oscillator went to the scope and I was getting about 173kHz @ 250ml and about 208kHz @ 10ml so as the water level goes down the frequency goes up because the capacitor gets smaller. (I think thats right, scratches head)\u00a0 At any rate its quite a big difference in frequency and pretty easy to detect with a microcontroller.\u00a0 I quickly found a <a href=\"http:\/\/interface.khm.de\/index.php\/lab\/experiments\/arduino-frequency-counter-library\/\">frequency measuring library for the Arduino<\/a> and in a mere moments I had the display reading out the volume of the cylinder.\u00a0 Its amazing what you can do when you don&#8217;t have to re-invent the wheel and can instead use open source hardware and software.\u00a0 This would have taken me many hours to carve out on my own.\u00a0 Instead, it was almost trivial.<\/p>\n<p><a href=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010007_800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-696 aligncenter\" title=\"OLYMPUS DIGITAL CAMERA\" src=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010007_800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010007_800-300x225.jpg 300w, https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010007_800.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010004_800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-695 aligncenter\" title=\"OLYMPUS DIGITAL CAMERA\" src=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010004_800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010004_800-300x225.jpg 300w, https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010004_800.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Really not to bad for a quick hack.\u00a0 I am sure that the frequency is going to drift around with temperature etc&#8230;\u00a0 How much I don&#8217;t know.\u00a0 Its a long way from really being able to climb under the trailer and install.\u00a0 If the tank were not so hard to access I would be tempted to install it as is and just see what happens.\u00a0 But, its a 50 gallon tank under the floor, and hard to get at.\u00a0 Perhaps next, I could play with a 50 gallon rain barrel.\u00a0 We&#8217;ll just have to see where it goes, but for now, it looks promising.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/graph.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-697\" title=\"graph\" src=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/graph.png\" alt=\"\" width=\"416\" height=\"202\" srcset=\"https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/graph.png 867w, https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/graph-300x145.png 300w\" sizes=\"auto, (max-width: 416px) 100vw, 416px\" \/><\/a><\/p>\n<p>Pretty linear eh!!!<\/p>\n<p><a href=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010003_800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-694\" title=\"OLYMPUS DIGITAL CAMERA\" src=\"http:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010003_800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010003_800-300x225.jpg 300w, https:\/\/soulysolar.mudventions.com\/wp-content\/uploads\/2011\/06\/P1010003_800.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Capacitive sensors of all sorts have been an interest of mine. They become interesting when you start to discover the huge variety of applications they are used for. While doing research for the new Control Panel in our airstream, I came across a couple of varieties of what appear to be a capacitive liquid level [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,13,7],"tags":[],"class_list":["post-681","post","type-post","status-publish","format-standard","hentry","category-airstream","category-controlpanel","category-electronics"],"_links":{"self":[{"href":"https:\/\/soulysolar.mudventions.com\/index.php?rest_route=\/wp\/v2\/posts\/681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soulysolar.mudventions.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soulysolar.mudventions.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soulysolar.mudventions.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/soulysolar.mudventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=681"}],"version-history":[{"count":22,"href":"https:\/\/soulysolar.mudventions.com\/index.php?rest_route=\/wp\/v2\/posts\/681\/revisions"}],"predecessor-version":[{"id":740,"href":"https:\/\/soulysolar.mudventions.com\/index.php?rest_route=\/wp\/v2\/posts\/681\/revisions\/740"}],"wp:attachment":[{"href":"https:\/\/soulysolar.mudventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soulysolar.mudventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soulysolar.mudventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}