HiI'mJaanus.Blog,Works.

Restroom status indicator

At our office, there were few bathrooms and they were often busy. The only way you could find out if the bathroom was busy or not was to get up from your desk and walk over. To reduce the required context switching and augment the office environment with intelligent devices, I designed and built a system that could sense the “busy status” of any number of restrooms by sensing if the light was turned on or not, and make this info available to people at the office.

The end result is a complete sensing system that consists of any number of restroom units that sense the status of individual restrooms using a light sensor, and transmit their statuses to a computer over an ad-hoc wireless network based on the ZigBee protocol. A lightweight Python script captures the individual sensor readings and makes this available as a webpage and JSON data feed. The Mac OS X Dashboard widget uses the latter feed to continuously display the restroom status on the Dashboard.

To bring the system to life, I built all the electronics with off-the-shelf components and wrote code in Arduino (microcontroller), Python (server) and Dashcode/Javascript (the Dashboard widget).

Restroom sensor diagram

Restroom sensor circuit design

Restroom sensor photo