We built a ‘poopie’ sensor in our men’s toilet

Label A Lab stories - Part 2

This story requires a back story. In our Amsterdam office we happen to have separated bathrooms. The women’s bathroom consists of two toilets, whereas the men’s bathroom consists of one toilet and one urinal. At the same time, there are twenty men in our office and five women.

Here’s the problem: the men’s toilet is pretty much always taken. So the guys that have to do their ‘business’ are often forced to walk to the bathroom several times to check if it’s vacant yet.

We jokingly said that we needed a sensor in the bathroom that could tell us whether it is taken or not. Until we realised we should just built this. This is when the poopie sensor was born 💩. And yes, this is in fact the official name for it 🤓.

A while ago we already built some LED-strips into our kitchen that we can remotely control. These lights are attached high enough on the wall so that they are visible from anywhere in the office. We saw the toilet problem as a great opportunity to give these lights a purpose other than just being pretty.

Using sound to detect a ‘pooper’

Without it being too invasive (no camera in the toilet👀) we need to be able to detect whether someone is at the toilet. In the end we used an Ultrasonic Distance Sensor for this.

Basically this sensor is equipped with a tiny speaker and a tiny microphone. The first transmits ultrasonic waves and the other receives them. How it works is: it sends out a high-frequency sound pulse and then times how long it takes for the echo of the sound to reflect back. It uses a mathematical equation (Distance = Time x Speed of Sound divided by 2) to calculate how close the sensor is to an object. And thus measures the distance 😃.

We attached the sensor next to the door and measured the distance from the sensor to the back wall (155 cm). If the sensor measures a distance that is shorter than 155 cm, it means something is between the sensor and the wall. Meaning: we have a pooper💩.

Through some lines of code we told the end of our LED-strip (which is connected to a Raspberry Pi running Raspbian) to turn red if someone is on the toilet. If it’s vacant, it turns back to green. In this way the men know when to stay seated and when they can finally do their business. Office hacks. Love ’em 💚.

Label A

Label A develops intuitive and sexy apps, websites and online platforms. Dummy-proof and high-tech, with a focus on mobile and cloud technologies. We have everything in- house to be able to design, develop and support web and mobile applications. Visit us at www.labela.nl.

)

Michèle Brüggemann

Written by

Label A

Label A

Label A develops intuitive and sexy apps, websites and online platforms. Dummy-proof and high-tech, with a focus on mobile and cloud technologies. We have everything in- house to be able to design, develop and support web and mobile applications. Visit us at www.labela.nl.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade