Smart Water Meter – Jack Bates & Max Jackson

Overview

At least two-thirds of the global population, over 4 billion people, live with severe water scarcity for at least one month every year. These water problems are set to worsen, as population growth and increasing water use continues to rise. Many of those living with fragile water resources are in India and China, but other regions highlighted are the central and western US, Australia and London.

The rising world temperature has a huge impact on water consumption. For example, an increase in temperature also increases the consumption of water by people, animals, and plants to maintain their health. As warmer temperatures increase the demand for water, the amount of freshwater available may decline and increase competition for water resources in some areas.

Taps are widely left on for long periods of time, whether this is while doing the dishes or brushing your teeth there are always savings to be made. If we had the ability to directly track what we were using on a minute by minute basis, we may be able to make small changes that can make a big difference.

Project Aim

To create a “Smart Water Meter” that tracks water usage around a home and gives a live feed of what’s being used and how much its costing, giving the user the opportunity to consider their water wastage. For this project we will focus on the main tap used in the kitchen.

Research

The average water usage per day varies depending on the number of people living at that household. Below is a chart which shows how much water is used on a daily basis (in litres) by different sized households

 People living at home     Litres per day 
 1  149
 2  276
 3  367
 4  450
 5  523
 6  592
 7  655

What causes the most water usage in a household?

Unfortunately, taking regular baths is the biggest water usage in households. On average it takes 115 litre of water to fill up a bath. While taking a shower, you use on average 50 litres of water, and the washing machine uses about 55 litres. The dishwasher uses on average 15 litres of water. Traditional toilets use about 10 litres of water per flush. Hand washing dishes uses around 22 – 100 litres of water.

Establishing a Baseline

In order for us to establish our baseline of which we will work on and aim to improve during this project, we first wanted to test how much water we used while hand washing dishes for 15 minutes.

To do this we tested 3 different settings, High, Medium and Low water flow. The High setting was the tap fully open, Medium half open and Low slightly open. We timed how long it took for each setting to fill up a 2L jug and from that we were able to work out how much water would be used over a 15 minute period.

Here are the results:

High

The high setting took on average 11.42 seconds to fill the 2 litre jug. Meaning that over a 15 minute period 157.6 litres of water would be used.

Medium

The medium setting took on average 12.82 seconds to fill the 2 litre jug. Meaning that over a 15 minute period 140.4 litres of water would be used.

Low

The low setting took on average 50.95 seconds to fill the 2 litre jug. Meaning that over a 15 minute period 35.3 litres of water would be used.

 

What is the concept idea?

Our idea is a Smart Water Meter that tracks water usage and shows this information to the user.

How Will We Change the Behaviour of Users?

By supplying the user important information about their water usage and its cost, it gives them the opportunity to change their habits in order to save money on their water bill. For example, the user may be washing dishes with the tap constantly running. With the ability to see how much that water is costing the user will make a conscious effort to only turn on the tap when its needed. The extra dimension of being able to track this information online gives the user time to analyse and digest and therefore make plans of how they will save money and therefore water.

Evidence of how this has worked in the past:

https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/48381/5424-smart-meters-research-public-attitudes.pdf

What Components We Need?

  • Arduino
  • Flow Rate Sensor
  • LCD
  • LED
  • Wifi Module
  • Power Supply

 

Testing the Flow Rate Sensor with Flashing LED’S

The first stage of our setup was to get a green and red LED to respond to the flow sensor, turning on the green LED when the water flow is good, turning on the red LED when the water flow is too high and a flashing red LED when the water flow is in excess.

Below is a video showing the data from the flow rate sensor being printing to the serial monitor:

Implementing the LED’s was a very simple process, we attached the red LED into pin13 and the green into pin12. We then used and ‘if else’ statement to turn on the LED’s at different flow rates.

This is shown in the below video:

 

Full Code:

https://create.arduino.cc/editor/jackrichardbates/58472cf5-aa60-49cc-a562-dd63d5b4da77/preview?embed

Printing the Flow Rate to an LCD

