Introduction: Magnetic Liquid Level Sensor

About: Whatever we imagine – it's possible!

This is a very simple device that works with magnetism! The most important thing is that such a device is not afraid of moisture or corrosion and can be used in different environments and conditions. This level sensor can be used as a level indicator for water or other liquids. It can also be used to automate the control of a water pump, various solenoid valves, alarms, and other actuators for home and industrial processes.

To create this device, I used the minimum amount of standard and improvised parts and materials. No complex electronic components, such as ultrasonic sensors or microcontrollers, are needed to assemble a device for monitoring the level of liquid media. All you need is a neodymium magnet from an old computer hard drive (HDD), magnetic reed switches from an alarm, and sewer supplies that you can buy at a hardware store.

Supplies


Materials:


  • Neodymium magnet (from a computer hard drive)
  • Reed switches, 3-contact x 2 pcs
  • LEDs, three colors (R/Y/G) x 3 pcs
  • Resistor: 0.68–1.5 k
  • Low-voltage wire, 5-core (from burglar alarm)
  • Connector: 4 pins (for example, from a dimmer for RGB LED)
  • Power supply: 3V–12V (4.2V lithium-ion battery)
  • Low-voltage switch (optional)
  • Transitional coupling (two-pipe) PVC, d = 50 mm x 2 pcs
  • PVC end cap d = 50 mm (50PVC-U) x 2 pcs
  • PVC latch collar, d = 50 mm
  • Plastic U-shaped profiles (from furniture accessories)
  • Plastic plate =4-6 mm
  • Aluminium rivets, d = 4 mm x 10 pcs
  • Heat-shrink tubing
  • Electrical tape 
  • Plastic nylon straps (screeds)


Tools:


  • Drill machine & drill d = 4-6 mm
  • Riveter & rivets
  • Heat gun (building hair dryer)
  • Hot glue gun & glue (or silicone)
  • Soldering gun & consumables
  • Multimeter
  • Screwdrivers, pliers, cutting pliers, caliper, and other tools that can be found in any home workshop

Step 1: Idea

I developed this device for the septic tank system at home as an indicator for monitoring the level of sewer filling. The task was to create a reliable sensor that should work in conditions of moisture and at different temperatures. At first, I thought to apply the principle of a float, for example, by placing it in a cylinder (pipe).

But life guides and suggests the right paths; you just need to be able to realise it! In my septic tank, there was already an outlet for sewer pipes with a diameter of 110 mm and 50 mm. The solution came on its own. Thus, it became possible to fix the device on a 50-mm pipe, excluding other possible mounting options. All materials must be plastic, aluminium, stainless steel, bronze, or other materials that are resistant to damp environments.

Step 2: How Does It Work?

The principle of operation of the liquid level sensor is based on the interaction of a magnet and a reed switch. By moving the magnet along the two reed switches, switching occurs.

The reed switch reeds are magnetized according to their attractive magnetic polarity. Thus, the force of the external magnetic field of attraction causes the contact to close. Any residual magnetism on the reed blades interacts with the reed switch's opening and closing.

There is a triggering due to the magnetic field, and the contact on the reed switch is closed. Accordingly, this turns on LEDs that glow a certain colour, indicating that the tank is filled with liquid to a certain level.

I tried to simplify the device circuit as much as possible and achieved the use of only two reed switches. It was also important to use as few parts as possible for reliable and long-term operation of the device.

Step 3: Liquid Level Sensor Circuit

Based on the circuit diagram, it can be seen that in the lower position of the float, when the green LED HL1 is on, the second reed switch is activated. The liquid level is below the float, which is limited by a stopper. Accordingly, the magnet closes the contacts of the reed switch. As the liquid level rises or the tank is filled, the magnet moves, and the second reed switch, which connects the yellow LED HL2, turns off the green HL1. When the critical liquid level is reached, the magnet activates the first reed switch, the red LED HL3 lights up, and the yellow one goes out, indicating that the tank is full. If there is any malfunction with the float or magnet, the yellow LED will be on. For example: tipping of the float or mixing of the magnet, breakage of the stopper, or other malfunctions If you add a relay to the device circuit, you can use it as an actuator to connect more powerful loads. You can use a solid-state relay, that is, an electronic one.

