Water Sensor - Page 1
Forum section: electronics / beginners

author: aaron
author_rank: Regular Contributor
timestamp: June 11, 2013, 04:55:30 am
content: 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.PNGBut I would still like to make it even better. There's probably more efficient ways of doing this as well.Thanks

author: David_AVD
author_rank: Super Contributor
timestamp: June 11, 2013, 05:01:07 am
content: If you're wanting to measure the tank level, isn't your circuit relying heavily on the water conductivity beingconstantconsistent?

author: aaron
author_rank: Regular Contributor
timestamp: June 11, 2013, 05:33:59 am
content: Yep, pretty much. Of course a few percent on or off should be fine.

author: Strada916
author_rank: Frequent Contributor
timestamp: June 11, 2013, 05:51:40 am
content: Ahh...................... water continuity isnota constant..

author: aaron
author_rank: Regular Contributor
timestamp: June 11, 2013, 05:54:00 am
content: 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?

author: miceuz
author_rank: Frequent Contributor
timestamp: June 11, 2013, 06:34:56 am
content: Quote from: aaron on June 11, 2013, 05:54:00 amresistive 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.

author: aaron
author_rank: Regular Contributor
timestamp: June 11, 2013, 07:02:09 am
content: Awesome, thanks guys.DiligentMinds.com, I'll try that. Seems like it would work very well, I'll update on how it goes =)

author: croberts
author_rank: Regular Contributor
timestamp: June 11, 2013, 08:16:44 pm
content: 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.

author: ptricks
author_rank: Frequent Contributor
timestamp: June 11, 2013, 10:02:31 pm
content: 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 $4http://www.omron.com/ecb/products/sensor/21/2smpp-02.htmlJust connect a tube to the sensor and drop the tube in the tank.

author: aaron
author_rank: Regular Contributor
timestamp: June 12, 2013, 01:14:00 am
content: 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 thoughKinda wish I could.Looks like I'll be picking up one of thesehttp://www.jaycar.com.au/productView.asp?ID=ZC4821

author: johnnyfp
author_rank: Frequent Contributor
timestamp: June 14, 2013, 12:25:21 am
content: If a little more could be spent on the sensor, I would go the Sonic route. Similar tothisjaycar 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?.

author: aaron
author_rank: Regular Contributor
timestamp: June 15, 2013, 11:16:21 am
content: Hey guys,First off, $70 is a little too muchAnd 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.

author: croberts
author_rank: Regular Contributor
timestamp: June 15, 2013, 04:01:45 pm
content: You could use something like thishttp://www.google.com/imgres?imgurl=http://www.mdtmag.com/sites/mdtmag.com/files/legacyimages/ProductImages/0701/md71EO02c.jpg&imgrefurl=http://www.mdtmag.com/articles/2007/01/string-pots-enable-cpr-mannequins-%25E2%2580%2598talk-back%25E2%2580%2599&h=246&w=480&sz=28&tbnid=ZsXNjCsQRaDE-M:&tbnh=73&tbnw=143&zoom=1&usg=__0dOWzKIci318w20rStWr_rbn7BM=&docid=AIByLjuIFWRdQM&sa=X&ei=2428UZnVKqbvygGez4HIAw&ved=0CFYQ9QEwBA&dur=14240with a float weight assembly riding up and down a straight piece of aluminum flat long enough to accommodate the depth of the tank. The rotational sensor (encoder, pot, etc.) would be mounted to the top (dry) end of the aluminum flat.

author: Rufus
author_rank: Super Contributor
timestamp: June 15, 2013, 04:39:10 pm
content: Quote from: aaron on June 15, 2013, 11:16:21 amI 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.

author: aaron
author_rank: Regular Contributor
timestamp: June 17, 2013, 10:39:10 am
content: 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 wellI've already been to the city and picked up a few of the chips, insanely priced though.

author: aaron
author_rank: Regular Contributor
timestamp: June 18, 2013, 09:49:53 am
content: 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!

author: aaron
author_rank: Regular Contributor
timestamp: June 19, 2013, 04:22:37 am
content: Oh I would love a scope. Can't afford oneAnd for sure, I'll send some pics. I can't pick up the caps until tomorrow now =/ But I'll make sure I do.

author: aaron
author_rank: Regular Contributor
timestamp: June 20, 2013, 09:11:38 am
content: 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.