Water level sensing - Page 1
Forum section: electronics / projects

author: janame
author_rank: Newbie
timestamp: January 11, 2016, 09:49:47 pm
content: I'm trying to design a new controller for the pump in my well. The controller I have now uses a simple sense circuit to control a big honkin' relay. I want to replace this with a solid state relay and microcontroller. I'm not sure the way the sense circuit works now is the best way to do it, so I want to see if anyone has suggestions.There are 2 probes in the well, a high water (start pumping) and a low water (stop pumping). The well casing is metal and is used as ground. The relay has 2 NO contacts.. The sense circuit steps up line voltage to 300 VAC (limited to 6VA = 20mA by transformer design) and is connected in series with the relay coil and the high water probe. When the high water probe is under water, there is a conduction path to ground (through the water and the well casing), and the relay closes. Now, the low water probe serves as the conduction path and the relay remains closed until the water falls below this point.I’ve measured the resistance between each probes and the well casing. It’s higher than my meter can read (> 20Meg). Between the high and low probe (separated by ~3.5ft of water) I measure about 16k (reading not stable).In the simplest case, I’m thinking I could use the same 300V transformer to energize both probes all the time and use shunt resistors to measure (presumably very small) current through the probes. I’m not really sure if this is necessary though, or if there is a better way. Can I get away with something other than the 300V source? Any ideas or recommendations?

author: helius
author_rank: Super Contributor
timestamp: January 11, 2016, 10:39:39 pm
content: Clear water has very low conductivity, so the probes are at a very high impedance. The 300V is apparently required to cause any current to flow in the circuit. With the way the sensors are designed I don't think you will get anything out of them at a low voltage.I guess the sensors need to have very fast response time to prevent over-pumping the well, so most moisture meters will not work. Optical sensors could be affected by fouling and this should be anticipated in the design. There might be mechanical float type sensors that would work at (12-24VDC)

author: pmbrunelle
author_rank: Regular Contributor
timestamp: January 12, 2016, 04:55:01 am
content: Use level sensors based on a floating magnet which activates a reed switch.Conductivity will be problematic... example, if you get buildup/scaling on the electrodes.If you insist on conductivity, to prevent electrolytic buildup, you don't need to feed constant DC to the electrodes. Excite the electrodes for a few milliseconds, measure the resistance, then shut off the excitation. Wait 10 seconds before sampling again, then reverse the polarity this time.I'm not sure why you need a microcontroller for this, I would think that relay logic would suffice.

author: rs20
author_rank: Super Contributor
timestamp: January 12, 2016, 06:03:20 am
content: I think pmbrunelle's suggestion of a magnetically actuated reed switch is by far the easiest and most reliable. However, if you want to have some fun, you can also try:-- Ultrasonic sensor mounted to the ceiling of the tank, measure the distance down to the surface.-- And my favourite, an (insulated) transmission line diving vertically down into the tank. Measure the location of the impedance mismatch, and you know the water level.

author: tautech
author_rank: Super Contributor
timestamp: January 12, 2016, 07:08:19 am
content: 2 good threads, both worthy of study:https://www.eevblog.com/forum/beginners/low-power-not-gate/https://www.eevblog.com/forum/beginners/which-sensor-to-use-for-salt-water-level/

author: Seekonk
author_rank: Super Contributor
timestamp: January 12, 2016, 08:11:03 am
content: I've designed these commercially and that high of a voltage is not needed. It can easily be done with 6VAC. There are pump up and pump down designs that can be had on ebay for under $10. No need to torture yourself with a design unless you really want to.

author: bxh
author_rank: Contributor
timestamp: January 12, 2016, 08:24:49 am
content: You could also use capacitive sensing:http://www.instructables.com/id/Capacitive-Fluid-Level-Sensor/

author: Ian.M
author_rank: Super Contributor
timestamp: January 12, 2016, 08:59:46 am
content: I'm thinking the high voltage may also be to burn off any bio-film fouling as the water drops below the sensor.If it would be possible to snake a small bore air hose down the casing (with a weighted end), and the casing is vented to atmosphere, an air bubbler type depth sensing system is likely to be the most reliable. You need a small low voltage positive displacement air pump and a differential pressure sensor. Run air pump till pressure stabilises, then shut it off and read the level from the remaining pressure. Repeat as needed.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: January 12, 2016, 09:05:22 am
content: Quote from: rs20 on January 12, 2016, 06:03:20 amI have this on my water tanks and it works well. I used a sealed waterproof ultrasonic transducer that simply fires a pulse down and measures the echo response time. Not accurate at close (<30cm) distance but pretty good from about 95% full to down to about 15% full. Tanks are 3m high cylinders.The graph shown is a trend plot from Dec 1, and you can see the watering and rain events in the tank levels.Level readings are averaged over an hour (one value per minute) for the trend plot. Realtime data is always available on the system as well.- Geoff