Also, you can connect a buzzer to the second reed switch for sound notification, a mobile phone, Wi-Fi, and so on. Thus, you can be on the other side of the globe and be notified when an alarm is triggered or a relay is turned on.

Step 4: Reed Switch

The reed switch is designed for switching electrical circuits with direct and alternating current. The current frequency can reach up to 10 kHz, with resistive and inductive loads up to 300 V and currents up to 4 A! At the same time, the switched power is up to 30 W (VA).

The reed switch consists of two ferromagnetic conductors enclosed in a hermetically sealed glass bulb. An inert gas (nitrogen) may be present inside the capsule. Thanks to nitrogen, the maximum switching voltage limit increases. That is, it becomes possible to use it in electrical circuits with 220 V. Instead of an inert gas, the capsule can be evacuated. This allows the reed switch to operate at high voltages (thousands of volts).

The contacts of the reed switch are made of ferromagnets and can be coated with erosion-resistant metals such as iridium, ruthenium, or rhodium. Spraying allows you to repeatedly increase the number of operations up to 5 billion times!

There are reed switches with mercury contacts. Mercury provides reliable operation for contacts and also reduces their bounce. Such reed switches require installation in the correct position, as otherwise droplets of mercury can connect the contacts even in the absence of a magnetic field. There are closing, opening, and switching reed switches according to the type of operation.

The principle of operation of the reed switch is very simple. When exposed to a magnetic field, for example, from a permanent magnet, the reed switch contacts are polarized and triggered—they close, open, or switch. The reliability of its inclusion depends on the orientation of the magnet. That is, with what pole it is turned and movement relative to the reed switch.

Reed switches can be found in non-contact sensors in alarm systems: on windows, doors, as position sensors, limit switches, etc. Reed switches are now rarely used as position sensors because Hall sensors are used more often.

The reed switches can be removed. Also, the reed switch can be found on your laptop. It works when the lid is lifted. I also found them in online stores. I also found and removed reed switches from old computer keyboards.

Specifically, for a certain reed switch model, you need to look at its characteristics before using it in the circuit! The same reed switches that I used in this circuit were previously tested to connect a load of several amperes with a voltage of 12 V.

Step 5: Power Supply

If this liquid level sensor is used as an alarm, then a low-voltage power supply can be used. And if you connect a more powerful load through the reed switch, then you need to select a more powerful power supply accordingly.

So, if you use standard LEDs, you can power the device from any source of constant voltage between 2.8-12 volts. For example, instead of a phone charger with a 5 volt switching power supply or two 1.5 Volt batteries, a more compact 3V or 9V one is also suitable. In this case, it will be necessary to change the resistance of resistor R1, which limits the voltage supplied to the LEDs. The switch should be smaller, although you can do without it by keeping the indicator on constantly. Installation is simple – hinged. Indicator LEDs can be built into a small plastic box or installed directly in the electrical panel indoors. During the construction of the sewerage system, I took care of the wiring in advance. That is, my wires were laid in polyethylene pipes for electrical wiring and carried into the house next to the sewer pipes. I connected the indicator LEDs via a 4.2 V lithium-ion battery.

Step 6: Device Design & Float

Having picked up all the materials and figured out the principle of operation for electricians, you can proceed to assemble the device. My work took a few days, including development and experiments.

I had the idea to use a plastic sewer sleeve as a float. On both sides, it is closed with plugs and thus becomes airtight, that is, waterproof. I used another sleeve as a holder, and the main body of the whole structure. The float holder arm will move relative to this support sleeve.

