I'm looking to try and build a water level sensor for a water container. Basically I want to be able to monitor the level of the water via either the web (rss, xml) or email.
Ideally it seems some sort of optical, ultrasonic, or sonar sensor possibly, depending on the price and reliability.
I was thinking if I could match all this up with a arduino of some sort to either transmit the readings via xml, rss or email.
Any thoughts on this?
FYI: I have absolutely no experience with Arduino unfortunately.
I'm looking to try and build a water level sensor for a water container.
Is this tank going to contain just water? Some sensors do not last long in other fluids.
You mention nothing about your fabrication skills, the size or shape of the tank, the accuracy that you need, or why you want to build, rather than buy, a fluid level sensor.
Ideally it seems some sort of optical, ultrasonic, or sonar sensor possibly, depending on the price and reliability.
Ultrasonic sensors don't like to get wet, so I don't think that's a good choice. Sonar is not going to be cheap.
A float system like a car's gas gauge would be my choice, if there is room to swing the float. They have variable resistance based on the position of the float. Connect one end to 5V and the other to an analog pin, and indirectly read the level in tank.
Get that part working, first. Then, add the ethernet shield or GSM shield, and get the data online.
james211:
I'm looking to try and build a water level sensor for a water container. Basically I want to be able to monitor the level of the water via either the web (rss, xml) or email.
I would attempt this project in chunks... first confirm that you're getting good data before attempting to post data to Cosm or whatever server on the internet you're after.
If the outside of the container is accessible, consider a pressure sensor. Calculate the pressure range that your tank may develop, then see if e-bay has some automotive 0-5VDC output models that fit your needs. Hopefully, the 10bit ADC in the Arduino is sufficient in terms of resolution. If not, you get the added challenge / puzzle of adding a external ADC to your rig. If you cannot access the outside of the tank (i.e. it's buried deep in the ground) then there are a couple of options you could consider.
Even with no access to the outside / bottom of the tank, the pressure approach is still possible, BTW, you'd just need to thread the sensor into a pipe and then lower the pipe into the tank. However, here you'd enjoy the added challenge of keeping everything inside the pipe dry / prevent condensation, etc. The best approach may be to assemble the thing and then permanently fill the pipe with polyurethane spray foam.
Another option is ultrasound, mounted well above the water and pointing down. Here, you have to pay close attention to the beamwidth and the code that sensor manufacturers or fellow enthusiasts may have already published.
Another option is a resistive rig. One person had a string of resistors soldered to each other, as water shorted out a resistor, the resistance of the rig would change accordingly. There is also eTape, a tape-like version of this approach with lengths up to 2', but pricey. I would have sourced this product were it not for the cost and limited length selection being offered.
What I will attempt at some point when I'm not chasing too many other projects or my kids is a capacitive approach where I'll be applying two long pieces of copper tape to a extant cylinder and then measure the change in capacitance as the water levels go up and down inside a tank.
The pressure idea should work at any point in the system if you can attach a sensor to a pipe or something, it doesn't have to be at or even near the tank but you may have to apply an offset depending on the relative levels of the sensor and the tank bottom.
The tank I need this for is a small 4 gallon tank that is only 9-10 inches deep. I have complete access to this tank. The tank will have reverse osmosis deionized water in it. The temp is roughly room temperature. The purpose of this project is to be able to monitor the level of my top off tank for my salt water aquarium while I'm traveling. I have a controller for monitoring everything else and I'd like to be able monitor the level of this tank.
I looked into the etape and that seems like the most cost efficient way to go. Basically a 10in strip is $40 on sparkfun.com.
I've also attached two pdf's that are supplied, one is the datasheet the other is the appnotes. Take a look at these if you can.
Essentially I need some guidance as to where to start.
I have no experience with arduino's and I feel like that will be the biggest challenge.
The etape experiment will be very similar to the potentiometer examples you can look at in the reference library. The 12" eTape is probably your best bet. Assuming a ~1024 step resolution over a 10"/12" range is good enough (i.e. up to 80 steps/increments per inch of tape) you can use the onboard ADC as described above.
Next, consider buying a Arduino with a built-in ethernet controller and then follow the examples posted on Cosm or another aggregation / graphing site re: how to interface with the site using an arduino with ethernet. Or a standard arduino with a ethernet shield will work also.
If you buy the UNO and add a shield, you can program the thing via the included USB cable. Afaik, there is no POE option.
The Ethernet unit you mentioned allows POE in case that's important to you but you lose the USB chip. Thus, you'd have to buy a ftdi cable to connect to the arduino, an added expense.
Either approach should work. Which is less expensive overall?
Deionised water has quite a high resistance, so measuring level by shorting out resistors may be tricky. You may also encounter corrosion issues if you are passing DC through the contacts.
Constantin, it looks to be about the same cost for either build. Personally I think the Ethernet shield is probably a better option to allow for more flexibility. I don't see where I'd have a use for POE which this project so I'll probably skip that.
Will the arduino come with everything or do I need to purchase a power supply in addition? Also, what is cosm?
EDIT- I misread that, I thought it had a 30cm range, but 30cm seems to be the low end, so this probably will not work for your project. I'll leave the link here for future reference though.
My biggest concern with this whole project is the code. I have never been able to grasp coding so I'm not sure I'll be able to do so with an arduino either. Will people on this forum be ale to assist me with that aspect?
Will people on this forum be ale to assist me with that aspect?
Sure, we do so all the time.
If you make a start and have specific problems we will certainly help.
I think it's just that nobody has the time and/or inclination to do the whole job, at least not for less than normal rates which last time I looked was about $80 per hour.
james211:
My biggest concern with this whole project is the code. I have never been able to grasp coding so I'm not sure I'll be able to do so with an arduino either. Will people on this forum be ale to assist me with that aspect?
For a basic setup, the coding can probably be copy/paste from previously posted code. Currently uno boards are available on ebay for ~$16 and ethernet shields for ~$12 shipped, so best to get the boards and start testing. You can experiment with a multimeter for making a hi/lo water level detector if the water is salty and conductive.
Ultrasonics are used in industrial water treatment applications, so a practical home solution should be possible. Floats also sound good but have moving parts. Another option might be to weigh the tank.
I've just recently done this for a growhouse water storage. I used the pressure differential approach. SPecifically I used a Freescale MPX2010 which is temp compensated. http://www.freescale.com/files/sensors/doc/data_sheet/MPX2010.pdf but you will need a OpAmp to use it. Freescale can send you a sample too.
Regarding the code without giving everything, it's quite simple really. You need to read the analog value returned, make it fit the calibration settings with constrain() and finally map the value if you want a 0-100% style reading, as I did.
That's an interesting device, however the following excerpt from the datasheet would concern me:
"The MPX2010 series pressure sensor operating characteristics and internal reliability and qualification tests are based on use of dry air as the pressure media. Media other than dry air may have adverse effects on sensor performance and long term reliability".
Allowing water into the device doesn't sound like a good idea to me. It would be possible to have the pressure sensor connected to an air-filled tube, with the other end of the tube at the bottom of the tank; but in this arrangement, the air is always going to be at 100% relative humidity, so it's hardly dry.
Or maybe you have an ingenious arrangement that keeps the sensor in dry air all the time?
dc42:
That's an interesting device, however the following excerpt from the datasheet would concern me:
"The MPX2010 series pressure sensor operating characteristics and internal reliability and qualification tests are based on use of dry air as the pressure media. Media other than dry air may have adverse effects on sensor performance and long term reliability".
Allowing water into the device doesn't sound like a good idea to me. It would be possible to have the pressure sensor connected to an air-filled tube, with the other end of the tube at the bottom of the tank; but in this arrangement, the air is always going to be at 100% relative humidity, so it's hardly dry.
Or maybe you have an ingenious arrangement that keeps the sensor in dry air all the time?
Although this device has been used by many it seems for the same application, yes you do need to keep it dry using a trapped column of air. The RH didn't bother me as the application notes suggest using it for Application Examples • Respiratory Diagnostics, doubt that 0%RH either. What exactly is considered "dry air". Anyway I placed a loop in the tube filled with a oil. Naturally the oil can move in the loop. So the tube goes from the bottom of the tank, loop round then out the top of the tank. The loop prevents the oil just dropping out the bottom of the tube.
If you have access to an outlet pipe at the bottom or the bottom of the tank that's better as you won't have diffusion problems with the air mixing with the water and the water moving up the tube giving lower tank level readings.
Anyway, It's worked for me and others so I'm happy with any risk of blowing the sensor. Plus I ordered 2 samples from freescale so I have a spare.
That's a neat idea, using oil to separate the wet air from the dry air! I guess expansion of the two air pockets may make the reading temperature-sensitive, but probably not enough to matter.