Author Topic: Wireless Level Sensor  (Read 4433 times)

0 Members and 1 Guest are viewing this topic.

Offline ConnoiseurTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: in
Wireless Level Sensor
« on: September 16, 2015, 11:00:03 am »
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??
 

Offline nfmax

  • Super Contributor
  • ***
  • Posts: 1604
  • Country: gb
Re: Wireless Level Sensor
« Reply #1 on: September 16, 2015, 02:45:51 pm »
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 Technologies http://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.
 

Offline Paul Moir

  • Frequent Contributor
  • **
  • Posts: 926
  • Country: ca
Re: Wireless Level Sensor
« Reply #2 on: September 16, 2015, 06:15:58 pm »
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.
 

 

Offline nfmax

  • Super Contributor
  • ***
  • Posts: 1604
  • Country: gb
Re: Wireless Level Sensor
« Reply #3 on: September 16, 2015, 06:49:51 pm »
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.
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2683
  • Country: fr
    • kripton2035 schematics repository
Re: Wireless Level Sensor
« Reply #4 on: September 16, 2015, 06:54:58 pm »
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
 

Offline Paul Moir

  • Frequent Contributor
  • **
  • Posts: 926
  • Country: ca
Re: Wireless Level Sensor
« Reply #5 on: September 16, 2015, 07:36:35 pm »
Problem with ultrasonics...
I 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.)
« Last Edit: September 16, 2015, 07:41:49 pm by Paul Moir »
 

Offline e100

  • Frequent Contributor
  • **
  • Posts: 605
Re: Wireless Level Sensor
« Reply #6 on: September 17, 2015, 05:46:50 am »
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.
« Last Edit: September 17, 2015, 06:28:22 am by e100 »
 

Offline ConnoiseurTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: in
Re: Wireless Level Sensor
« Reply #7 on: September 17, 2015, 01:02:06 pm »
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 Technologies http://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.

Thanks 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)


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.


I 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!
 

Offline nfmax

  • Super Contributor
  • ***
  • Posts: 1604
  • Country: gb
Re: Wireless Level Sensor
« Reply #8 on: September 17, 2015, 01:30:56 pm »
Quote
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!
That'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).
 

Offline LaserSteve

  • Super Contributor
  • ***
  • Posts: 1347
  • Country: us
Re: Wireless Level Sensor
« Reply #9 on: September 17, 2015, 02:35:57 pm »
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   
"What the devil kind of Engineer are thou, that canst not slay a hedgehog with your naked arse?"

I am an unsullied member of the "Watched"
 

Offline nfmax

  • Super Contributor
  • ***
  • Posts: 1604
  • Country: gb
Re: Wireless Level Sensor
« Reply #10 on: September 17, 2015, 02:39:58 pm »
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   
These are also available commercially: http://www.omega.co.uk/pptst/LVR20_30.html, but where's the fun in that?  :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf