Skip to content

Ultrasonic IoT sensor πŸ›œ to measure water level in a well πŸͺ£πŸ’¦

Notifications You must be signed in to change notification settings

ubipo/water-well-level

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Water Well Level πŸ›œπŸ“πŸͺ£πŸ’¦

Ultrasonic IoT sensor to measure water level in a well

My dad and I needed a way to ensure the water level in a rain water collection well doesn't drop too low and that a pump actually uses the water as scheduled. So, as a fun end-to-end IoT project, I put together a sensor, serverless backend, and web UI.

Architecture

Sensor

The field-deployed sensor uses a hc-sr04-like ultrasonic ranger to measure the water level from above. The measurements from this are collected by an ESP32-S2 WiFi microcontroller. Because we don't - yet - have WiFi available though, I also added a SIM7600E cellular breakout board with a prepaid SIM. The microcontroller is programmed in C++ using the PlatformIO toolchain. This entire system is powered by two 2500 mAh @ 3.7 V LiPo batteries for a battery life of hopefully at least ~3 weeks @ 1 measurement/hour.

Serverless backend

The sensor periodically sends its measurements and remaining battery capacity to a serverless HTTPS API deployed to AWS Lambda. The lambda then saves these measurements to a DynamoDB table and notifies an SNS topic for SMS and email notifications. It also has an endpoint to query the table and to save and retrieve configuration values. This cloud infrastructure is all defined and deployed as Terraform code.

Web UI

Finally, a Svelte web app hosted on GitHub pages queries the lambda backend and presents the data in a graph using Chart.js. The app also allows you to configure the sensor remotely.

Images

Sensor

The sensor with white ultrasonic ranger, green SIM7600E cellular breakout board, and red ESP32-S2 microcontroller.

Water well

The water well with the sensor - for now - attached to pvc pipes.

Web app

The web app showing the water level and battery voltage over time.

Case CAD design

CAD model of the case for the sensor with snap close tabs. I haven't been able to produce a proper print yet due to bed adhesion issues.

About

Ultrasonic IoT sensor πŸ›œ to measure water level in a well πŸͺ£πŸ’¦

Resources

Stars

Watchers

Forks