Water Level Indicator Using Magnets
by pjnovas in Circuits > Sensors
19947 Views, 128 Favorites, 0 Comments
Water Level Indicator Using Magnets
![cover.png](/proxy/?url=https://content.instructables.com/FF9/DU65/J7MFNHLU/FF9DU65J7MFNHLU.png&filename=cover.png)
I have been thinking and researching about measuring water because I needed it for my next projects.
Most common way is using the water as a conductor, so if there is water between 2 wires you will get the close circuit, but main problem on conductive indicators is the water must have salts cause that's what gives the water the conductivity and that wasn't working for me because one of my projects was to have an alarm inside my disposal bottle of my air conditioner when it was full but since that water is from condensation it has no conductivity at all :(
A mechanical way is another option; we all have seen that inside our bathrooms, almost every toilet flush system works with a mechanical switch which consist in a buoy that closes the water entry. This method was a good approach but I wanted to keep my current simple bottle without having to create huge modifications on it by cutting it out and then having to seal it.
That's when I came across those simple buoy switches that uses Reed Sensors inside; keeping in mind that I wanted a simple solution I came up with this concentric pipe which holds reed switches inside it and has a moving buoy with magnets attached.
How Does It Work?
![water_level.png](/proxy/?url=https://content.instructables.com/FCT/52OY/J7L43QV2/FCT52OYJ7L43QV2.png&filename=water_level.png)
![testing.gif](/proxy/?url=https://content.instructables.com/FYX/0JFG/J7L43W6L/FYX0JFGJ7L43W6L.gif&filename=testing.gif)
First thing to understand: what is a Reed Switch?
The reed switch is an electrical switch operated by an applied magnetic field.
A buoy (which has magnets inside it) will float in water which means it will be keeping magnets at water level and since we have a Reed Switch (at some specific height inside the pipe) it will be activated (closing or opening the circuit) and if we know how many liters are at that height we know how much water is in the bottle.
An important thing, there is cap at the bottom of the pipe because we don't want water to be inside the pipe, the main idea of this method is to not use the conductance of the liquid to measure. Having water inside the pipe could lead into false indications by bypassing a reed switch.
I went a little overkill here with the amount of reed switches, my first idea was to test this method by placing a reed switch per liter (distance of 5 cm in that bottle) and I could tell the half state by getting 2 sensors activated at same time, so in short I could know every half liter the water level.
You don't need to go that precise, you can put 1 or 2, at bottom and top to know if is full or empty, the cool thing is you can get a switch at any level you want without destroying the bottle!
What You Need
![20170912_102314.jpg](/proxy/?url=https://content.instructables.com/FP9/M4A6/J7L43T4T/FP9M4A6J7L43T4T.jpg&filename=20170912_102314.jpg)
![boya_inodoro[1].jpg](/proxy/?url=https://content.instructables.com/FZ3/MBS4/J7L446AH/FZ3MBS4J7L446AH.jpg&filename=boya_inodoro[1].jpg)
![toilet_uni_flush_systems.jpg](/proxy/?url=https://content.instructables.com/FGW/UD4Q/J7L446AK/FGWUD4QJ7L446AK.jpg&filename=toilet_uni_flush_systems.jpg)
Bottle
Check the buoy size first cause it has to go through the bottle mouth - this buoy has a 30 mm outer diameter
Normally a family bottle of water should work (5 or 6 liters). A drum is another option but I suggest you to get a transparent one for simplicity of testing it.
Pipe
For this 3d printed buoy it has to be smaller than ~14 mm outer diameter.
Since you need to place reed switches inside so for this 3d printed cap to work in needs ~11 mm inner diameter but you can seal it with any other thing really.
Length doesn't matter, I would say to be bigger than your bottle height.
I've got my pipe from a local store buying a cheap and crappy toilet universal flush system (attached photos of them)
3D Printed parts
- Buoy (it has 2 equal parts)
- Cap
Here are the parts and how to print them: https://www.thingiverse.com/thing:2541017
Electronics
- Reed Switches I used NormallyOpen (NO): get as many as you want but get a couple more of what you need cause they may break by manipulation
- LEDs (5 mm) these are mainly for easy testing signals but you can use an arduino or anything you want
- Resistors (330 ohms) - if you go with leds you're gonna need protective resistors (so one for each led)
- Cable, I recommend you to use Cat5 cable, its the commonly known as networking cable. It has 4 pairs inside and they are pretty rigid so they work well for this reed-switches-inside-a-pipe application
Magnets
Well here is more a try an error really, I don't have the math for a good magnet vs reed switch ratio.
The only restriction is size cause it has to fit inside the buoy which has 4 places of size 2 mm x 10 mm x 15 mm height. If you're buying magnets I recommend you to have the buoy in your hand first.
I used magnets taken from an old hard drive breaking just one will give you the 2 magnets needed here which I later split each at half having a total of 4.
A note: notebook HDD magnets didn't work for me I guess they don't have enough strength, so use a desktop pc HDD magnets
Tooling
- Hot glue gun for gluing + sealing (if you have a better solution for this please put a comment!)
- Solder iron, soldering tin and some isolation tape or heat shrinkable for reed switches connections inside the pipe
Tying Reed Sensors Together
![20170910_111208.jpg](/proxy/?url=https://content.instructables.com/FZ7/KMAW/J7L43T66/FZ7KMAWJ7L43T66.jpg&filename=20170910_111208.jpg)
![20170910_111229.jpg](/proxy/?url=https://content.instructables.com/FP5/BQS1/J7L43T7J/FP5BQS1J7L43T7J.jpg&filename=20170910_111229.jpg)
Connections here are pretty straight forward, one common cable for all reed switches and another on each end, if you choose to use 5 reed switches you will end up having 6 cable ends.
What I did was to get a network cable and took 6 cables from inside (they have 8 in it). Measure the height you want to get your reed switches at and solder them like the picture trying to keep them vertical along with the cable, so it will be easy to insert into the pipe.
For my experiment I've used 5 switches at 5 cm of distance from each since for this Bottle each liter is 5 cm of height.
Building the Buoy
![level_v11.png](/proxy/?url=https://content.instructables.com/FCW/G85V/J7QGFZK7/FCWG85VJ7QGFZK7.png&filename=level_v11.png)
![20170912_102541.jpg](/proxy/?url=https://content.instructables.com/FMW/1673/J7L43T8W/FMW1673J7L43T8W.jpg&filename=20170912_102541.jpg)
![20170912_184828.jpg](/proxy/?url=https://content.instructables.com/FQ4/EZ9R/J7L43TA9/FQ4EZ9RJ7L43TA9.jpg&filename=20170912_184828.jpg)
![20170912_184818.jpg](/proxy/?url=https://content.instructables.com/FS7/CG1T/J7L43TBM/FS7CG1TJ7L43TBM.jpg&filename=20170912_184818.jpg)
![20170912_185141.jpg](/proxy/?url=https://content.instructables.com/FWC/25FV/J7L445AH/FWC25FVJ7L445AH.jpg&filename=20170912_185141.jpg)
I have placed instructions on each pic here, the most important thing is to seal the buoy since we need air inside for it to float so don't be cheap on the hot glue and fill every gap on outside
Building the Pipe
![20170912_185248.jpg](/proxy/?url=https://content.instructables.com/FS4/1INM/J7L43TBO/FS41INMJ7L43TBO.jpg&filename=20170912_185248.jpg)
![20170912_185933.jpg](/proxy/?url=https://content.instructables.com/FX2/TBZ3/J7L43TD1/FX2TBZ3J7L43TD1.jpg&filename=20170912_185933.jpg)
![20170912_193426.jpg](/proxy/?url=https://content.instructables.com/F63/NN3R/J7L43TEF/F63NN3RJ7L43TEF.jpg&filename=20170912_193426.jpg)
![20170916_201902.jpg](/proxy/?url=https://content.instructables.com/FQR/LXY1/J7MFNBIL/FQRLXY1J7MFNBIL.jpg&filename=20170916_201902.jpg)
![20170916_201817.jpg](/proxy/?url=https://content.instructables.com/FHN/WS6G/J7MFNBIO/FHNWS6GJ7MFNBIO.jpg&filename=20170916_201817.jpg)
Placed instructions on each pic, here some tips:
- It's a good idea to do 2 holes in the bottle cap so you can put and take water to test.
- Pipe cap may not be necessary, I think a good amount of glue will do the job BUT the cap also works as a trap-end for the buoy so take that into account
- Since the pipe will have air inside water will push it up which will take it away of the bottom. To fix this I used a rubber that came with the flush system kit from where I took the pipe, another option would be to fix it to the bottle cap using glue
Getting Some Test Signals - LEDS
![water_level_bb.png](/proxy/?url=https://content.instructables.com/F68/DVSD/J7L43QTM/F68DVSDJ7L43QTM.png&filename=water_level_bb.png)
![water_level_schem.png](/proxy/?url=https://content.instructables.com/F91/D8CT/J7L43QTL/F91D8CTJ7L43QTL.png&filename=water_level_schem.png)
![testing_2.gif](/proxy/?url=https://content.instructables.com/FAM/J6UK/J7L44590/FAMJ6UKJ7L44590.gif&filename=testing_2.gif)
Our final step is to get a visual signal for testing the device, it can be anything I've chosen leds cause it's the easier and faster way of doing it, but normally this is a first step to a bigger project where we will be doing something with that signal and a led won't help much in there.
Testing It All Together
![20170916_202216.jpg](/proxy/?url=https://content.instructables.com/FMH/3CG4/J7MFNBIJ/FMH3CG4J7MFNBIJ.jpg&filename=20170916_202216.jpg)
So here we are, a simple level indicator using magnets. From here there are countless things you can do with it, the only thing I do not recommend is to drink this water since it will be in contact with glue and 3d printed plastic, but there are many other things to try and play, I'll be working on some projects using this, if they make sense to share I'll be creating a second instructable.
If you build one yourself, please share it on the comments with a photo. Any questions and ideas are welcome!