Based on the length of the float holder, the course of operation of the device depends. In my case, the length is approximately 40 cm. The float profile must be heated with a building hair dryer and laid on the sleeve. This should be done as quickly as possible while the plastic is hot and being fed into the model.

After that, the plastic profile, which, when heated, took the form of the diameter of the coupling, must be fixed with aluminium rivets. Before that, you need to drill a hole with a diameter of 5 mm, that is, slightly larger than the diameter of the rivet. The resulting clamp should provide easy rotation relative to the reed switch coupling. After installing the plugs on it, the float is put on a pre-prepared profile and also fastened with rivets. The fact that the design of the float holder has a certain flexibility will prevent it from breaking in the future.

Step 7: Installation of Magnet & Limiter

A suitable-sized neodymium magnet can be used as a magnet. I used a neodymium magnet taken from an old computer memory disc. In order to fix the magnet, I used a plastic part (PVC), which I cut out in the form of a triangle and drilled a hole in. The shape of the triangle is due to the fact that the magnet must be fixed to the profile. A triangle is most suitable for stiffening the structure. After that, using a riveter, you need to fix the entire structure to the plastic bar of the liquid level sensor. The neodymium magnet must be fixed to the structure so that it is at the actuation distance of the reed switches.

Having drilled holes with a diameter of 5 mm in the sleeve, a stop float stopper is installed, which is necessary for the correct position of operation during the operation of the sensor. As a limiter, I used an 18-mm plastic profile, which is usually used in furniture manufacturing. From the U-profile, I cut a piece approximately the length of the sewer sleeve.

Step 8: Bracelet

It seems incredible, but the variety of sewer pipe parts allows you to use them in different DIY projects. A 50-mm PVC pipe clamp is just right for installing reed switches for a liquid sensor.

I advise you to first test the circuit of this device and then assemble it. You need to be careful when working with reed switches because it is very easy to break the glass case when bending the legs. Using a plastic clamp, you need to fix the reed switches with hot glue. The distance for them is selected experimentally; it should ensure the operation of the reed switches when passing at a distance of several millimeters from the magnet. It is necessary to seal the connection with heat shrink and fill it with hot glue or silicone.

The finished bracelet is put on the clutch and allows adjustment of the best actuation position. Also, it is easy to replace it in the event of a malfunction by simply disconnecting the plug. The plug must be waterproof and have four pins. If the plug is exposed to moisture, cover it with heat shrink or silicone. You can do without a connector by soldering the wires directly to the wiring.

At the time I made this liquid level sensor, I did not have a more suitable connector. That's why I used the connector from the RGB LED strip. I advise you to use a waterproof connector, for example, on electric bicycles.

Step 9: Installing a Sensor in a Septic Tank

The last step is to install the liquid level sensor. Before installation, you can make sure that all components are assembled correctly and that all electrical connections are working. The fact is that after installing the sensor in the septic tank well, it will not be desirable to redo it if the tank is full. Although I made all the components of the device removable and collapsible as much as possible,

All elements are assembled simply and without any problems. Now you need to put a bracelet with reed switches on the pipe and connect the plug and the LED indicator. For reliability, it is possible to drill a hole through the coupling and the sewer pipe by inserting a stopper made of non-corrosive metal (an aluminium or bronze screw) into it.

The liquid level sensor can be fixed in other ways, for example, by installing a plug on the working coupling and fixing it to the tank surface.

Step 10: Test & Conclusion

I made this sensor in order to protect against liquid overflow when filling the tank. For a long time, it has been working for me as a liquid level indicator and shows its high stability. It can also be used for other purposes. For example, it can turn on and off the water supply pump for an outdoor shower. Or monitor the filling of different containers with liquid. You can change the size and location of the liquid level sensor parts in order to adapt them to certain tasks. But the working principle remains the same. The principle of magnetism for turning on reed switches in this device is a very reliable solution! And as you know, reliability is tested over time!

Step 11: Video Demonstration

Thanks for your time and attention to this topic! 🌼

Magnets Contest

Runner Up in the
Magnets Contest