Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 00:06 15 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Water Level with Micromite

     Page 1 of 2    
Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 04:20pm 08 Aug 2015
Copy link to clipboard 
Print this post

I wish to use a micromite to measure water level in my tanks (2X poly and 2X concrete)and I vaguely remember a post that mentioned using twisted pair cable as the sensor. Can anyone elaborate on how this process works, was it capacitive?
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 07:39pm 08 Aug 2015
Copy link to clipboard 
Print this post

Hi Graeme,

I too am interested in doing something like that.. I have a 2200lt Poly tank about 2.5m high that I would like to monitor..

Mik
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 07:54pm 08 Aug 2015
Copy link to clipboard 
Print this post

  bigmik said   Hi Graeme,

I too am interested in doing something like that.. I have a 2200lt Poly tank about 2.5m high that I would like to monitor..

Mik


I did think of using the ultrasonic sender mounted under the top of the tank and the distance function to measure the height of the water but I dont think that the sender would put up with the moisture for very long. This is why I would like to explore the twisted pair as a sensor as it can be completely moisture proof.
My first step is to get the micromite to measure the water level and display on a led ladder. The second step is to wirelessly report each tank level back to a display in the house.
GM
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 08:36pm 08 Aug 2015
Copy link to clipboard 
Print this post

I am using some DYP-ME007Y modules for water level sensors in my tanks. They work the same as the HC-SR04 but use a single waterproof transducer with a long lead. They appear to be the same sensors that are used in car parking sensors.

I mounted the sensor in a bit of conduit and lots of silicon. A hole in the top of the tank and more silicon finished the job.

The electronics are in a box on the side of the tanks and the micromite and RPi are in the pump house.

They have been in place for a few months now and give good consistent readings.
The only problem I have is with the poly tank. The tank expands in the hot weather and that lifts the sensor up a bit. I wondered why we were using so much water during the day until I sussed that one out.

The concrete tank behaves better.

Jim


VK7JH
MMedit   MMBasic Help
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 09:55pm 08 Aug 2015
Copy link to clipboard 
Print this post

  TassyJim said   I am using some DYP-ME007Y modules for water level sensors in my tanks. They work the same as the HC-SR04 but use a single waterproof transducer with a long lead. They appear to be the same sensors that are used in car parking sensors.

I mounted the sensor in a bit of conduit and lots of silicon. A hole in the top of the tank and more silicon finished the job.

The electronics are in a box on the side of the tanks and the micromite and RPi are in the pump house.

They have been in place for a few months now and give good consistent readings.
The only problem I have is with the poly tank. The tank expands in the hot weather and that lifts the sensor up a bit. I wondered why we were using so much water during the day until I sussed that one out.

The concrete tank behaves better.

Jim


Jim, do you need a pair of DYP-ME007Y's for each?
GM
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 10:17pm 08 Aug 2015
Copy link to clipboard 
Print this post

  Graeme Meager said  
Jim, do you need a pair of DYP-ME007Y's for each?
GM


No they come as a control board with the same interface to the MM and a ~2M lead to a single transducer.

I have seen ones on ebay with 4 transducers but I kept it simple - one board with a single transducer per tank.

This is the test code I used.
' PumpHouse
' Feb 2015
SETPIN 15, CIN
SETPIN 16, CIN
SETPIN 17, CIN
SETPIN 18, CIN

SETTICK 299950, doread

doread
DO
k$=INKEY$
IF k$<>"" THEN doKey
LOOP

END

SUB doKey
DO
k$=INKEY$
LOOP UNTIL k$=""
PAUSE 100
Doread
END SUB

SUB Doread
flow1=PIN(15)
flow2=PIN(16)
flow3=PIN(17)
flow4=PIN(18)
L1=flow1/330 MOD 1000000' garden
L2=flow2/330 MOD 1000000' padock
L3=flow3/280 MOD 1000000' bore pump
L4=flow4/330 MOD 1000000' house water

range1 = DISTANCE(26,25)' house tank
vol1 = (227 - range1)*94
PAUSE 100
range2 = DISTANCE(26,24)' garden tank, full = 29.0
vol2 = (260 - range2)*80
PRINT TIME$+","+STR$(range1,4,1," ")+","+STR$(range2,4,1," ")+","+STR$(vol1,6,0," ")+","+STR$(vol2,6,0," ")+",";
PRINT STR$(L1,8,0," ")+","+STR$(L2,8,0," ")+","+STR$(L3,8,0," ")+","+STR$(L4,8,0," ")
'PRINT
END SUB
' end


There are 4 flow meters and two range transducers.

