BRYXJRSG Fluid Management System

Ragul Balaji
4 min readMar 23, 2022

A Cloud Computing and IoT Project using ESP32s, MQTT and DigitalOcean. This course project was made for the SUTD 50.046 Cloud Computing and Internet of Things module.

The Problem

As reported by PUB, water demand in Singapore is currently about 430 million gallons a day, enough to fill up 782 Olympic-sized swimming pools. This is expected to almost double by 2060 in tandem with population and economic growth. As such, Singapore would need to ensure an efficient, resilient, and scalable water distribution infrastructure to sufficiently support this demand, since water is a necessary and valuable resource. Currently, PUB maintains a 5,800 km-long water transmission and distribution network across 17 reservoirs, 5 NEWater factories, 4 desalination plants, and 4 water reclamation plants. Since water is such an important asset for Singapore, the security and reliability of this infrastructure need to be maintained.

This project aims to propose a possible implementation of such a fluid distribution system by conducting various experiments on our scaled-down version of such a system. To this end, we plan to implement a scaled-down water management system. The overall design of our system architecture is as such:

Figure 1: Overall system architecture of our project. Outline map of the USA used only for illustration purposes.

Our aforementioned system takes advantage of current IoT technologies such as ESP32s and MQTT. Said IoT technologies are suitable to be used for this project since they allow for efficient computing and data processing at relatively low power and low costs. Cloud computing would also be utilized to ensure flexible and scalable infrastructure resources are allocated for on-demand use. Cloud computing would also allow rapid, agile development and maintenance with access to many software and services. Our application would also remain reliable, secure, and up-to-date with pay-as-we-go options.

For our project, there is also great synergy between IoT and cloud computing technologies to work together due to the distributed, inaccessible, and relatively offline nature of water reservoirs and underground fluid distribution pipelines, which can span across thousands of kilometers throughout a country.

Figure 2: Singapore’s local water catchment and reservoir network across the country. Credits to PUB.

Through this project, we hope to improve the reliability, security, and effectiveness of current-generation fluid management systems, as well as to inspire others to build better fluid management infrastructure systems and to promote more research in this area.

18 APRIL 2022 UPDATE! ⤵️

Building the Prototype

Using USB aquarium pumps coupled with 5V relay we can control when water is pumped from one tank to another. With a HX711 ADC paired with a load cell and some calibration code, we were able to measure the weight of water inside each $2 Daiso Tupperware with sub-gram precision.

Physical layout of all the prototype’s electronics, mechanical parts and plumbing.

Since we wanted to model the fluid distribution pipeline after real world oil/gas pipelines, we designed our system such that the water flows sequentially from one tank to another, before finally feeding back to the reservoir.

Each tanks is powered by an ESP32 which is communicating with our cloud infrastructure over MQTT with TLS. The MQTT connects to VerneMQ, a performant & distributed open source MQTT broker, which runs inside our private cloud.

Our private cloud infrastructure which powers this IoT & Cloud Computing Project

All components inside the private cloud have been Dockerized to both sandbox them and aid in future horizontal scaling. Internally our app runs on a Node.js backend which talk over secure mqtt with VerneMQ and uses MongoDB as a database to store historical data. The app also serves a dashboard with analytics over HTTP and Websockets (via the Socket.IO library). NGINX acts as a reverse proxy for our Nodejs app server and with the help of Let’s Encrypt and Certbot provides a secure HTTPS connection to the outside world.

A logical diagram of the whole system we developed!

Operator’s Dashboard

The dashboard shows the user real time status of all the tanks and pumps. This is accompanied by a graph of recent volume changes plotted against time. The operator is also able to send new volume targets to the system via the Control Panel. This was built with Socket.IO for realtime data from the backend, Bulma for the CSS framework and Chart.js for the analysis graph.

Screenshot of the operator’s dashboard during live operations.

Video Demonstration

Watch our prototype in action!

Project voting by our fellow peers, we won :)

Crafted, designed and built with ❤️ by:

--

--