WaterAid is an IoT empowered, smart water quality monitoring device enabling remote data collection and visualisation on a dashboard.

Similar projects worth following
WaterAid is an application that allows for the easy monitoring of water quality anywhere in the world. The device is equipped with multiple sensors that together monitor the overall quality of the water. This data is then centralised in a database where it is visualised on a dashboard.

WaterAid is an affordable, mass producible and open source end to end application which allows governments, private associations and even individuals to take water quality readings and share them with the community, enabling data analysis and observations which can allow authorities to identify places that are being polluted (rivers, lakes, sea, ocean) and take appropriate measures to ensure that the water is clean. This allows us to work together and help our marine environment.



We live in a time when innovation and developments in technology advance much faster than we could have ever anticipated. That being said, there is a great need for resources to fuel these developments. Oil, fuel and electricity drive the technological world and are essential to our development.

Although a shift to green energy is inevitable, at the present, only 24% of our energy usage is renewable. Hence, we work primarily with other energy sources that produce a lot of waste. This waste pollutes the atmosphere and waters of the world, endangering animals, and our own health.

Take for example the Persian Gulf war oil spill in 1991, 520 million gallons of oil were intentionally poured into the ocean. This destroyed the ecosystem in the area killing over one million marine animals and bring a few species to extinction.

If such events happen, it is essential to save the endangered species that are being affected. But with limited resources, it is often difficult to know which areas are hit worst and where intervention is needed most urgently.

But that is only one facet of the story, today, only 2.5% of the water on the planet is considered safe to drink. As more corporations and private individuals pour dangerous chemicals into rivers, lakes and seas, this precious resource is slowly being polluted.

Besides the direct consequences of the pollution – dirty water, death of marine species, etc. People and animals that consume the polluted water may observe health issues. As the corpses of species decay in the water on a large scale, the water becomes infested with disease. Humans and animals drinking this water can then contract diseases such as Polio and Trachoma (some of which are not treatable).

All of this can be prevented from happening by identifying polluting at its source. Water quality monitoring is essential to identify the quality of water throughout the world, be it in oceans or lakes. But such solutions are often expensive and difficult to implement. As well as this, maintenance is a great concern.

By identifying places were water pollution is high, authorities can then accordingly check this area to identify the parties responsible, be it a change in the ecosystem or a company dumping dejections in the water.

This is where WaterAid comes in. WaterAid is an application that allows for the easy monitoring of water quality anywhere in the world. The device is equipped with multiple sensors that together monitor the overall quality of the water. This data is then centralised in a database where it is visualised on a dashboard.

The device can be used in two modes: in an enterprise mode where multiple devices can continuously monitor a stream or any other body of water by being placed in fixed positions on the body of water.

The other mode is a personal mode. The device can be used by private individuals to monitor the water quality at various points. This mode allows the device to be carried around by a surveyor for example who is tasked to collect a single sample of water at different points along the sea shore to see if the water is appropriate for bathing or along a river to ensure that everything is ok. Other private individuals can carry a device with them on hikes for example to see if streams of water they found are drinkable. This data collected can then be shared to a public dashboard where other people can check the water quality in a certain area and then contribute with their own data.

WaterAid is an affordable, mass producible and open source end to end application which allows governments, private associations and even individuals to take water quality readings and share them with the community, enabling data analysis and observations which can allow authorities to identify places that are being polluted (rivers, lakes, sea, ocean) and take appropriate measures to ensure that the water is clean. This allows us to work together and help our marine...

Read more »


The circuit schematics for the project

fzz - 399.27 kB - 07/28/2020 at 15:03


Enclosure Schematics.stl

The CAD file for the enclosure of the project

Standard Tesselated Geometry - 184.75 kB - 07/28/2020 at 15:03


plain - 1.24 kB - 07/28/2020 at 15:03


ino - 9.69 kB - 07/28/2020 at 15:03


plain - 871.00 bytes - 07/28/2020 at 15:03


View all 7 files

