Hello all,
In this blog, let's explore how we can calculate the water level using an ultrasonic distance sensor and then receive this data to my reciever node in my room.
There is no internet coverage at the place where my overhead tanks are kept. But recently I was getting a pretty big water bill but couldn't match the usage and hence
I wanted to monitor my usage by logging the water level and volume. To do this I will be needing some sensors and power also. This can be achieved by using battery only.
I had to have a self-sustainable system. Since it's an outdoor setup, solar energy is a good option to tap. So I selected a decent solar panel and a charging circuit.
I need to save the power also as the system runs on battery power. LoRa being very less power-hungry during sleep time, LoRa+Solar became a perfect choice for this project.
To measure the water level there are multiple methods like the probe-based ones which can measure based on the conductivity and can tell the level in terms of stages like
100%, 50%, 25% etc. I wanted to monitor the leakage of water and hence needed precise and continuous monitoring. Hence I chose the ultrasonic sensor.
This can measure the distance between the water and the lid and I can use this data to calculate the volume of water left in the tank.
Here's how.
Let the distance measured by the sensor be h.
Dimensions of the tank are as follows.
1. radius : 53cm
2. height: 115cm [till which water fills]
3. Capacity: 1000L
Image showing capacity
Image showing height
Volume of the cylinder is πr²h, here r is 53 and h is 115-h i.e water height.
V = (22/7*53*53*(115-h))/1000; //115-h provides actual water height VP = v*100/1000; //1000L capcaity
VP here is volume percentage.
Ultrasonic sensors works like a bat. It sends out a high frequency audio wave and listens to the echo and then calculates the time taken to receive the echo back.
By multiplying the speed of sound and dividing it by two provides the distance between the sensor and the target.
Now we have executional level logic and parts. Let's join some metals and melt some lead.
Solar panel producing 5V.
Let's drill some holes in the case and attach the cable gland.
Here's the attached cable gland on the case.
Soldering Timelapse. Just adding berg-strips for easy upgradability.
Connections are as follows.
Arduino MKR WAN 1300 HC-SR04
Pin 2 Trigger
Pin 3 Echo
VCC VCC
GND GND
#Blog1 Just Encase challenge: Getting started and deciding the architecture..
#Blog 2 Just Encase challenge : Building a LoRa based water level sensor and a demo.
#Blog 3 Just Encase Challenge : Setup of water level sensor and demo.
Blog 4 Getting started with the airquality monitor project.
#Blog 5 Just Encase Challenge : Final blog with the results and enclosure conditions.