We decided that the ‘Current Liquid Flowing’ and ‘Total Litres’ would be the most useful for the user as it gives them direct readings of their water usage and cost.

Fritzing Diagram:

Screen Shot 2018-04-17 at 18.47.43

 

The video below shows the LCD printing information from the flow Rate Sensor:

Full Code:

https://create.arduino.cc/editor/jackrichardbates/8fbd7876-98f5-4102-863b-269b2a0bc70e/preview?embed

 

Connecting to Thinger.io

Thinger.io is an Open Source platform for the Internet of Things, it provides a ready to use scalable cloud infrastructure for connecting things. This will allow us to share data on an online dashboard and will give the user 24h access to their water data.

To connect to the internet we used the NodeMCU esp8266, its an open source IoT platform. It includes firmware which runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module.

To use the module, we first had to download a series of drivers, which would allow us to communication with the module through a micro usb and give us the ability to directly upload custom code.

Test

Below is our first test using the module of which we turned an LED on/off over WIFI:

As the NodeMCU has a breakout board, we attached the flow rate sensor, LCD and LEDs to its D pins and shared the power between the Arduino and the Node. We then changed our code to correspond to the amendments we made.

Troubleshooting

Once connected, we had the problem that the flow rate sensor was not responding and not giving any readings. We knew this because when opening the serial monitor there were no readings being taken. After analysing the new setup, we narrowed down the possible reasons for this below:

  • LCD sucking power from the Flow Rate Sensor
  • Need external power
  • Pins on the NodeMCU esp8266 doesn’t support interrupt pins
  • Code was wrong
  • Conflicting libraries

On the Arduino, the interrupt pins are mapped to pins 2 and 3 whereas the Node after some further research we found out that it didn’t specifically have any interrupt pin but it was the code relating to the interrupt that had to be changed. So because of this, we needed to change the syntax to allow the flow rate sensor and the esp8266 to communicate with each other. As you can see below, the change was very simple but without it it would never have worked. We found the new code by looking up the syntax for the esp8266 interrupt.

Old Line of Code

attachInterrupt(sensorInterrupt, pulseCounter, FALLING);

New Line of Code

attachInterrupt(digitalPinToInterrupt(sensorPin), pulseCounter, FALLING);

 

Sending data to thinger.io is a fairly simple process, Thinger.io supply lines of code published on their website which allowed us to define the sensor we were using and the data we wanted to transmit on the dashboard.

 

 

Although we did want to display more than just the total litres used, we were unable to because each widget uses one sensor and as all the data comes from the flow rate sensor we couldn’t display more than one set of data. But using this dashboard shows the potential it has and is a great way for the user to check how much water is being used when they are away from the LCD.

Link to Dashboard:

https://console.thinger.io/#/dashboard/SmartWaterSensor?authorization=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJEYXNoYm9hcmRfU21hcnRXYXRlclNlbnNvciIsInVzciI6IkphY2sxYmF0ZXMifQ.qVCIr4JTv0HmqcpDLZt-Sj1E_nK9JB2WbQ2sA7VLgHc

 

Screen Shot 2018-04-17 at 18.28.59

 

Full code:

https://create.arduino.cc/editor/jackrichardbates/d56374af-8368-4f84-8af8-2a96254d9a0b/preview?embed

 

Conclusion

Our prototype is focused on the behaviour changes of users when they are using taps around their homes. This behaviour change then prevents unnecessary water usage as they track their water costs go up the more they use. Through our research and execution of the project we feel that the implementation of our Smart Water Meter would be beneficial in reducing the water cost in a household, and therefore implementing small changes to tackle the global water crisis.

 

References 

http://www.instructables.com/id/How-to-Use-Water-Flow-Sensor-Arduino-Tutorial/

https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/48381/5424-smart-meters-research-public-attitudes.pdf

https://techcrunch.com/2015/09/15/fluid-is-a-smart-water-meter-for-your-home/

https://thinger.io/

http://www.instructables.com/id/Quick-Start-to-Nodemcu-ESP8266-on-Arduino-IDE/

 

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s