View all 9 components

  • Log 8: Published the project on Hackaday

    Andrei Florian08/24/2020 at 13:34 0 comments

    The project was initially published on Hackster a while ago. I got contacted not too long ago by a Hackaday representative telling me about the Hackaday impact prize. It sounded very exciting so I decided to refactor the project a bit and publish it on Hackaday!

  • Log 7: Finished the dashboard design

    Andrei Florian08/24/2020 at 13:32 0 comments

    So I used a dashboard very similar to the final one when I went out to collect some data. In the final version, I added the email alerts so that if the pH or turbidity of a reading is abnormal, an email will be sent alerting this.

  • Log 6: Went out to gather some data

    Andrei Florian08/24/2020 at 13:30 0 comments

    I went around to collect some data from the device and ensure that everything is working fine. I started off by heading to a canal near me and leaving the device in the water for around 4 hours and collecting the data sent back. I noticed that the pH reading was very bad and tested the pH probe to see what reading it gave when I put it in distilled water. Because the reading was not 7, I had to recalibrate the probe by leaving it in the distilled water until its reading was of pH 7.

    I then headed closer to the City Center. I walked around tributaries of the River Liffey (Dublin) and placed the device in the water to take a reading at different points. I then collated this data in a dashboard I created using Soracom Lagoon. I found that one of the readings showed a bad pH value in one of the tributaries of the river.

  • Log 5: Constructed the enclosure

    Andrei Florian08/24/2020 at 13:22 0 comments

    Because of the time constraints, I had to get creative with the enclosure for the project. I have to admit that this isn't the most appealing enclosure I made up to date but it does get the job done.

    I started off with pieces of piping cut into different sections. I then glued them together and insulated them.

    After that, I placed all the components within the enclosure and sealed it off.

  • Log 4: The code is ready!

    Andrei Florian08/24/2020 at 13:19 0 comments

    I worked about 3 weeks on the code for the project. I split the task into multiple code versions ranging from initial drafts where the sensor data would be read and stored in local variables to sending this data to the backend. I then published the final version of the code on GitHub

  • Log 3: Got the components, ready to go!

    Andrei Florian08/24/2020 at 13:17 0 comments

    I received the components over the next couple of weeks. I then started building the project. I started tinkering with each component separately trying to understand them and interface them with the Arduino. I had to calibrate the pH sensor to ensure that its reading was precise at this time. I then started working on the final version of the code amalgamating all components together in the project.

  • Log 2: Ordered the Components for the project

    Andrei Florian08/24/2020 at 13:13 0 comments

    The next thing I did was order all the components I needed to build the project. The list of components is displayed in the project's story. I bought the majority of them off Amazon because of their fast shipping time.

    I had some of the components such as the Arduino MKR GSM already as I used them in previous projects.

  • Log 1: Finished the Planning for the Project

    Andrei Florian08/24/2020 at 13:11 0 comments

    I use MS Whiteboard to sketch out ideas for the projects I make and bring everything together there. I finished planning the project about 2 weeks after I came up with the idea for it. I had planned out the project timeline, the tasks I needed to do in order as well as a list of components I needed to buy to compile the project.

  • About the Logs

    Andrei Florian08/24/2020 at 13:06 0 comments

    Hi there,

    Because I am migrating this project from another website, I already did everything included in the logs a while ago. So I am writing all of the logs today highlighting the main events and troubles I faced while developing the project.

