Author Topic: Water Sensor  (Read 11012 times)

0 Members and 1 Guest are viewing this topic.

Offline aaronTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Water Sensor
« on: June 11, 2013, 04:55:30 am »
Hey guys,

Well if any of you read my previous post, I basically gave up on sending out a composite signal from a Pixace PIC. The digital projector must want an absolute perfect signal and I can't get 4uS delays. SO I'm going back to an old project, a water sensor.

So far it works great. I through together a C# program to read the serial, and just send the ADC value of ADC Pin 1 to the computer every 100ms.

I then calibrate the minimum and maximum values of a water probe in a cup using the C# program. A positive pin in the bottom of the cup, and a probe I can move up and down in the water allows me to measure it.

Only problem is it's a little bit glitchy. I wanted to actually put this in a real rain water tank, and I assume if I up the scale to that, it'll work a bit better. But I was wondering if anyone would have any ideas to make the reading more accurate and stable.

Anyways, I'm still trying to understand transistors. I'm probably doing it wrong, but I found this make it more stable and accurate:

http://puu.sh/3d7jV.PNG

But I would still like to make it even better. There's probably more efficient ways of doing this as well.

Thanks

 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2861
  • Country: au
Re: Water Sensor
« Reply #1 on: June 11, 2013, 05:01:07 am »
If you're wanting to measure the tank level, isn't your circuit relying heavily on the water conductivity being constant consistent?
« Last Edit: June 11, 2013, 05:24:03 am by David_AVD »
 

Offline aaronTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: Water Sensor
« Reply #2 on: June 11, 2013, 05:33:59 am »
Yep, pretty much. Of course a few percent on or off should be fine.
 

Offline Strada916

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: au
Re: Water Sensor
« Reply #3 on: June 11, 2013, 05:51:40 am »
Ahh...................... water continuity is not a constant..
The Bone, the Off-White, the Ivory or the Beige?
 

Offline aaronTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: Water Sensor
« Reply #4 on: June 11, 2013, 05:54:00 am »
I know salinity and temperature can alter the conductivity of water. Wouldn't think it would be a huge change though. What other methods could be used?
 

Offline miceuz

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: lt
    • chirp - a soil moisture meter / plant watering alarm
Re: Water Sensor
« Reply #5 on: June 11, 2013, 06:34:56 am »
I know salinity and temperature can alter the conductivity of water. Wouldn't think it would be a huge change though. What other methods could be used?

resistive method is really no good. permitivity of water changes dramatically with salinity. another coductive method is described here: http://wemakethings.net/2012/09/26/capacitance_measurement/

The idea is like this - you excite RC filter formed by a known resistance and unknown capacitance. The capacitance is your probe - C1 in schematics. The amplitude of filtered waveform will change with changing capacitance. Crude and simple way is just to feed filtered waveform to a peak detector.

Offline aaronTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: Water Sensor
« Reply #6 on: June 11, 2013, 07:02:09 am »
Awesome, thanks guys.
DiligentMinds.com, I'll try that. Seems like it would work very well, I'll update on how it goes =)

 

Offline croberts

  • Regular Contributor
  • *
  • Posts: 94
  • Country: us
Re: Water Sensor
« Reply #7 on: June 11, 2013, 08:16:44 pm »
I know the attached photo is a bit ugly but this water level sensor has been working well for me for years. A sealed potentiometer attached to a piece of aluminum flat with vitamin bottle floats. Attached to a PIC controller that controls the water level in a sand filter.
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 672
  • Country: us
Re: Water Sensor
« Reply #8 on: June 11, 2013, 10:02:31 pm »
The one I like is the IR beam/photodetector method because it is non contact.
Another method that has been used for decades is pressure. Clothes washers use this method. There is a tube that extends to the bottom of the washer tub.
At the other end is a diaphragm that pushes on metal contacts,  as the water fills the tub , the air pressure in the tube will increase and fill the diaphragm closing a pair of metal contacts. 

Honeywell and Omron both make pressure sensors, starting at about $4
http://www.omron.com/ecb/products/sensor/21/2smpp-02.html

