Arduino Liquid Level Meter With Simple Homemade Sensor

by mircemk in Circuits > Arduino

549 Views, 0 Favorites, 0 Comments

Arduino Liquid Level Meter With Simple Homemade Sensor

APH1.jpg

  This time I will describe a way to make a sensor yourself, and then with the help of a microcontroller to accurately determine the level of liquid in the container. I will also show you how this level and its change can be tracked graphically on the PC monitor.

Supplies

  • Arduino Nano microcontroller
  • Homemade sensor

Descriptoion

Arduino Liquid Level Meter with simple Homemade Sensor

 Get 10 PCBs only $5 https://www.pcbway.com/QuickOrderOnline.aspx

   There are many different ways to detect the level of water in a particular container. This time I will describe a way to make a sensor yourself, and then with the help of a microcontroller to accurately determine the level of liquid in the container. I will also show you how this level and its change can be tracked graphically on the PC monitor.

DIY Sensor

IMG_20220612_093338.jpg
IMG_20220612_093842.jpg
IMG_20220612_095310.jpg
IMG_20220805_202651.jpg

  To make the sensor, we need only a ribbon cable from old IDE disk or floppy drive. First we need to separate 4 wires from the cable, and cut them to a length equal to the depth of the container in which the liquid level is to be monitored. Then on one side we remove the insulation with a length of about 1 cm. We need to make the other end waterproof in some way. 

 When immersing a sensor in a liquid, its capacitance changes proportionally, and we detect this change with the help of an Arduino microcontroller. As for the Arduino, in this case we use the "Capacitor" library with the help of which we can measure capacitance with no external hardware, and requires one digital pin and one analog pin.

Serialcominstruments Software

Screenshot_3.jpg

  Next, I will describe the way we can monitor the state of the liquid in the container in graphic form on the PC monitor. For this purpose I will use the great Freeware software "SerialComInstruments". With this software you can create a set of virtual instruments for bidirectional connection with microcontrollers. There are a lot of different instruments available and more will be provided in the future. Instruments can be placed everywhere within the screen. The data protocol is very simple to enable even hobbyiest to come to a working project with only a few lines of microcontroller code in a short time. You can download the software (SerialComInstruments 4.1) at authors page:

    http://www.serialcominstruments.freecluster.eu/?i=1

There is also a detailed manuals for the program in .pdf format.

Schematic and Code

schematic mala.jpg