Introduction
Hello everybody, I am Shafin, a member of Aiversity. I am going to share how to build a water level sensor for water tanks with a Raspberry pi. This project is going to help you to understand the working of Raspberry pi in detail. if you want the video project, it is below.
For the full project, visit http://aiversity.com/water-level-monitor-using-raspberry-pi/
Or, the written project is below
Extra Materials:
- Bucket
- Water Jug
Connections
Now let’s talk about the connections of the raspberry pi, ultrasonic sensor, and Buzzer.
Please follow the circuit diagram given below
Connections:
Ultrasonic sensor VCC to 5v of Raspberry Pi
Ultrasonic sensor Gnd to Gnd of Raspberry Pi
Trigger to GPIO 2
Echo to GPIO 3
Buzzer + to GPIO 4
Buzzer – to Gnd
Structure
· Attach a scale to the bucket.
· Next attach the buzzer and ultrasonic sensor to the scale
Code
Now you know the connections and the structure, let’s build the code.
1. Open the Thonny Python IDE
2. Download the Github code or from below:
3. Run the code.
Testing
Fill water in the bucket. When the distance of the ultrasonic sensor from the water is around 4 centimeters, the buzzer will beep, alerting the bucket is almost full.
If you have any queries, please ask at Shafin@Aiversity.com
To know more, visit Aiversity.com
Comments