Home > Projects > Project “Gallon” – Smart Drinking Water Monitoring Platform

Project “Gallon” – Smart Drinking Water Monitoring Platform

Summary of Project “Gallon” – Smart Drinking Water Monitoring Platform


This project is a Smart Drinking Water Monitoring Platform utilizing an Arduino MKR1000, Microsoft Azure cloud services, and mobile/web applications. It monitors water levels via capacitive sensors and controls dispensers remotely. The system integrates IoT hardware with real-time analytics to track consumption and manage alerts.

Parts used in the Smart Gallon:

  • Arduino MKR1000
  • PCF8574
  • AC-DC Module 5V 500mA
  • 10 Segment LED Bar Graph (Red)
  • Resistor 100 ohm
  • Resistor 1k ohm
  • Resistor 475 ohm
  • AMS1117
  • Capacitor 470 µF
  • Resistor 10k ohm
  • MOC3021
  • BTA41600B
  • Right Angle Tactile Push Button
  • Push Button Switch
  • 3 Pin Connector
  • 2x5 Box Header Connector IDC
  • 10 Pin IDC Female Header Socket Connector
  • LDR Module
  • MPR121 Breakout Module
  • LED (generic)

This project is a platform for drinking water monitoring and analytics, consists of IoT device, cloud, and mobile and web app.

Project Gallon Smart Drinking Water Monitoring Platform

Things used in this project

Hardware components

Arduino MKR1000
Arduino MKR1000
× 1
PCF8574
× 1
AC-DC Module 5V 500mA
× 1
10 Segment LED Bar Graph (Red)
× 1
Resistor 100 ohm
Resistor 100 ohm
× 11
Resistor 1k ohm
Resistor 1k ohm
× 1
Resistor 475 ohm
Resistor 475 ohm
× 1
AMS1117
× 1
Capacitor 470 µF
Capacitor 470 µF
× 1
Resistor 10k ohm
Resistor 10k ohm
× 4
MOC3021
× 1
BTA41600B
× 1
Right Angle Tactile Push Button
× 1
Push Button Switch
× 1
3 Pin Connector
× 1
2×5 Box Header Connector IDC
× 1
10 Pin IDC Female Header Socket Connector
× 1
LDR Module
× 1
MPR121 Breakout Module
× 1
LED (generic)
LED (generic)
× 1

Software apps and online services

Microsoft Azure
Microsoft Azure
Used services: Azure IoT Hub, Azure Event Hub-compatible endpoint, Azure Virtual Machine, Azure Stream Analytics Job, Azure Storage Account
Smart Gallon UWP App – Binary
It’s the binary of the app. Directly install-able on Windows 10 device. Please read the “read me first!.txt” file.
Arduino Eclipse IDE
I use this for developing Arduino MKR1000 firmware, instead of official Arduino IDE. Used version is V3
Visual Studio 2015
Microsoft Visual Studio 2015
Used for developing Windows 10 Universal Windows Platform app.

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Quick Solutions to Questions related to Smart Gallon:

  • What components are used for non-invasive water level sensing?
    The project uses a capacitive sensor leveraging the MPR121 module to measure capacitance values without physical contact with the water.
  • How does the device communicate with the cloud?
    Communications between the device and Azure IoT Hub are done entirely with the native MQTT protocol over secure TLS/SSL communication.
  • Which IDE is recommended for developing the Arduino firmware?
    The developer recommends using Arduino Eclipse IDE version V3 instead of the official Arduino IDE for this specific project.
  • Can I use the UWP app on different Windows devices?
    Yes, the Universal Windows Platform app can be installed on Windows 10 tablets, desktops, and phones using a single codebase.
  • How is the hot water status detected?
    An LDR module detects whether the hot water LED on the dispenser is on or off to notify if hot water is ready.
  • What Azure service processes the data stream in real time?
    Azure Stream Analytics Job is used to process the data stream received by Azure IoT Hub in real time to calculate water level change rates.
  • Where is the backend hosted for the web dashboard?
    Azure Virtual Machine is used to host the Node.js-based backend, MongoDB database, and the dashboard web app.
  • How does the dashboard receive data from the IoT hub?
    Data is relayed to the dashboard via a web socket by the Gallon Watcher backend rather than connecting directly to the MQTT broker.
  • What library is used for JSON parsing in the firmware?
    The ArduinoJson library is used for parsing JSON commands received from Azure IoT Hub.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top