Just connect a tube to the sensor and drop the tube in the tank.
« Last Edit: June 11, 2013, 10:04:07 pm by ptricks »
 

Offline aaronTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: Water Sensor
« Reply #9 on: June 12, 2013, 01:14:00 am »
Lots of ideas here.
I like your design croberts. The tank I want to implement this in is rather huge with a small opening so I couldn't use that though :( Kinda wish I could.

Looks like I'll be picking up one of these http://www.jaycar.com.au/productView.asp?ID=ZC4821 ;)
 

Offline johnnyfp

  • Frequent Contributor
  • **
  • Posts: 261
  • Country: nz
Re: Water Sensor
« Reply #10 on: June 14, 2013, 12:25:21 am »
If a little more could be spent on the sensor, I would go the Sonic route. Similar to this jaycar sensor. (But cheaper).

The putting of any wire with a charge in water is just leading to corrosion. And when you have a 25,000 litre tank, what do you do when the sensor is corroded?.

 

Offline aaronTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: Water Sensor
« Reply #11 on: June 15, 2013, 11:16:21 am »
Hey guys,

First off, $70 is a little too much ;) And most of all, that's just buying something, I kinda wanna build something. So many people have just told me to go buy this or that product. I don't get it....

Anyway, I'm not a metal expert, it's a tin tank kinda thing, same stuff used on roofing. But it's internals are a big plastic bladder, and it's drinking water. Captures rain from gutters. :)
 

Offline croberts

  • Regular Contributor
  • *
  • Posts: 94
  • Country: us
Re: Water Sensor
« Reply #12 on: June 15, 2013, 04:01:45 pm »
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Water Sensor
« Reply #13 on: June 15, 2013, 04:39:10 pm »
First off, $70 is a little too much ;) And most of all, that's just buying something, I kinda wanna build something. So many people have just told me to go buy this or that product. I don't get it....

Anyway, I'm not a metal expert, it's a tin tank kinda thing, same stuff used on roofing. But it's internals are a big plastic bladder, and it's drinking water. Captures rain from gutters. :)

I think you should consider pressure sensing as someone already suggested. You can get decent pressure sensors for around $10. If the tank gravity feeds indoors you can measure pressure in the pipe indoors. Don't have to weather proof anything don't have to touch the tank. What is the height of the tank? You will get about 1 bar per 32' of water.
 

Offline aaronTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: Water Sensor
« Reply #14 on: June 17, 2013, 10:39:10 am »
Thanks again guys.

There's no gravity feeds, it's all pumped, and I really like DiligentMinds idea.

I have some studies to do for the next few days, but as soon as I have time, I'll begin work, and for sure I'll post updates here if it goes well :) I've already been to the city and picked up a few of the chips, insanely priced though. :)

 ;D
 

Offline aaronTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: Water Sensor
« Reply #15 on: June 18, 2013, 09:49:53 am »
Absolutely =)

Screw work. I built it today, it's working. It's very glitchy........?, but I'm using a 22pF instead of a 100nF capacitor, combined with the tiny cup,

But, it works! Kinda... Still tweaking. I'll pick up some 100nF caps tomorrow, don't know how the hell I forgot them.

Thanks!
« Last Edit: June 18, 2013, 12:08:27 pm by aaron »
 

Offline aaronTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: Water Sensor
« Reply #16 on: June 19, 2013, 04:22:37 am »
Oh I would love a scope. Can't afford one :(

And for sure, I'll send some pics. I can't pick up the caps until tomorrow now =/ But I'll make sure I do.  ;)
 

Offline aaronTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: Water Sensor
« Reply #17 on: June 20, 2013, 09:11:38 am »
Hmm, well, I didn't expect it to work straight off. I got some 100nF caps. I'm still a beginner, and I thought maybe they weren't right as they don't seem to be the type to have a polarity, but I'm not sure.

The issue is that it's still extremely unstable. I'm using a Picaxe M2 at 32Mhz, using the count function that's already included, with the circuit you provided. I couldn't find much more information on the web using this method though. I found one using capacitance to read water levels, though.

I'm not sure what to do, I could try it out with an Atmega 328p. But I'm probably doing something obviously wrong here.  :P
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf