Wireless Level Sensor - Page 1
Forum section: electronics / projects

author: Connoiseur
author_rank: Regular Contributor
timestamp: September 16, 2015, 11:00:03 am
content: Hi everyone,I am building a water level sensor for overhead water tank. The requirements are:>It is supposed to sense the level of water send the information using 433MHz RF link to another MCU.>Should be standalone.> Should be low power as it is battery operated.> The transducer is capacitive type. (home made stuff, pair of painted aluminium strips capacitance = 427pF/cm of water; max height of water in the tank = 110cm: transducer can be tweaked in extreme cases)> Should be made using only commonly available parts.>Should not be very sensitive to temperature changes.OK details apart.I'm kinda stuck with the signal conditioning part and wondering which of the following two schemes would be better:(other methods are always welcome)1: This one uses square wave from the MCU pin to excite the circuit that consists of the sensor capacitor and a resistor in series. The output voltage is rectified filtered and sampled into the ADC. (as shown in the figure)2: Here a 555 timer IC is run as an astable multivibrator. Instead of the usual fixed value capacitor the sensor capacitor is used in its place. This changes the frequency of the generated square wave in response to the level of water. And as you might have guessed, yes I would count this frequency in the MCU.Any suggestions or comments??

author: nfmax
author_rank: Super Contributor
timestamp: September 16, 2015, 02:45:51 pm
content: Warning: unless your tank contains sterile, deionised water, your capacitive sensor WILL get covered with scale, biofilm, and in extreme cases, fish. This will affect the capacitance for a given water level. This may or may not be significant, but you should be aware of the problem! Of your two solutions, I prefer the astable multivibrator approach, as it allows averaging over many cycles to reduce noise and improve resolution.There are many approaches to temperature compensation, but since you are using an MCU, probably the simplest approach is to use a thermistor or IC sensor to measure the tank temperature, and apply compensation numerically (having first measured the temperature sensitivity of your sensor).A friend of mine tried the capacitive sensor approach, using ribbon cable as the sensor (alternate cores connected together as the two 'plates') but was defeated by biofilm - this was a rainwater tank, periodically 'sterilised' by adding (chlorinated) mains water. He switched over to using the 'eTape' sensor from Milone Technologieshttp://milonetech.com/with mixed success, mainly because you can't get the required 1" diameter plastic piping in the UK. At his suggestion, Milone now supply a fully packaged version of the eTape which should be OK. These resistive sensors include a temperature-compensation element, and are very easy to interface (one opamp and an ADC).Another approach is to mount the tank on a weight sensor (load cell) and track the change in weight.

author: Paul Moir
author_rank: Frequent Contributor
timestamp: September 16, 2015, 06:15:58 pm
content: Consider ultrasonic measurement from the tank lid too. The installation might be a lot easier, and it eliminates a lot of variables.Personally I would avoid load cells because of the difficulty of development and intolerance to a harsh environment. You have to compensate for temperature and drift you have to figure out, which would not be trivial on a water tank. It might be trivial if you don't need much accuracy though.

author: nfmax
author_rank: Super Contributor
timestamp: September 16, 2015, 06:49:51 pm
content: Problem with ultrasonics is the speed of sound depends on humidity as well as temperature. Under some conditions, you can get a reflection from a layer of cool, humid air just above the water surface, giving a false high level reading. It is possible to detect and compensate for this, but it's not trivial. Ultrasonic level measurement works well for an oil tank, though.

author: kripton2035
author_rank: Super Contributor
timestamp: September 16, 2015, 06:54:58 pm
content: I'm in the process of making one myself.with an esp8266 as main and only wifi+mcu, a small solar panel to power it, and a cheap waterproof ultrasonic sensor like this one:http://www.ebay.com/itm/Ultrasonic-Module-Distance-Measuring-Transducer-Sensor-Perfect-Waterproof-/321714364470

author: Paul Moir
author_rank: Frequent Contributor
timestamp: September 16, 2015, 07:36:35 pm
content: Quote from: nfmax on September 16, 2015, 06:49:51 pmI didn't know that, thank you!(EDIT: The circumstances part, not the temperature/humidity effects, which I just ignored. Looks like you can get 10%+ error from them alone in this application.)

author: e100
author_rank: Frequent Contributor
timestamp: September 17, 2015, 05:46:50 am
content: My experience with a self built capacitive sensor is that you need to use a hydrophobic insulating layer otherwise a thin film of water adheres to the electrode surface as the water level drops giving a false high reading. Commercial sensors tend to use a PTFE coating, but I don't know of any PTFE coating process that can be done by hobyists.Perhaps off the shelf PTFE insulated wire would be a better choice, but then you have the mechanical problem of making a moisture proof seal into the electronics enclosure as nothing sticks to PTFE and it cold flows under mechanical pressure.Also leaves and other contaminants tend to stick to electrodes giving false high readings, so you'll need to surround the electrodes with a mesh to keep them clean.

author: Connoiseur
author_rank: Regular Contributor
timestamp: September 17, 2015, 01:02:06 pm
content: Quote from: nfmax on September 16, 2015, 02:45:51 pmThanks for pointing out these issues. The tank is supposed to hold drinking water (not deionised or cleaned by other extreme means, but just directly from the municipal water supply, which I guess is definitely chlorinated and reasonably clean; no visible slime or whatever in the 6 yr old tank)Quote from: e100 on September 17, 2015, 05:46:50 amI tested my transducer for the whole day. After zeroing out the cable and other stray capacitances, I recorded the level v/s capacitance values. I observed the paint (common oil base type) is pretty awful at avoiding condensation. This introduces further error.Now what I'm thinking of is a really ancient technique -Place 16 reed switches at equal distances along the length of a pipe.Place a ferrite magnet (Nd ones rust horribly if kept in humid conditions) on a float such that it can slide up and down inside the pipe.Cover every metal with a generous amount of epoxy.Encode the 16 channels corresponding to different levels into 4. (using daisy chained two 8-3 priority encoder)Feed that into HT12E and bingo!

author: nfmax
author_rank: Super Contributor
timestamp: September 17, 2015, 01:30:56 pm
content: QuoteThat's another good technique. If you can find a donut-shaped float, it might be better to put the float outside the pipe and the reed switches inside, so you can seal the switches by fitting an end cap to the bottom & a compression gland on the top of the pipe. You might also use a resistor array with the switches to convert level to a DC voltage to be read by the ADC (this technique can also 'interpolate' nicely if the magnet activates two adjacent switches).

author: LaserSteve
author_rank: Super Contributor
timestamp: September 17, 2015, 02:35:57 pm
content: Our favorite tank sensors here at work use a floating, ring shaped magnet and a string of series resistors in a plastic pipe or more recently, a clear plastic tube backfilled with clear casto-lite resin. Each resistor has a reed switch across it. With care in choosing your resistors, or by adding a center tap to the string, you can easily come up with a very high resolution sensor. We can read our 60 litre tank to +/- 1 Litre by tracking the level with interpolation. The ring slides up and down the pipe.Steve

author: nfmax
author_rank: Super Contributor
timestamp: September 17, 2015, 02:39:58 pm
content: Quote from: LaserSteve on September 17, 2015, 02:35:57 pmThese are also available commercially:http://www.omega.co.uk/pptst/LVR20_30.html, but where's the fun in that?