With the range, I used a common trigger pin and individual echo pins. That way I saved a few pins and it doesn't matter if all transducers are fired at once, you just read the one you are interested in.

They are about $15-20 on ebay. Search for DYP-ME007Y.

The minimum distance is 30cm so I had to mount them in the middle of the tank, at the top of the peak.

For the flow meters, I tried the ones from Jaycar but they only lasted a few years so I now have some ebay ones. Time will tell how long they last.

Jim




VK7JH
MMedit   MMBasic Help
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 01:13pm 09 Aug 2015
Copy link to clipboard 
Print this post

Thanks Jim,
I can see the transducers working in the poly tanks but the concrete tanks have flat concrete tops and fill to 100mm of the top. I would like to investigate the twisted pair wire sensor thing as I can see it being easier to implement. I hope someone can steer me in the right direction of this method.
GM
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 02:58pm 09 Aug 2015
Copy link to clipboard 
Print this post

  Quote  I wish to use a micromite to measure water level in my tanks (2X poly and 2X concrete)and I vaguely remember a post that mentioned using twisted pair cable as the sensor. Can anyone elaborate on how this process works, was it capacitive?


Hi Graeme,

I think that might have been mine. Originally written for a PIC 675/629.
It was capacitive and worked off one pin. The cable wasn't a twisted pair, rather a spiral pair wrapped around a length of conduit to increase the overall length of the cable. The capacitance of the cable varied as the depth of water and consequently, the dielectric constant. The ends of the cable in the water were well insulated.

The details are buried in my files somewhere but I'll search a bit more.

From memory, the cable (capacitor) connected to an I/o pin and ground. The I/o pin also connected to +5v via a resistor to give an appropriate time constant. The "capacitor" was held at zero by the I/o pin until a "read" was initiated, i.e.,the comparator and the counter was enabled.

The result wasn't linear but a bit of a play with the resistor and a lookup table gave acceptable results.

I don't know if the uM is fast enough, but I only ran the pic at 4MHz, so.....?

David M.
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 04:22pm 09 Aug 2015
Copy link to clipboard 
Print this post

Thanks David, sounds promising.
GM
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 09:39pm 21 Aug 2015
Copy link to clipboard 
Print this post

@David, I was wondering if you found any buried in your files.

Had a bit of a play today using the figure 8 cable. I can see a change in capacitance as it is immersed in water. I was measuring the change by running the PWM out of one pin and reading across the varying capacitance to a schottky diode and capacitor rectifying the AC signal and fed in an analog pin. Experiments have shown that strangely the lower frequencies have more effect even though the varying capacitance is in the pF range.
GM
 
shoebuckle
Senior Member

Joined: 21/01/2012
Location: Australia
Posts: 189
Posted: 10:24pm 21 Aug 2015
Copy link to clipboard 
Print this post

It would be nice to have an in-house display, but if you don't need an at-a-glance display and you have a plastic tank, just use a stud finder. Works a treat (but isn't a nice techie solution). That's what I use.

Cheers,
Hugh
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 01:56pm 22 Aug 2015
Copy link to clipboard 
Print this post

  Graeme Meager said   I can see a change in capacitance as it is immersed in water. I was measuring the change by running the PWM out of one pin and reading across the varying capacitance to a schottky diode and capacitor rectifying the AC signal and fed in an analog pin.

When I tried to use the 'mite for measuring capacitance, I found it easier to use a 555 (or 7555) to give a variable frequency.
It works well but is another chip in the mix.

Jim
VK7JH
MMedit   MMBasic Help
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 09:58pm 22 Aug 2015
Copy link to clipboard 
Print this post

  TassyJim said  
  Graeme Meager said   I can see a change in capacitance as it is immersed in water. I was measuring the change by running the PWM out of one pin and reading across the varying capacitance to a schottky diode and capacitor rectifying the AC signal and fed in an analog pin.

When I tried to use the 'mite for measuring capacitance, I found it easier to use a 555 (or 7555) to give a variable frequency.
It works well but is another chip in the mix.

Jim

I am trying the KISS strategy both for reliability and low power requirements. I am about to experiment with different types of twin cable. Maybe larger conductors and thinner insulation might lead to higher capacitance ?
GM
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 10:19pm 22 Aug 2015
Copy link to clipboard 
Print this post

Thinner insulation should give higher capacitance.
Different types of "plastic" will also give different capacitance.
I am not sure about the inductance of the twin-lead and how it affects things.

I used to twist short lengths of hookup wire to get low value capacitors.
I also use short coax as capacitors but that wouldn't suit your water level gauge.

