IoT at Berseh Food Centre

A Sparkling Clean Toilet with IoT

by Team Stains

Aisyah Jefri
10 min readNov 26, 2020

--

“If you think that the Internet has changed your life, think again. The IoT is about to change it all over again!” — Brendan O’Brien, Chief Architect & Co-Founder, Aria Systems

We, Team Stains, have been blessed with the opportunity to implement an IoT proof-of-concept as part of our IoT Application module in Singapore Management University. We developed a solution with Team Supersonic Hedgehog to improve Berseh Food Centre’s Toilet for the National Environment Agency (NEA) and the Ministry of Sustainability and the Environment (MSE).

Problem

But what exactly is wrong?

Based on a 2020 nation-wide study, the Toilet Cleanliness Index (TCI) of public toilets in the Rochor region is relatively dirty with an average TCI score of 45.79/100. The Total Variable Ratings for areas such as toilet paper dispensers and rubbish bins have also fallen from that of 2016.

Total Variable Ratings for Toilet Paper Dispenser and Rubbish Bin Cleanliness

Berseh Food Centre’s Toilet is a 4 Star Toilet according to Restroom Association (Singapore). This means it has adopted at least one DFEC (Detect, Feedback, Eliminate & Clean) smart solution to increase productivity and efficiency. However, we should aim to make this a 6 Star Toilet.

We also took a closer look at the data from the toilet’s user feedback system. Lack of toilet paper and overflowing litter bins are identified as issues that users face.

Existing Solutions

Currently, there are some pretty good solutions already implemented.

Ammonia Sensor

There is an ammonia sensor installed to track volatile chemical compounds in the air. The data collected is sent to a central location to notify cleaning managers when required.

However, this sensor only addresses a single aspect of toilet cleanliness (air quality).

User Feedback System

User feedback system placed right outside the toilet

There is a user feedback system where users can leave their satisfaction levels and areas of improvement. However, this is optional, and users usually do not provide feedback. Further analysis of past data also showed multiple erroneous inputs from the same user, reducing data reliability.

Fixed Cleaning Schedule

Left — Cleaning schedule; Right — Cleaning checklist/guidelines

Cleaners follow a fixed cleaning schedule with a clean toilet checklist and a list of guidelines.

The current cleaning schedule is not catered to the toilet’s needs on a day-to-day basis. Peak timings are not considered, so toilets may face a drop in cleanliness during peak timings.

Stakeholders

Unfortunately, some stakeholders face issues with just these solutions:

Issues that our stakeholders faced

Our Solution

But we are here to help!

What did we monitor?

We monitored three areas with our IoT prototype: general waste bin, toilet paper dispenser and sanitary bin. Meanwhile, Team Supersonic Hedgehog monitored toilet/cubicle occupancy, temperature and humidity. You may read about their solution here.

The floorplan below shows an overview of all the sensors deployed. As this was a proof-of-concept, we chose to monitor Cubicle 4, which is nearest to the entrance.

Floorplan of the female toilet

How did we monitor them?

We used ultrasonic sensors to measure the fill levels of bins and toilet paper dispenser. The sensors tracked the fill levels by measuring the distance of the nearest object. Each sensor is connected to a micro:bit which is powered by a battery. Each setup is placed in discreet black containers. If they are visible to the public, they have caution signs to warn users.

Setup of sensor and gateway

Main Rubbish Bin

Setup of rubbish bin

This setup is adjustable, so cleaners can change the trash bag easily. The sensor faces downwards to give us the fill level.

Sanitary Bin

Setup of sanitary bin

The setup is taped onto the lid of the sanitary bin and is hidden from a toilet user.

Toilet Paper Dispenser

Setup of toilet paper dispenser

How is data collected and transmitted?

The sensors collect data every 5 minutes and the micro:bits will send the data to a Raspberry Pi (gateway) via Bluetooth. The Raspberry Pi is also in the toilet. Our teammate helped to place it in a secret location, making it hidden from view.

Our raspberry pi is located in the toilet’s ceiling where it is connected to a power socket

The Raspberry Pi is connected to the Internet using a portable Wi-Fi router (Changi Wi-Fi) and published the data to the HiveMQ MQTT broker.

There is a python script running on our AWS EC2 server to allow it to subscribe to the broker. Upon receiving data, the script updates our AWS RDS database with the data.

Here is an overview of the tiered topology that we have just described. Wondering what the Telegram, KaaIot and PowerBI does? Keep reading then!

Our network topology

What happens to the data?

We all know that data can be used to do incredible things. After we made sense of the data, we can help solve the toilet cleanliness issue.

Physical Notification

We have our on-site physical notification (micro:bit) placed at the entrance of the toilet. Cleaners can use this to aid their spot-checking and immediately know what requires maintenance.

Our physical notification micro:bit and guide

The micro:bit receives data directly from the Raspberry Pi and displays the toilet status. A description of the status is shown in a guide placed beside the physical notification. We have included Mandarin Chinese translations to overcome cleaners’ language barriers.

Guide provided in both English and Mandarin

Telegram Notification

Next, we have Telegram push notifications to inform cleaners when there is no toilet paper or when the bin is full. This reduces the need for them to manually check the toilet, while still allowing them to keep up with the condition of the toilet without being physically present.

These notifications will only be triggered if the fill levels exceed a set threshold 3 times and sent every 15 minutes to prevent notification fatigue. We have set the thresholds to be 75% full for bins and below 25% for toilet paper level.

We understand that the cleaners are not familiar with Telegram, but we have chosen to use it as it is free-to-use for a proof-of-concept.

Our Telegram channel for cleaners’ notifications

Dashboard

Lastly, we have our integrated dashboard with Team Supersonic Hedgehog, where we visualize the data received from all our sensors. This is mainly for the management as it provides an easy way of monitoring the toilet without having to be present at the toilet.

Real-time dashboard displaying data collected from our sensors

How good is our solution?

Many great things about our solution

Challenges, Insights and Lessons Learnt

Insights

The sanitary bin was mostly full throughout our deployment period — approximately 10 days. During our presentation with our sponsors, we learned that the sanitary bins are not just emptied but are replaced entirely for hygienic purposes. (Luckily for us too, otherwise we would have to bid farewell to our setup!)

Based on the data collected, our recommendation to the management would be to ensure the replacement of these bins once a week to prevent overflowing.

Fill levels of sanitary bin over a few days

Comparing the average level of toilet paper by hour, we saw that the lowest levels are at 10am and 7pm.

Average fill level of toilet paper dispenser from 8am-10pm

The highest levels of toilet paper are noticed between 12pm and 5pm which corroborates with the cleaners’ spot checks. Since they conduct two checks in that period, fill levels are generally high. Hence, we recommend changing the schedule for the first and last spot check to 10am and 7pm, so that the toilet paper never runs out.

Using the motion sensor data, we identified that the peak periods with highest toilet usage are lunch times on weekdays, and evening or dinner times on weekends. As such, we recommend cleaners to conduct more spot checks during these periods.

Average toilet occupancy for weekdays
Average toilet occupancy for weekends

Overall, we believe our solution was adequate as it provided sufficient insights to help the management pin-point problem areas in toilet cleanliness and make informed changes to the cleaning schedule.

Sponsor Feedback

Our sponsors’ feedback was positive. They were impressed by our real-time notification systems, both physical and via message. They suggested that we should clearly define what we mean by a “clean toilet” since we are focusing on only the bins and the toilet paper dispensers.

Encouraging feedback from our amazing sponsors

They also mentioned cost savings as a possible insight that can be explored (we agree!).

Professor Feedback

We also received very good feedback from our beloved professors on our poster and demonstration. Our insights and recommendations were practical, with the potential to be adopted by our stakeholders. They suggested that it would good to elaborate on the impact of our challenges on our solution, and we are grateful for this valuable feedback!

Valuable Feedback on Poster and Demo

Challenges Faced

Our journey was not always smooth sailing.

Firstly, we assumed there would be 100% Internet connectivity. However, the wireless dongle was not completely reliable, resulting in intermittent downtimes (1–2 times a day 😱). Fortunately, since we collected data over 1.5 weeks, we were still able to obtain averages over time.

Our moods whenever the wifi is down

To circumvent the issue, we made configurations on the Raspberry Pi to automatically reconnect. In some cases, despite re-establishing the connection, the application could not run. Hence, we had to go on-site to fix the issue.

One of the issues faced :(

To overcome this, we installed TeamViewer application on the Raspberry Pi to make remote reconfigurations. This was further supported by our Telegram channel which sent notifications tracking our downtime.

Our Telegram channel to monitor downtimes

Secondly, we assumed that the sensors would give accurate readings till the batteries completely run out and we could make replacements based on the Telegram’s downtime notifications. But we later realized that the sensors’ readings become unreliable when battery levels are low (after about 15 hours of usage).

Distance is 500cm? Low battery alert!

Hence, we replaced the batteries daily to maintain accuracy in our readings. This was sufficient for us to collect data during the cleaners’ working hours, as sensor readings will only become wonky past 11 pm.

Limitations

Our solution was also not as perfect as we wanted it to be.

Firstly, the sensors were installed in a public area, making it prone to tampering and theft. We set up a monitoring system on Telegram to track downtime so that we can identify possible thefts and tampering. However, this can only alert possible tampering but not prevent it.

Secondly, the bins and dispensers are cleaned using water, leading to possible water damage to the sensors. We tried waterproofing the sensors using food grade containers to reduce water damage, but they are still not completely waterproof.

Future Work

Although our current solution suits the problem statement, there is room for improvement.

The current solution is not energy efficient, requiring daily battery changes to function. For a long-term deployment plan, power banks would help to prolong battery life, reducing the maintenance required.

Our current solution only covers toilet cleanliness aspects that we deemed most important. Therefore, to build on this project, additional aspects of cleanliness could be monitored for a more holistic solution.

Lessons Learnt

Real world deployment sites possess many unforeseeable challenges that we did not encounter in a staging venue. Hence, it was important for us to be flexible and tweak our solution to overcome these challenges.

Quick thinking by our teammate

Like any project, communicating requirements clearly with the sponsors was vital as there was a possibility of the project straying from its initial intention. To stay on track, we kept the sponsors updated at every stage and made modifications based on their feedback.

Communication is key!

Tradeoffs had to be made and due to budget constraints, we were only able to deploy sensors in one female toilet cubicle. Our solution would have generated better insights if we could compare the data between female and male toilets and across different cubicles in the same toilet.

Words can’t beat graphics. Want to see more? You can watch our video here and with that, Team Stains signing off.

Remember, don’t be mean, keep it clean 😊

--

--