DIY Water Level Controller
DIY Water Level Control Circuit Using a MOSFET
Over the years I've completed quite a few projects on this subject on my own, but I'd never gotten around to publishing any of them — not in a journal, not even on my own blogspot. Until now.
My approach has always been the same: develop circuits that are inexpensive, built from commonly and locally available parts, keep the component count to a minimum, and — most importantly — make sure they're fool-proof in operation.
Over the years I've used just about everything, from a single transistor, to ICs, to microcontrollers, chasing different goals each time: maximum efficiency, low cost, ease of assembly, ease of installation, ease of maintenance, and long life. I also make a habit of recycling old components salvaged from scrapped devices and gadgets wherever I can — it's what keeps a project as inexpensive as possible.
The Circuit
My latest controller comes down to just four bought components, all picked up from the local electronics store:
- A 55N06 MOSFET
- A 1 µF / 25V electrolytic capacitor
- A 12V single-contact relay with 10A contacts
- A silicon diode (1N4007)
I already had a 12V SMPS mains adapter on hand, and everything else needed came out of my scrap bin. None of the part dimensions are critical — just use common sense for what fits your build. Any suitable enclosure and wiring will do.
The finished gadget has two sections:
- The part fixed on the water tank, where water flows out to the kitchen, bathrooms, etc.
- The part near the motor or electric pump — in my case, a 0.5 HP monoblock pump.
The relay with the 10A contacts has now been running reliably for the past 10 years.
Part 1: The Float Switch Assembly
This section has two switches, each with a suspended float, that control the pump according to preset upper and lower water levels in the tank.
The two stainless steel (SS) levers are simply the two halves of a cut tongue cleaner. They're mounted on a PVC strip, which in turn sits on a small PVC rectangular box. Both PVC parts are made from a length of PVC pipe: cut it open longitudinally, unroll it after softening it in boiling water, and flatten it into a sheet using a hot electric iron. From there it's just a matter of cutting and bending it into a box of the size you need.
Both switches are built the same way. To make them you need two graphite rods and two SS levers:
- The graphite rods come from dead AAA dry cells.
- The SS levers are bent slightly upward at the fixed end, which forms the moving contact of each switch. That bend also gives them spring action, letting them return to their original position after being deflected.
One lever acts as the moving contact of the N/C (normally closed) switch for the upper water level — its fixed contact is a graphite rod mounted on the PVC frame, positioned above the lever, touching it.
The second switch is N/O (normally open), built the same way, except here the graphite rod is fixed below the lever on the PVC frame.
For floats, I used two discarded plastic ice-cream balls (empty Homeo/polythene bottles work just as well), suspended from the free ends of the levers. I used thin nylon fishing line for the suspension — though a fine SS thread-like flexible wire pulled from an SS net also works, and lasts a long time. Cut the suspension length to set your desired upper and lower water levels. One important detail: the floats need to be filled with water, otherwise they're too light to act as a load on the levers and won't trigger them properly.
The whole box is mounted above the tank on spacers, to keep rainwater out, with two holes drilled into the tank so the floats can move freely in the water below.
Here's how the switch assembly comes together:
Once that's built, the capacitor, MOSFET, and switches are wired up per the circuit diagram below.
A couple of practical notes:
- Tinned copper wire holds up best over time.
- Soldering to the SS levers is much easier if you use a zinc chloride solution as flux.
On Preparing Zinc Chloride Solution
Warning: Please don't attempt this unless you're familiar with these kinds of chemical reactions and their toxicity. Chemical reactions are, more often than not, hazardous — treat them with the respect they deserve. The following is meant only for those with a chemistry background.
Remove the outer metal cover of any dry AA or AAA cell. The inner metal cover is zinc. Using a pair of pliers, carefully remove the graphite rod without breaking it (this gets harder if the cell is very old and completely dried out). Once the rod is out, scrape out the inner black powder with a screwdriver. Separate the zinc cover, wash it well, and cut it into small pieces.
Drop those pieces into concentrated hydrochloric acid (the "bathroom acid" sold for cleaning tiled floors), adding excess zinc so some metal is left over after the reaction finishes. What's left is a zinc chloride solution. If you're not confident about the chemistry involved, get help from someone who is qualified, and never attempt this without full precautions. If any part of your body may have come into contact with the chemicals, wash thoroughly right away.
After wiring everything up, three wires — red, blue, and yellow — run from Part 1 to Part 2.
Part 2: The Relay and Power Section
This section holds the relay and a 12V/1A SMPS module. The yellow wire, coming from the drain (D) of the MOSFET, connects to the relay coil, with a diode across it for shunt protection (not shown separately in the circuit diagram — it's connected reverse-biased, in parallel with the coil, to protect the MOSFET from back-EMF). The other end of the relay coil goes to the +12V supply. The blue wire connects to the SMPS negative terminal, and the red wire to the SMPS positive terminal.
The motor/pump itself runs on 220V AC, switched through the relay's 10A contacts.
How It Works
The circuit needs an electronic latch to work smoothly. Nobody normally thinks of a MOSFET as a latching device, but I decided to use one anyway for this purpose — its characteristics turned out to suit the job well. (I'd actually tried a triac for the same role earlier, and that one is still working nicely after ten years too.)
The logic of the system comes down to the states of a few elements:
- UL – upper water level float switch
- LL – lower water level float switch
- S1, S2 – the switches for the upper and lower water levels, respectively
- C – the capacitor
- MOS – the MOSFET
- RL – the relay
- P – the pump
Here's the logic table for the full cycle:
Reading through a full cycle: as the tank drains and the level falls below LL, the N/O switch S2 momentarily closes, charging the capacitor and switching the MOSFET on. That latches the relay, and the pump starts. As the water rises back above LL, S2 has already opened again, but the charge held on the capacitor keeps the MOSFET — and so the relay and pump — latched on. That's the whole point of using the capacitor as the latch memory: a momentary float trigger isn't enough on its own to keep a pump running for the several minutes it takes to refill a tank.
The pump keeps running right through "above LL," all the way up until the water reaches UL. At that point the N/C switch S1, held closed by the rising float, discharges the capacitor. The MOSFET turns off, the relay drops out, and the pump switches off — back to the "above UL" resting state, waiting for the cycle to repeat.
It's a simple, cheap, and remarkably long-lived little circuit — proof, I think, that you don't need anything fancier than a MOSFET, a capacitor, a relay, and a diode to solve a problem that's been running reliably in my own house for a decade.
That's electronics, mechanics and chemistry all rolled into a practical project that appreciates recycling and reuse! Thanks for sharing. I appreciate your inventive mind.
ReplyDeleteThank you Hari.
DeleteA beautiful DIY project that can be taken up by any one who has inclination and rudimentary knowledge of electronics. You have very clearly explained how to go about it. Considering the cost and durability angle, it is worth trying.
ReplyDeleteThank you.
DeleteI thought about the blog again.
DeleteIt is worthy of publication in some leading electronic journal.