QTouch for Water Level Sensing

From Hackteria Wiki
Jump to: navigation, search

1 Sensor: Continous Setup

IMG 20150330 143629.jpg

Below you see some measurements using the QTouchADC capacitive sensing to monitor water level in a tube. During the measurement, I raise the level of the water in discret steps and then let it empty again. In the last part I physically touch my laptop or/and the wires between the arduino and the electrodes. The capacitive sensing seems to be ok to measure the water level from the outside, but of course there is major errors when you touch anything near the cables aswell. hmmmm... maybe shielded wires?

Having the electrode inside the tube gives me a much larger reading and less noise, but is not always wanted or possible in a real world setup.

Max measurement 120, steel electrode inside the tube

Non-contact electrodes are mounted on the outside of the tube on both side, one connected to the QTouch.sense channel the other to GND.

Max measurement 40, steel electrode taped outside the tube

Much more noise is present the laptop is plugged in and connected to the main power.

Test ringElectroide Inversed PLuggedIn outside.png

2 Sensor: Ring Setup at 2 different Levels

IMG 20150330 153711.jpg

In this second setup, i tried to use 2 channels of the QTouch capactive sensing to measure the passing of the water level at specific positions on the tube. A steel wire was wrapped around the tupe as a ring, one on the very bottom is connected to GND, 3-4 cm above is a first ring and on the top part a second one.

Testing the passing of the water level to a ring electrode, non-plugged and plugged to main power

In the code used, a reference measurement is made at the setup (start) and the LED or anything are triggered if the measured value jumps to a value higher > 15. Again of course, touch or coming close to the wires, of even changing their positions will heavily affect the measurement. so to recallibrate the tube needs to be empty, press reset and it's ok again. One could think of a self-calibrating code, analysing the difference and direction of the change in the measured values.

Testing with shielded wires

ShieldedWire capSense.jpg

Jajajaaa, this shielded wires... they seemed like an idea, but then... they shield against electric noise from the environment, not really "against" capacity, cos that's what they are! They have already quite a large capacity themselves...

so that means, if the shield is connected to ground and the wire inside goes to the sensing electrode, there will be already a large capacity being measured from the cable itself and almost no measureable change at the other end. but at least touching the cable will not change the measurement, and at the electrode/contact pad at the other end a clear "touch" signal can be detected. but not anymore these subtle changes of proximity or water levels.

i kinda had a feeling that this will not work. but always good to try.

maybe just use a parallel wire to reduce the proximity stuff along the wire...

Code Examples on Github