Smart Shower Sensor Data Analysis

This is an analysis of some of the sensor data coming from our smart shower, to understand how it is working and how best to improve the operation, efficiency and user experience. The data extracted covers a 24 hour period on 7th September 2020.

Our smart shower collects quite a lot of data but, the focus of this analysis is on:

Note:  In the same period we also captured 119 data points for the 'Shower Temperature' but, this did not vary significantly and adds no great value to the analysis. The temperature is an essential element in calculating the relative humidity though.

Data Collection & Device Control

All of the sensor and devices described here are interfaced to our contextual smart home using a single Arduino Mega 2560 with an Ethernet shield. It is also directly responsible for control of the extractor fan and the shower lighting. It reports all sensor data back to our smart home for context and capture in its logs.

To avoid reporting many thousands of events for each sensor, it is doing some data cleansing and rate limiting. This ensures that only 'significant' events and changes are reported but, this does not mean that the local Arduino processor will not act immediate on the latest data to hand.

Shower Humidity

Our smart shower measures relative humidity with a ceiling mounted Honeywell HIH-4000 series humidity sensor. The rate limiting has resulted in 220 data points over this 24 hour period, which is a pretty good compromise between accuracy, timeliness and volume of data. As mentioned before, the Arduino is seeing and responding many more data points and this is one of the reasons we use a distributed smart home architecture with slave processors.

Bathroom Base Humidity

This uses the same physical 'Shower Humidity' sensor but models the base humidity as a virtual sensor. It is currently a rolling average of 12 values, captured every 30 minutes, making 6 hours in total. This gives a reasonable response time to ambient humidity changes, whilst not being unduly influenced by short term increases due to local events (e.g. someone taking a shower).

Bathroom Humidity

We also have another humidity sensor located on the other side of the bathroom, called 'Bathroom Humidity'. This is a battery powered Z-Wave sensor over which we have a lot less control. It basically reports the current relative humidity every 19 minutes.

BBC Weather Humidity

For reference, we also pull in a weather data feed from the BBC and include the 'BBC Weather Humidity' for our town here. This generated 22 data points over the 24 hours.

Shower Occupancy

The Arduino is modelling shower occupancy as another virtual sensor. This is an aggregation of various sensor data and includes a distance sensor mounted in the ceiling, directly above the shower.

Bathroom Extractor Fan

The current bathroom extractor fan is under direct control of the Arduino processor. It is currently a binary (on or off) fan, though the Arduino is capable of variable speed control and the plan is to move to this next, in order to reduce the energy used and to also reduce the noise of the fan.

The vent is directly above the shower and expels air to the outside. I already know that this fan is too powerful and moves too much air, simply from the 'induction roar' that can be heard at the inlet vent. It was simply over specified for this application. This is a good example of where the analysis can allow better suited (and cheaper) components to be used.

The Data

The data is plotted as a scatter graph against time below. Shower occupancy and the extractor fan events have been mapped to values to allow them to fit on the one single graph:

Data Analysis

BBC Weather Humidity

The 'BBC Weather Humidity' (light blue) has little bearing on the bathroom humidity levels because the windows are mostly closed (though it has a trickle vent). It showed the greatest variation over the course of the day. It was generally cool, cloudy and it did rain at times during this 24 hour period.

Bathroom Base Humidity

The 'Bathroom Base Humidity' (blue) algorithm is clearly working well and is a smooth version of the actual humidity levels captured in the shower. It also reasonably close to the 'Bathroom Humidity' which is captured by another (less accurate) sensor.

Bathroom Humidity

The 'Bathroom Humidity' (green) sensor is closer to the bathroom window, so it is more influenced by the outside humidity levels.

Shower Occupancy

The 'Shower Occupancy' data (yellow) shows that the shower occupancy sensor is working reasonably well but, we know the ultrasonic distance sensor being used is not detecting people as well as we had hoped.

It now been replaced by an infra-red distance sensor. This is described in more detail here. There isn't much point in doing any more detailed analysis until the new IR distance/occupancy sensor has been in place for a while and fully tested.

Shower Humidity

The 'Shower Humidity' (orange) is the hardest set of data to analyse and the main reason for this is that the reported data is a tiny subset of what is actually being seen. The current algorithm only reports changes of 4% or more and this results in a hysteresis that is clearly visible on the chart. The algorithm also currently only reports events at least 17 seconds apart and forces an update if one hasn't been seen for 29 minutes.

Based on what we are seeing here, the algorithm is going to be updated, to report smaller changes but less often.

Bathroom Extractor Fan

The 'Bathroom Extractor Fan' data (red) shows that the extractor fan is not being run long enough and the current minimum run time of 5 minutes is not enough. The fan is being switched on and off numerous times for each showering event.

Recommendation:  Despite the current reporting limitations for 'Shower Humidity', it is clear to see that the humidity oscillates in time with the fan operation. The fan is simply doing too good a job in moving fresh air past the humidity sensor. The solution is to use a variable speed extractor fan and one that is also less powerful.

A lower power extractor fan will have several benefits. The first will be lower energy usage. The second benefit is that it will be much quieter in operation, resulting in a better user experience and a more luxury feel.

Summary

Only by doing this analysis of the logs generated by our contextual smart home can we understand that things are not working optimally and also gain some insight as to what improvements and where improvements need to be made. This analysis is facilitated by our smart home logging the right data and also keeping it within our home and under our ownership.

This analysis is not the end of the process but just the start. Based on what we have seen here, we will make updates and changes to both the hardware and the software algorithms behind our smart shower. The whole process will be repeated again in the near future, to see how our changes improve things. A number of iterations will be required to analyse the data and to optimise the control algorithms.

A lot of the changes and recommendations identified here have already been made. The most important update to be implemented next is to replace this powerful, mains-powered in-line extractor fan with a less powerful one that is also capable of variable speed control.