The EPA estimates that the standard shower head use about 10 liters of water per minute. Delivering, treating, and heating the hot water for your shower is also extremely energy intensive. The longer you run the hot water, the higher your energy use and utility bills rise. According to the EPA, letting your faucet run for five minutes uses about as much energy as letting a 60-watt light bulb run for 22 hours. Using less water will not only lower your energy costs and conserve water, but will keep that water in the environment for natural geological and ecological cycles. Shaving just a view minutes off your shower will help reduce your water footprint.
Just measuring your shower time with a simple timer does not help to monitor your water footprint. It's not the time you linger in the shower that’s bad, it's the time you let the faucet run.
An IdeaA device like the Nordic Thingy:53 just put into the bathroom / near the shower, could be used to monitor your water footprint by detecting the sound of the running faucet using the built-in microphone and AI based on Edge Impulse. An app on a mobile phone or a smart home integration could retrieve, process and visualize the data to help the user monitor the water consumption.
The prototype runs a machine learning model for sound classification on the Thingy:53 based on Edge Impulse. Inferencing can be started/stopped by pressing the user button on the device. The firmware, based on the nRF Connect SDK and the Edge Impulse SDK, counts each detection of the sound of running water in the shower and accumulates the time. If the the accumulated time exceeds a defined threshold - configurable at built time - an optical (LED) and acoustical (buzzer) is given. Additionally the application starts a simple Bluetooth beacon (Eddystone-URL), updates the advertisement data in each cycle and misuses BT_DATA_NAME_COMPLETE in the the scan response to transmit the accumulated time. The timer can be reset by pressing and holding the user button for more than 3 seconds.
Sound Classification Model
The model for the firmware has been created and tested completely on a mobile phone using the Nordic nRF Edge Impulse app and Edge Impulse studio:
The Edge Impulse project is public at IoT - Development & Test / ShowerTime.
Firmware
The prototype's firmware is based on the Edge Impulse firmware for the Nordic Thingy:53 (see here for more details). Basically it is a clone of the edgeimpulse/firmware-nordic-thingy53 project with the Bluetooth communication and support for other sensors removed.
Firmware source repo: dxcfl/smart-shower-timer
- Accumulation of the classification results is provided by the added code in ei_result_aggregation.cpp.
- The "user interface" (button handling etc.) and application logic is handled in main.cpp.
- The buzzer (buzzer.c) handling is "stolen" from the "Asset Tracker" example for the Thingy:91.
- The BLE beacon (beacon.c) has been "recycled" and adapted from the Personal IAQ Monitor project. This implements a simple Bluetooth beacon (Eddystone-URL), advertising the accumulated time by misusing BT_DATA_NAME_COMPLETE ("Complete Local Name") in the the scan response.
The directory ei-model contains the Edge Impulse C++ library for the project.
The project configuration (Kconfig) has two additional parameters for controlling the application:
- Enable/disable the buzzer (default: enabled)
- Shower time alert threshold a.k.a. Max acceptable shower time in minutes (default: 5 minutes)
The firmware can be easily build by following the instructions in the README of the original edgeimpulse/firmware-nordic-thingy53project.
Test & Demo
The device has been tested under real-life conditions. Since filming these tests is neither appropriate nor advisable - water and electronic equipment like mobile phones or cameras don't mix very well - the demo shows a "dry run" test ;)...
To Do
- Putting the device into deep sleep after a short time of inactivity (not inferencing, e.g., 10 minutes after detecting no more shower...) with automatic wakeup...
- Proper BLE communication (e.g., as peripheral)..
- Automatic wakeup (see above) and inferencing start/stop on accelerometer event, to automatically start/stop measuring, if device is attached to the shower door/curtain...
- A shiny app for Android/iOS...
- ...
- ...
- ...
Comments