For low power, the cmos 7555 is very good.

The Maxim ICM7555 datasheet quotes ~100uA at 2V.

Jim
VK7JH
MMedit   MMBasic Help
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 10:34pm 22 Aug 2015
Copy link to clipboard 
Print this post

  TassyJim said   Thinner insulation should give higher capacitance.
Different types of "plastic" will also give different capacitance.
I am not sure about the inductance of the twin-lead and how it affects things.

I used to twist short lengths of hookup wire to get low value capacitors.
I also use short coax as capacitors but that wouldn't suit your water level gauge.

For low power, the cmos 7555 is very good.

The Maxim ICM7555 datasheet quotes ~100uA at 2V.

Jim

Thankyou Jim for your valued input, I have used the 7555 in projects before as a vf oscillator over radio that were solar powered and required low power consumption but I am challenging myself to accomplish the task with a single chip (Micromite only)
GM
 
Chris Roper
Senior Member

Joined: 19/05/2015
Location: South Africa
Posts: 280
Posted: 10:57pm 22 Aug 2015
Copy link to clipboard 
Print this post

Have you considered using the CTMU.
You would probably have to do it as a CFunction but the CTMU is useful for far more than touch, have a look at this APP Note, it may give you some ideas.

http://ww1.microchip.com/downloads/en/AppNotes/CTMU%2001375a.pdf

Cheers
Chris

http://caroper.blogspot.com/
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 11:09pm 22 Aug 2015
Copy link to clipboard 
Print this post

  Chris Roper said   Have you considered using the CTMU.
You would probably have to do it as a CFunction but the CTMU is useful for far more than touch, have a look at this APP Note, it may give you some ideas.

http://ww1.microchip.com/downloads/en/AppNotes/CTMU%2001375a.pdf

Cheers
Chris

Chris that application note describes some fantastic avenues but alas a Cfunction is currently not my forte.

GM
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 02:01am 23 Aug 2015
Copy link to clipboard 
Print this post

@GM

I found the .ASM file for the PIC based water level sensor but as there was only a few lines, I had commented out the water level bit and used the programme to emulate a windmill controller.

The hardware was breadboard and the and the rest bench test proof of concept.

The pseudo code:

Clear I/o pin to logic zero 'discharge probe capacitance
zero PIC timer
start PIC timer
set I/o pin to input 'allow probe to commence charge
LOOP:
if I/o pin = logic 1 then stop PIC timer "the count value is the probe charge time
else goto LOOP


My aim was to only use 1 PIC and for the probe to be passive.

Seeing as I was using 5v circuitry the charge voltage was a bit higher than one would expect of a MM @ 3.3v as a result the count value was greater than the 3.3v version.

I don't think using a ticktimer for the counter is valid - suspect the RC time constant is too short for a 1msec tick.
Perhaps a software counter i.e count = count + 1 may give some result.

I'll see if I can set up a MM test facility and try and do it without external active device such as 555. I've got quite a bit on my plate at the moment.

dgm

I tested a length of twin flex and got about 22pF per foot. If I wrap a hand around the flex, I get about 5pF extra. Just putting a MM programme together to see what values I get under test conditions. Will try tomorrow.

Edited by MOBI 2015-08-25
David M.
 
MMAndy
Regular Member

Joined: 16/07/2015
Location: United States
Posts: 91
Posted: 03:06pm 24 Aug 2015
Copy link to clipboard 
Print this post

When all else fails try this ...

http://milonetech.com/p/about-etape
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2294
Posted: 04:00pm 24 Aug 2015
Copy link to clipboard 
Print this post

  MMAndy said   When all else fails try this ...

http://milonetech.com/p/about-etape


now that does raise an interesting idea:

how about a PVC pipe running from near the bottom of the tank to the top, sealed at the top end and open at the bottom. then attach an electronic air pressure sensor to the pipe (somewhere near the top end). when the tank is empty, the pressure sensor will just read normal air pressure, but as the water level in the tank increases the pressure in the pipe will increase in a nice linear fashion.

by my reckoning, the pressure increase would be about 100kPa per 10m of water level.

to allow for leakage of air, you would need to also have some arrangement that every now and then (perhaps each week) pumped a little more air into the pipe - this could be done with any small air pump on a timer, or even a bike tyre pump that you operated by hand once a week. this occasional air flow would also serve to help ensure the bottom end of the pipe remained clear.


cheers,
rob :-)Edited by robert.rozee 2015-08-26
 
     Page 1 of 2    
Print this page
© JAQ Software 2024