author: SL4P
author_rank: Super Contributor
timestamp: January 12, 2016, 11:11:46 am
content: A plastic tube with pressure sensors also has possibilities.

author: Seekonk
author_rank: Super Contributor
timestamp: January 12, 2016, 01:39:42 pm
content: Sounds like you are all trying to over complicate this, but lets talk about going solid state. What is wrong with a big honking relay? I've sold hundreds of used CRYDON D4875A relays on ebay, that is 480V 75A. Don't try starting a pump with that cheap shit from China. You don't want to risk having a lesser quality unit short out. I'd strongly suggest you keep the relay.

author: tautech
author_rank: Super Contributor
timestamp: January 12, 2016, 05:37:12 pm
content: Quote from: Seekonk on January 12, 2016, 01:39:42 pm+1By all means update the level sensing circuitry, but relays and contactors are still the workhorses for industrial mains switching.

author: SL4P
author_rank: Super Contributor
timestamp: January 12, 2016, 06:07:10 pm
content: I may have missed a post, but I didn't see anyone tossing out the relays.The conversation has been about reliable sensing, not pump motor control.As I hear it, there are three elements to the OP problem, which he needs ideas for part one.1. Level Sensing. <<<====2. Decision making3. Pump control

author: Seekonk
author_rank: Super Contributor
timestamp: January 12, 2016, 06:23:42 pm
content: Quote from: janame on January 11, 2016, 09:49:47 pmI think the SSR was mentioned here

author: Alexei.Polkhanov
author_rank: Frequent Contributor
timestamp: January 12, 2016, 07:00:30 pm
content: This topic keeps popping up - I mean level sensing. For some reason a LOT of people want to read water/liquid levels on this forum. Just an observation.Good source on a subject would be something like "Instrument Engineer's Handbook", vol4. deals with sensors.List of sensors:- bubblers- capacitance and RF- conductivity and field effect- diaphragm- differential pressure- displacer- thermoconductivity (liquids conduct heat better, vertically placed heater/temp sensor)- float level- laser-magnetic/magnetostrictive- radar contact/non-contact-radiation-resistance-rotating paddle-ultrasonic-vibrating (fork submerged into liquid has different resonance)Also for a tank of liquid simple strain gauge can be used to weight the liquid inside instead of measuring level. I think it is the best non-contact most accurate least hassle method but it does not work for wells.For an undeground well my bet would be on:1. magnetostrictive sensor - it uses a mechanical flotation device with magnet inside around a pipe. It is well insulated and does not get stuck/molded/corroded easily. It is continuous and accurate.2. A pipe with reed switches inside and floating magnet on a floating ring around. It is not continuous obviously.3. bubbler - pipe lowered almost to the bottom of well and level is measured by sensing pressure of air pumped into it. Disadvantage is that it needs small air pump.Nice industrial sensors usually can be found on Ebay. So I would keep my mind open and try to see what I can get for $100-200.

author: Seekonk
author_rank: Super Contributor
timestamp: January 12, 2016, 09:59:59 pm
content: All this is just off the top of my head, but this is how I would do it. Start withan arduino mini. Set one of the PWM outputs to 50% duty cycle, that will be your ACsource. Feed each of your probes with that through a 10K resistor, well casing willbe common. Each probe sends back a signal through a .1uf capacitor. That feeds thecenter of two diodes in series as a voltage doubler. That charges a capacitor thatis read by two A/D inputs for your H and L probes. Have a resistor in parallel withthat capacitor and choose a value such that the voltage is about 4V with the sensorsnot connected (obviously with the micro not connected). Read the A/D values. Use datadisplay in tools to get these values. Choose appropriate value to trip at. Then itis just set reset in logic, depending if it is a pump up or pump down operation. Somedelays would be appropriate. The same state should be read 20-100 times in a rowto verify a true state. Pump should have a minimum on time and off time to preventrapid cycling. This is standard in commercial units to prevent cycling due to waveaction. I would also include a run time alarm to shut off motor after running so longin the event of a sensor failure.

author: CaveMannDave
author_rank: Regular Contributor
timestamp: January 13, 2016, 06:51:31 am
content: Quote from: janame on January 11, 2016, 09:49:47 pmFirst, if the motor NEEDS a contactor/starter to handle the load, I recommend (as have several others) that you leave it as-is. A "big honkin' relay" often is a contactor, if it has overload protection it's a starter. Either way, they are designed to handle inductive inrush and opening, many times an hour, for years, safely.Quote from: janame on January 11, 2016, 09:49:47 pmOld-School Level-trol... I've used many in my day.Depending on the water character, the electrodes can electrolytically corrode away, fail to sense (Ultra-pure/Deionised water is an insulator), or become fouled with various detritus or growths like algae or iron-bacteria, altering to a greater or lesser extent the sensed levels.You describe a pump-down system, usually used in a sump or de-watering application, rather than the normal pump-up type, most often used for domestic or irrigation water supplies. Why is the control point at the low end of the well? Do you care more about sucking air than outputting too MUCH water?Quote from: janame on January 11, 2016, 09:49:47 pmIs the system, as it is, giving trouble? What is the motivation for replacement of everything BUT the conductivity probes, unless something is unreliable.If the probes/wires are doing bad, think about:http://www.astsensors.com/submersible_level_sensors/AST4530orhttp://www.astsensors.com/submersible_level_sensors/AST45PTIf the "relay" is too noisy or unreliable, consider this:http://www.plasticservices.com/Techtips/contactors.htmThere are a lot of perfectly good and RELIABLE, industry standard options out there: why does everyone seem to think that a home-brew "Arduino" based, but completely non reliability-proven kludge will automatically be superior to an existing, well-performing setup, seemingly for no better reason than bragging rights for walking around the barn to get to the front door, with an "improved" mouse trap.Not EVERYTHING from the 20th century needs to be destroyed in the name of modernity!Cheers,Dave

author: calzap
author_rank: Frequent Contributor
timestamp: January 13, 2016, 05:08:23 pm
content: Curious as to what the "well" is used for. As has been mentioned, the start/stop control that you portray is more typical for pumping a sump rather than a well. However, the arrangement you show is used in situations where the goal is to extract as much water as a well is capable of producing. In these cases, the pump capacity usually exceeds the rate of lateral water percolation into the well.It's very important that there be a safety stop mechanism in case something goes wrong with the lower probe (and the upper too for sump pumping). Most well and sump pumps rely on the flow of water for lubrication and cooling. A common arrangement is an output pressure and/or flow sensor with a delay of a few seconds at pump-start. A flow sensor can protect against a dry pump and clogged output. An output pressure sensor may or may not be able to detect a clogged output depending on its sophistication. A pressure relief valve is essential for any well pump, and should always be present even if electronic protectors are installed too.There are also pump protectors, like Franklin Electric's Pumptec-Plus, which guard against multiple hazards (over-current, dry well, high/low voltage, short cycling) by analyzing the current draw and voltage drop patterns of the pump. I use these on the wells on my ranch, and at least one pump has been saved from over-voltage, which paid for the protector many times over. For surface irrigation pumps, I use flow and/or output pressure sensors for dry pump protection.For determining water level in wells, I use an Eno Scientific 660. It is essentially a sonar unit that uses low frequency sound waves. There are models with data logging and computer connections available. I have had a couple of occasions to test the Eno against a Powers Electric unit, which uses a conductivity sensor on a rope, and the agreement was within a few percent.If a three-phase pump is available, a variable frequency drive could be used with a controller to match pumping rate to well inflow rate. This arrangement may or may not be desirable for a sump pump depending on the periodicity of sump filling.I echo the opinion of others with regard to using a contactor rather than a SSR for applying power to the pump. Not only do they have to handle big, nasty inductive loads, but they have to survive insults from the power company as well. Yes, SSRs can be and are used in pump controllers, but for a constant speed pump, a sufficiently large and robust SSR and associated protective devices will probably cost more than a high quality contactor. If the contactor coil receives power from a transformer or PSU (24 VAC and 12 VDC are commonly used) rather than mains, be sure the transformer/PSU can produce the inrush current demanded by the contactor coil.Mike in California

author: janame
author_rank: Newbie
timestamp: January 18, 2016, 06:19:40 pm
content: Thank you all for the replies and ideas!In the past, I'd been using an old Warrick Series 1 which had been mounted in a non-waterproof enclosure by the previous owner. The relay would chatter occasionally, causing the contacts to burn, which I'd then have to clean periodically to keep it working. I also had to replace the sense transformer a time or two. I was thinking this was a fault of the design, but I have since replaced it with a Magnetek 1500 (different brand, essentially the same design) in a proper enclosure, which has been working reliably so far.Somehow, a SSR seemed more reliable to me than one of these relays (no chattering / arcing possible). Is that not the case?The load is a 1HP motor at 240V which according to a Crydon application note I was reading I should be able to control with a 240V 30A SSR.The probes I have now are stainless steel and look clean even after many years in the well. The controller is indeed used to prevent the pump from sucking air which is a risk in the summer when the pump is faster than the well.It seems like conductivity ought to be a very reliable technique for measuring the level at two points only.

author: Kalvin
author_rank: Super Contributor
timestamp: January 18, 2016, 06:39:34 pm
content: Quotehttp://www.edn.com/design/sensors/4432793/Use-Time-Domain-Reflectometry--TDR--for-low-cost-liquid-level-measurement-Part-Ihttp://www.edn.com/design/sensors/4433352/Use-Time-Domain-Reflectometry--TDR--for-low-cost-liquid-level-measurement-Part-IIhttp://www.edn.com/design/sensors/4433411/Use-Time-Domain-Reflectometry--TDR--for-low-cost-liquid-level-measurement--Part-III

author: EPTech
author_rank: Regular Contributor
timestamp: January 20, 2016, 02:02:29 am
content: Hi there,I have used an MPX pressure sensor from Motorola successfully as a level sensor. It can measure pressure up to 11m water. What you do is attach a hose to the sensor and put it in your well. The hydro static pressure of the water will cause the air in the hose to be compressed and the MPX will give you an output voltage. All you need is an opamp with gain and offset adjust, feed it into the ADC of a µC and a good open collector output with MOV protection to drive a decent contactor for your pump. The MPX needs to be above the top water level so that water can never seep in. Also you need to make sure the hose connection is very good because you need to maintain the air bubble inside the hose.

author: Ian.M
author_rank: Super Contributor
timestamp: January 20, 2016, 02:55:26 am
content: Unfortunately water dissolves air so maintaining an air bubble long-term is problematic. Also the indicated level will shift as the air bubble volume varies with temperature. That's why a bubble gage includes an air pump so enough air can be pumped in to reach the end of the pipe every time, which solves the dissolving or leaking air and the volume variation with temperature problems.

author: joeqsmith
author_rank: Super Contributor
timestamp: January 20, 2016, 03:04:11 am
content: Sprague used to make a liquid level detector IC using AC.

author: EPTech
author_rank: Regular Contributor
timestamp: January 20, 2016, 06:08:21 pm
content: Quote from: Ian.M on January 20, 2016, 02:55:26 amCould one put a membrane, like a piece of balloon at on the water side of the tube or hose to prevent this from happening. One will probably have to characterize the balloon in the output response.I think it is doable but maybe going too far for this project.

author: Ian.M
author_rank: Super Contributor
timestamp: January 20, 2016, 06:32:06 pm
content: Certainly a limp bladder containing enough air that it never gets compressed flat could be added on the pipe end, but if its thick enough to be durable, its likely to affect the reading, you've got to get it down there without snagging anything, and if it ever develops a slow leak, your first indication is the system starts reading less depth, which could be very misleading. You also cannot easily repressurise the bladder from the top without pulling it, as excess air will cause it to overread when the temperature increases due to the bladder becoming taut. Some turds just aren't worth gilding.

author: RobertBG
author_rank: Regular Contributor
timestamp: January 21, 2016, 03:32:41 pm
content: I had a similar project not too long ago and I used a bilge alarm and sensors that I hacked and it worked quite well.I had to skim through most of the thread as I just got a call and have to run but here is a link to a company that supplied the sensors used in the high water alarm panel that I hackedhttps://standexelectronics.com/products/custom-reed-conductive-liquid-level-sensors-2/They have about any type of sensor that you can imagine and in my app they worked with the existing panel that I hacked.The panel I hacked also saved me a lot of work because of the multiple inputs and really simplified everything.It was a reliable,clean and simple way to run my sensors in and triggers out.

author: donmr
author_rank: Regular Contributor
timestamp: January 21, 2016, 04:31:57 pm
content: Several companies sell "Submersible Level Sensors". Here is one:http://www.dwyer-inst.com/Product/Level/LevelTransmitters/Submersible/SeriesSBLT2-SBLTX#relatedThey have controllers that work with them too.I wanted to build my own system, but someday I will need to sell the house and convince inspectors and buyers thatthe water system is robust and maintainable. So I decide to use commercially available units.