Ambient toilet seat that lets users know when the toilet needs to be cleaned through a progression of lighting cues.


Problem Statement

The inspiration for this project came from the difficulties of living in a household with roommates. Roommates come with different expectations and standards for cleanliness. One of the most common issues between roommates centers around cleaning the shared bathroom space, and more specifically the toilet - one of the most intimate shared spaces. 


Project Goals

For this project, we wanted to create an IoT device that accomplishes the following objectives:

  1. Create a calming environment (through the use of light) when cleaning tasks have been taken care of
  2. Alert household members to when cleanings need to occur
  3. Create an increasingly uncomfortable environment (through the use of light) and an escalating sense of urgency / discomfort / embarrassment when cleaning tasks are missed

In addition to the functionality above, the device should ease tensions between roommates who have different expectations around cleaning. It will create greater awareness around desired cleaning patterns so that users can live harmoniously with a greater sense of shared understanding. The burden of keeping the peace will fall to the ToiLit instead of to the person in the household who is the most cleaning-conscious.




Our team started the process by brainstorming different challenges we have in our daily lives. In this process, we considered different ways to collect data, the impact the device might have on the various people present in the environment, and the users' ability to easily notice and/or ignore the device in the setting. We wanted to make sure that any ambient device we built was not too 'aggressive' and that it balanced eliciting an emotion with allowing users to navigate their lives without being influenced when it was not desired.

User Experience & Components

After exploring a few ideas and weighing their impact on the environment, we collectively decided the ToiLit device would be an effective ambient device. We then explored the user experience and device workflow (final iteration pictured in 'Storyboard and Product Workflow' section below). Finally, we identified the components (full bill of parts in 'Outcome' section below) and white boarded the code skeleton / framework we needed to efficiently execute on our product vision.

Building ToiLit

Finally, the team started building the circuits and code separately for our output and sensor. Once these were complete, we combined the two circuits and code files into one breadboard and code file, respectively. We also created a foam core prototype of the ToiLit product. We determined light colors for the neopixel from typical associations people have with lights of different colors. For example, blue expresses a sense of calm while red expresses danger or urgency. We used Adobe Color CC to choose values for RGB decimal codes. 

Foam core mock-up of ToiLit IoT device
Img 20180207 214232514 (2018)
Setting up circuit for neopixel
Image uploaded from ios (2018)
Final circuit on breadboard
Image uploaded from ios %281%29 (2018)
Using Adobe Color CC to choose values for RGB decimal codes
Image (2018)
'Minty fresh' blue light which indicates the toilet has been recently cleaned.
Img 20180207 205010791 burst001 (2018)

Product Workflow

  1. For the first 7 days, the toilet is considered clean and the neopixel emits a 'minty-fresh' blue light
    1. On day 8, if the cleaning product has not been lifted (and motion sensor has not been activated), neopixel emits a green color to indicate algae growing in the water
    2. On day 15, if the cleaning product has not been lifted (and motion sensor has not been activated), neopixel emits a yellow color to indicate a warning to clean
    3. On day 22, if the cleaning product has not been lifted (and motion sensor has not been activated), neopixel emits an orange color to indicate a stronger warning to clean
    4. On day 30, if the cleaning product has not been lifted (and motion sensor has not been activated), neopixel emits a red color to indicate there is a cleaning crisis
    5. If the PIR sensor is triggered at any time by the movement of the cleaning product (indicating someone has cleaned the toilet), the neopixel again emits a 'minty-fresh' blue light and the timer begins again starting with step 1 above.




In this project, our team was able to complete the prototype as planned. The following summarizes the bill of parts for the circuit and physical prototype, the circuit configuration, and the final code used.

Bill of Parts (Circuit)

  • Neopixel 24 ct (output)
  • PIR sensor (20cm - 150cm) (sensor)
  • Online Data Source: IFTT (
  • Photon
  • Breadboard
  • LED pin
  • USB Micro B Cable
  • Resistor (10k ohm)
  • Jumper wires

Bill of Parts (Physical Prototype)

  • Foam core
  • Pipe cleaners (for attaching the neopixel to the seat)
  • Printed logo for seat
Circuit Diagram of ToiLit
Toilet police breadboard bb (2018)
#include "neopixel.h"

#define PIXEL_COUNT 24
#define PIXEL_PIN D2
#define PIXEL_TYPE WS2812B

#define PEACH 246,187,27
#define ORANGE 255,70,10
#define RED 255,0,0
#define BLUE 52,222,246
#define GREEN 125,246,49

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

int waitTime = 25;
//was 25
int i;
int timepassed = 0;
int inputPin = D0;
int ledPin = D1;
int pirState = LOW;
int val = 0;

int calibrateTime = 10000;

void setup()
 Particle.subscribe("timepassed", myHandler, MY_DEVICES);
 pinMode( ledPin, OUTPUT );
 pinMode(inputPin, INPUT);

void loop()
  if ( calibrated() )
  if(pirState == HIGH)
    timepassed = 0;
  if(timepassed == 0)
    spin (BLUE);
  if(timepassed == 1) // timepassed > 7 && timepassed < 15
    spin (GREEN);
  if(timepassed == 2)
    spin (PEACH);
  if(timepassed == 3)
    spin (ORANGE);
  if(timepassed == 4)
    spin (RED);

void readTheSensor()
  val = digitalRead(inputPin);

bool calibrated()
  return millis() - calibrateTime > 0;

void reportTheData() {

  if (val == HIGH) 

    if (pirState == LOW) {


      pirState = HIGH;
      setLED( pirState );
  } else {
    if (pirState == HIGH) {

      pirState = LOW;
      setLED( pirState );

void setLED( int state )
  digitalWrite( ledPin, state );

void myHandler(const char *event, const char *data)
 Particle.publish("time incremented");
 timepassed = timepassed + 1;

void spin(int R, int G, int B)
       for(i=0;i<PIXEL_COUNT; i++)
       strip.setPixelColor(i, R,G,B);;

Click to Expand
ToiLit Product Video
im2193 (2018) -

Code Referenced



Working on this project as a team represented its advantages and challenges. It was easier to get work done simultaneously, however, it also meant some difficulty integrating different sections of code and circuits. Furthermore, it meant that all team members were not able to practice each part of the process with some focusing more on specific functions or documenting the group's work. With that said, the team learned a lot from this project and also faced and overcame new challenges. 


  • How to manipulate the neopixel (e.g. color, speed, number of LEDs lit)
  • Able to power multiple energy sources off of the photon (v. using external sources)
  • Would like to be able to work in the same document while writing code
  • Learned to integrate the sensor and neopixel - was more difficult than integrating past sensors and outputs
  • Learned to utilize IFTT to simplify code


    • For this project we separated tasks to work more efficiently. We struggled with combining different sources of code into one cohesive program.
    • Challenging incorporating the timing event as an indicator for when the output needs to change
    • Struggled with getting the LEDs to emit a single color across the neopixel given that the original code was directing the neopixel to change colors.
    • Challenge with overly sensitive PIR sensor

    Future Iterations

    • Indicate whose turn it is to clean the toilet by displaying different color lights for different weeks when cleanings are required. 
    • Turn light off while someone is using the toilet.
    • Turn light off when there is no one in the bathroom to save energy.
    • Sending text alerts to the person who has neglected to clean the toilet.

    Share this Project


    49713 Designing for the Internet of Things

    · 25 members

    A hands-on introductory course exploring the Internet of Things and connected product experiences.


    Ambient toilet seat that lets users know when the toilet needs to be cleaned through a progression of lighting cues.


    February 6th, 2018