View all 9 project logs

  • 1
    Step 1: Required Apparatus

    This project requires a lot of sensors that will monitor a lot of parameters related to the water and the atmosphere placed in. Below is a list of all the materials needed.

  • 2
    Step 2: Connecting the Circuit

    The components should be soldered together. To ease the understanding of the schematics out, a breadboard has been used. the schematics are below.

    Preparing the MKR GSM

    After the sensors have been soldered to the device, the SIM card, GSM antenna and battery have to be attached to the device. I am powering the board with 2 AA batteries through the VIN port.

  • 3
    Step 3: Acknowledging the Code

    There are 4 main sections to the code of the project.

    • Collect Sensor Data
    • Get time and date
    • Process Data
    • Send Data

    All these sections are described and detailed below.

    Collect Sensor Data

    Serial.println("Taking Sample");
     Serial.println("Taking Sample");
     Serial.println("  OK - Warming Up");
     delay(6000); // delay for sensor calibration
     Serial.println("  OK - Taking Sample");
     Serial.print("  ");
     for (int i = 0; i < 16; i++)
       if (mode == 1)
         strip.setPixelColor(i, strip.Color(0, 255, 0));;
         strip.setPixelColor(i, strip.Color(0, 0, 255));;
       // going to take multiple water samples - sensors not that precise
       waterTurbidity += getWaterTurbidity();
       waterPh += getWaterPh();
       if (i > 14)
         // take a single sample for high precision sensors
         waterTemperature = getWaterTemp();
         atmoTemperature = getAtmoTemp();
         atmoHumidity = getAtmoHumidity();
     Serial.println("  Success - Samples Taken");
     for (int i = 0; i <= 16; i++)
       strip.setPixelColor(i, strip.Color(0, 0, 0));;

    The section of code above starts off by waiting 6 seconds for the sensors to calibrate in the water. The device then loops for 16 times, a new LED turning on the ring every loop.

    Data from sensors that have fluctuating values is collected 16 times and then the mean is found. The high precision sensors are read on the last loop.

    Get Time and Date

    void getCredentials()
     Serial.println("  [1/2] Time");
     Serial.println("  OK - Getting Time from RTC");
     currentEpoch = processTime();
     Serial.println("  [2/2] Geolocation");
     Serial.println("  OK - Getting Geolocation from GPRS");
     while (!getLocation());
     Serial.print("  Success - Geolocation is "); Serial.print(latitude, 7); Serial.print(", "); Serial.println(longitude, 7);
    bool getLocation()
     if (location.available())
       latitude = location.latitude();
       longitude = location.longitude();
       return true;
       return false;

    The first loop handles the credentials. The time is extracted from the onboard RTC as it was synched to the GSM network in setup. The geolocation is extracted from GPRS.

    Process Data

    void processData()
     Serial.println("  OK - Getting Mean of Water pH and Turbidity");
     waterPh = (waterPh / 16);
     waterTurbidity = (waterTurbidity / 16);
     Serial.println("  OK - Dumping Data to Serial");
     Serial.print("  [Water] pH          "); Serial.println(waterPh);
     Serial.print("  [Water] Turbidity   "); Serial.println(waterTurbidity);
     Serial.print("  [Water] Temperature "); Serial.println(waterTemperature);
     Serial.print("  [Atmo]  Temperature "); Serial.println(atmoTemperature);
     Serial.print("  [Atmo]  Humidity    "); Serial.println(atmoHumidity);
     Serial.println("  Success - Data Processed");
    String makeLine()
     Serial.println("  OK - Making String");
     String dataReturned; dataReturned += "{"; dataReturned += " \n";
     dataReturned += "\"Latitude\":" + String(latitude, 7); dataReturned += ", \n";
     dataReturned += "\"Longitude\":" + String(longitude, 7); dataReturned += ", \n";
     dataReturned += "\"waterpH\":" + String(waterPh); dataReturned += ", \n";
     dataReturned += "\"waterTurbidity\":" + String(waterTurbidity); dataReturned += ", \n";
     dataReturned += "\"waterTemp\":" + String(waterTemperature); dataReturned += ", \n";
     dataReturned += "\"atmoTemp\":" + String(atmoTemperature); dataReturned += ", \n";
     dataReturned += "\"atmoHum\":" + String(atmoHumidity); dataReturned += ", \n";
     dataReturned += "\"deviceID\":" + String(deviceID); dataReturned += ", \n";
     dataReturned += "\"deviceName\":"; dataReturned += String("\""); dataReturned += String(deviceName); dataReturned += String("\""); dataReturned += ", \n";
     dataReturned += "\"epoch\":" + String(currentEpoch); dataReturned += ", \n";
     dataReturned += "\"mode\":" + String(mode); dataReturned += " \n";
     dataReturned += "}";
     Serial.println("  OK - Data is below");
     Serial.println("  Success - String is Ready");
     return dataReturned;

    processData() gets the mean of the data collected from the sensors that tended to fluctuate and then dumps all the data to the Serial Monitor.

    makeLine() compiles all the data into the JSON string that is sent to Soracom. All values are parsed into a JSON buffer ready to be sent to the backend.

    Send Data

    void parseData(String dataToSend)
     Serial.println("  OK - Setting Up Connection");
     if(client.connect(url, 80))
       Serial.println("  OK - Connection Established, Parsing Data");
       client.println("POST / HTTP/1.1");
       client.println("User-Agent: Arduino/1.0");
       client.println("Connection: close");
       client.print("Content-Length: ");
       Serial.println("  OK - Data Parsed");
     Serial.println("  OK - Getting Responce");
         char c =;
     Serial.println("  Success - Data is Parsed");

    Finally, the data is sent to Soracom. The device established a connection with the server and then prepares the credentials. The data is then sent to the server and the response is printed to the Serial Monitor.

    The device then goes to sleep until a trigger wakes it up repeating the steps again.

View all 10 instructions

Enjoy this project?



salvim wrote a day ago point

Good design! One question: can the probe of the pH sensor be immersed in water all the time?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates