Pages: [1] 2 3 4   Go Down
Author Topic: Water level sensor w/ nichrome wire no, now capacitive  (Read 13238 times)
0 Members and 1 Guest are viewing this topic.
United Kingdom
Offline Offline
Jr. Member
**
Karma: 3
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all, I've been lurking around these forums looking for help and searching through which has helped me out a lot smiley

My background is basic electronics which I'm using to create a ROV which has bilge tanks to raise and lower it in the water. These bilge tanks are controlled with bilge pumps through motor controller; thats all working brilliantly. The whole thing is communicated with using an Ethernet shield and firing OSC commands down, with a PC in the way which then connects to an Xbox360 controller.

These bilge tanks are sealed, and I need to know the water level in them, at both ends (they are 1m long lengths of 110mm diameter drain pipes). I have acrylic rods which I intend to connect a nichrome wire loop to which - as far as I understand - is a length of wire with a known resistance per cm/m/inch whatever.

The nichrome wire I have is 42SWG (1Ohm per CM), and I'm hoping to connect 5V from the Arduino at the top, and then another lead to an AnalogIn pin and measure the voltage, with the hope that as the water goes up the acrylic rod the resistance of the loop will change as the water will create a short.

First, does any of this make sense (smartest way of doing it?) and is my Arduino going to suddenly blow up if I were to just connect the 5V through the nichrome wire to the GND on the board itself? I'm worried as to whether the nichrome takes as much current as possible and burn out the board, or if it will only use what its given (40ma?).

I typed this quick at lunch, but I'll be able to post a schematic later if needs be.

Can anyone help?
« Last Edit: September 13, 2011, 02:53:52 am by TenderLoins » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What I can tell you is that with a resistance that low you will indeed have to be careful not to put to much load to the Arduino (1 meter -> 100ohm -> current: 50mA at 5V).

I actually did not get how you want to do the level measuerement with the nichrome.
What would maybe work is to increase conductance by adding e.g. salt to the water then put an electrode connected to +5V at the bottom of the tank and one connected to an analog input at an object that swims on the water surface. With the water level the distance between the electrodes and therefore the resistance and the voltage varies.

Or you want something precise, then a capacative method would maybe be the right thing. (eg.http://mechanical.poly.edu/faculty/vkapila/ME3484/Readings/NV27-Measuring%20Water%20Level.pdf)

That's just what came to my mind. I can't tell if it works and there might be much better methods.
« Last Edit: September 07, 2011, 08:49:43 am by frsc » Logged

United Kingdom
Offline Offline
Jr. Member
**
Karma: 3
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Cheers frsc.

I'm trying to make this: http://lifeboat.co.nz/arduino-water-level-gauge/ but using a continous length of nichrome so that it'll have a higher accuracy? That was the idea at least.

I would end up using probably 80cm overal, 20cm per probe. I guess if I throw a resistor in there it'll increase the resistance and lower the current draw?

The capacitive route looked good, but to make an accurate sensor for cheap didn't really work out. Baring in mind that this will be underwater, just the wires from the sensor back to the Arduino (which would be submerged) would have changed the reading on a capacitive setup.
Logged

0
Offline Offline
Sr. Member
****
Karma: 2
Posts: 360
I'm 15. I like making things. I like breaking things better.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Keep in mind that you cannot measure resistance by connecting the 5v-carrying nichrome wire straight to the arduino ADC. You need to pair the wire with another resistor to create a voltage divider, and then measure that voltage.
Logged

Alice asked the Chesire Cat, who was sitting in a tree, "What road do I take?"
The cat asked, "Where do you want to go?"
"I don't know," Ali

Norway
Offline Offline
Full Member
***
Karma: 0
Posts: 104
Have you thought it over before asking?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What i see on the page you linked is that there is a series of resistors on the tube and not only the wire.
My guess is that the water more or less shorts the resistors so that a linear measurement is possible.

My advise, is to follow their building methode and experiment with that, and ask Dave what the actual function of the wire is.
It could be that it is eg. corrosion resistant.
Logged

2B || !2B

... bonding electrons and bits!

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33358
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes the basic idea will work but there are two things you have to watch out for:-
1) Nicrome wire will not solder, you have to use crimped connections.
2) Prolonged exposure to DC produces small bubbles in the water that stick to the surface and so reduce the amount by which it is shorted. So the resistance reading will gradually increase. You can get round this by exciting it with AC, one way is a H-bridge that keeps switching the polarity of the applied voltage.

Best of luck
Logged

Atlanta, GA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 86
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've seen people use two digital pins to get ac - with a soil moisture sensor.

here's an example
http://gardenbot.org/howTo/soilMoisture/

that same page also shows an H-bridge circuit


Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't think you will get consistent results trying to use nichrome wire - the reading will vary too much depending on how much salt or adic there is in the water and how clean the wires are. I'd use capacitive sensing instead.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

United Kingdom
Offline Offline
Jr. Member
**
Karma: 3
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First up, thanks for all the responses, you've all been a great help.

dc42 brought up a good point with the quality of the liquid I'll be dumping this thing into. I made an example 'probe' with the nichrome wire, but its thinner than a human hair and royal pain in the ass to work with. Here is my attempt:



I'm gonna ditch that plan, mainly because I can't get a decent and re-creatable manufacturing method. And secondly because the results from the Arduino are poor.

dc42 you bring up the idea of capacitive sensors. Any link for how to make one? I've checked loads of tutorials and can't find one that suits my purpose.

Is there anything I can buy (about £10 each, I need 4) that will do what I want?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not aware of anything you can buy, but I think you could make your own capacitive sensor. See the image for the arrangement I would try. R in the diagram is an insulated metal rod, e.g. a rod with heat-shrink sleeving on it and epoxy to seal the bottom, or maybe a rod enclosed in a thin plastic sleeve, or possibly a rod painted with 2 or 3 layers of epoxy. S is a metal cylinder, or if the water is conductive enough, don't bother with it and just stick a metal electrode at the bottom of the ballast tank, or use the ballast tank itself as the ground connection if it is metallic. This effectively gives you a capacitor in series with a resistor between connections C and GND. The capacitor is formed by the rod R and the water surrounding its insulation. The resistor is formed by the water between the outside of the insulated rod and the cylinder S. Note this will not work if the rod it not fully insulated and the water can reach it, because in this case the water effectively shorts the capacitor.

To measure the capacitance, either use the circuit in the link you gave in your original post, or use the [untested] circuit I have given in the image based on a 555 timer chip. Use a CMOS verson of the 555 because the capacitance will be low, so you need R1 to be quite high (perhaps several megohms) to get a the 555 to oscillate at a sufficiently low frequency that you can measure it on the Arduino. Also you need R1 to be much greater than the effective series resistance of the sensor. To get a larger capacitance, make the diameter of the rod bigger and the rod insulation thinner.

The frequency of the 555 output should be inversely proportional to (L0 + water_level), where L0 is a constant. I suggest you feed the 555 output to an Arduino input that supports interrupts, so that you can count pulses in the interrupt service routine. Time a number of pulses and calculate the average interval, which should be propertonal to L0 + water_level.


* Scan 15.JPG (85.16 KB, 1653x1165 - viewed 386 times.)
« Last Edit: September 07, 2011, 03:47:06 pm by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33358
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm not aware of anything you can buy,
Try:-
http://uk.farnell.com/capacitive
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm not aware of anything you can buy,
Try:-
http://uk.farnell.com/capacitive

Those are capacitive proximity switches, not liquid level sensors. OTOH there are some liquid level sensors at http://uk.farnell.com/level - but all the ones I looked at are for sensing whether the liquid is above or below a certain level, not for measuring the level.
« Last Edit: September 08, 2011, 03:05:22 am by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

United Kingdom
Offline Offline
Jr. Member
**
Karma: 3
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow, thanks dc42  smiley

I'm gonna lurk around ebay and hopefully grab some aluminium tube or copper pipe for the outer section (S) in your drawing, and find some thin-ish rod (2-3mm diameter) and coat it with some kind of paint for (R) as you said.

I think the hardest part will be keeping the middle rod in the middle of the tube, as I can't use a washer or anything in the middle of the tube (it would stop the water running up the tube). I'm thinking that it'll be held at the top by a rubber grommet with small holes drilled in it, effectively slowing the filling and emptying of the sensor smoothing out the readings slightly.

The water will be nasty canal water (any large bits will be filtered by the pumps) so there will be gunk in it (read: not just water). I guess I'll have to calibrate the sensors on the day they are to be used.

Thanks again guys, I'll post a tutorial if I get this working smiley

Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the hardest part will be keeping the middle rod in the middle of the tube, as I can't use a washer or anything in the middle of the tube (it would stop the water running up the tube). I'm thinking that it'll be held at the top by a rubber grommet with small holes drilled in it, effectively slowing the filling and emptying of the sensor smoothing out the readings slightly.

You could use plastic washers in the middle of the tube and drill holes in them (or just cut the corners out) to let the water through. Or you could drill holes in the outer tube, or even have a slot running along its length. If the water is conductive enough, you might get away with replacing the outer tube by a second, un-insulated rod parallel to the first.

However you do it, I suggest making it removable so you can clean it if it gets clogged up or algae growing on it. I recall that the British navy used to copper-bottom its ships to prevent stuff growing on them, so a copper tube sounds like a good idea.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

United Kingdom
Offline Offline
Jr. Member
**
Karma: 3
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Excellent ideas.

Just to clarify your drawing, I found this on Wiki:



I'll google around for more information on it and how to use it.
Logged

Pages: [1] 2 3 4   Go Up
Jump to: