The Problem

Locked down in a house with 5 adults and only 1 bathroom, the long walk across the house only to find that the bathroom wasn't free was getting tiresome. We needed a way to see whether the bathroom was occupied without having to leave our office. 

The Project

Lou the Toilet is a 3D printed miniature toilet that uses a microcontroller (a spare Trinket Pro 5V I had laying around), a miniature servo, and a neopixel to indicate the status of the bathroom with a lifting and closing of it's lid and a coloured glow. An ESP32 breakout board (Adafruit AirLift – ESP32 WiFi Co-Processor) lets Lou connect to the internet and the Adafruit IO service to get updates about the bathroom's availability.

Just provide Lou with 5v and it's good to go, merrily opening and closing its lid all day!

The Bathroom Occupancy Detector covers the bathroom side, and is made up of an ItsyBitsy M0 with an ESP32 add-on (Airlift Bitsy), a magnetic door switch, and a light sensor. Together they monitor the state of the door (open or closed) and the bathroom light (off or on) to determine whether the bathroom is free. 

The bathroom status can be viewed anywhere from the house, using Lou or a private Adafruit IO dashboard.

Web page from Adafruit IO that displays the bathroom status. Here having the bathroom light off and the open door indicates that the bathroom is free, which the page shows with a green indicator and the text "Free!".

The Code

The code for Lou and the Occupancy Detector are pretty straight forward. Both use Arduino IDE and the Arduino Adafruit IO library. Since Lou only monitors one feed from the IO service, it can get away with something like a 32u4 microcontroller and still have enough program storage space. The Occupancy Detector has a bigger job, updating multiple feeds and ideally needs something with more flash memory (in this case a ATSAMD21 Cortex M0 processor).

Code can be view over on the Lou the Toilet GitHub page.

3D Modelling & Printing

Lou is based on a GrabCad toilet model by Jari Ikonen. I edited the design to fit the electronics and house the stop sign when the lid is closed.

Other parts, including the stop sign and case for the Occupancy Detector were designed by me.

Print files and settings soon!

Future Improvements

  • Lou uses an old Adafruit Trinket Pro 5v as a microcontroller, mostly because I had a few spare. These days something like an ItsyBitsy 32u4 - 5V would be much better since it has USB serial and native USB (having to use the Trinket's FTDI pins is a chore because they're buried in the toilet!).
  • I 3D printed Lou using some grey-silver filament I had. Using white filament would eliminate the need to paint it.