Bathroom Minder




In our house, we have two teenagers and 1.5 bathrooms. Since they both like to spend a very long time taking showers and getting ready, this means that much of the time my wife and I are left with only the half-bath to use. This is a problem.

We've tried several approaches in the past, including:

  • Asking them to set a countdown timer on their smartphone to 30min.
  • Placing an actual clock in the bathroom.
  • Turning down the hot water.
  • Starting the dishwasher and/or the washing machine.
  • Yelling, begging, etc.

Nothing has worked.

I decided that what we really needed was a door alarm, but in reverse - an alarm that sounds when the door is closed, instead of opened. To be fair, the alarm should give the occupant ~30-40 minutes to do their business before sounding, and give plenty of warning that the clock is running.

Enter the Arduino!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Gather Your Parts...

To replicate this project, you will need an Arduino Uno or Mega 2560 and...

  • A few RGB LED lights. I used three Grove LEDs, but you can use as many or as few as you want.
  • A speaker to play the chimes and alarm on. I used this one, also Grove.
  • If you are using Grove components, which I strongly recommend to keep everything simple, you'll also want to buy a handful of cables, like these.
  • A magnetic reed switch. I chose this one, from Amazon.
  • A power supply. I selected this one so that I could use either a 9V battery or AA batteries, for longer life if needed, and it basically came with a "free" Arduino Uno clone as a bonus.

My Arduino came from an older version of the Seeed Studio ADK Dash Kit (mine did not come with the cables). If you can find one on Amazon or Ebay, it is a pretty good way to get started. It includes the Grove megashield, RGB LEDs, an Arduino Mega 2560 (clone) with built-in USB, plus of collection of other Grove modules that could be fun for other projects.

Step 2: Write the Program

My specifications for the program were as follows:

  • Must have an audible alert at regular intervals to attract the attention of the occupant.
  • Must have a visual status to indicate, in a macro sense, how much time was left.
    • The visual aid must be easily viewed and interpreted through glass shower doors and/or off the reflection of a fogged up mirror.
    • The visual should clearly show danger red as the countdown approaches the end.
  • Must have an audible alarm that does not stop.
  • System should be armed when the door closes, and disarmed when the door is open.

I did not want to use a digital readout, simply because I felt that viewing it through steamy shower doors or off the mirror reflection would be difficult at best. My first attempt used only one RGB LED blinking faster and faster (using a decay function) as time ran down, but this approach doesn't give the occupant any real sense of time passed or remaining.

I decided that having three RGB LEDs was the way to go (and it didn't hurt that I had three on hand). Each one would countdown 1/3 of the total allowed time. This could give the occupant a clear sense of time passed and remaining, with only a quick glance at the three LEDs.

To attract attention to the timer, I decided to play a two-tone chime at the start of each interval.

Finally, when the timer is done, a two-tone alarm sounds and continues to sound until the system is disarmed, by opening the door.

I went through 3 major iterations of the program, each time simplifying and coming with fewer and fewer lines of code that worked better than the previous attempt. I am sharing only the "final" version here, since it does what needs to do without extra complexity.

Step 3: Assemble Parts and Test

Since I was using Grove, the assembly was probably the easiest part of this project.

Connect the RGB LEDs into a chain (e.g. out from LED1 to in of LED2). Once you have the chain, connect in of LED1, the first RGB LED in your chain, to the Arduino.

In my case:

  • Ground to black (ground)
  • +5v to red (+5v)
  • D7 to white
  • D6 to yellow

At this point, you can compile and load the program to the Arduino to test the lights. I suggest setting the TimeInt value to 1, so that you don't have to sit through a long countdown while testing.

Connecting the speaker, also a Grove module, is just as simple. Connect the speaker on D8-D9.

In my case:

  • Ground to black (ground)
  • +5v to red (+5v)
  • D9 to white
  • D8 to yellow

You can test again, or if you haven't tested it yet, test it now. Play with the TimeInt and anything else that you want to change and compile,load, then test.

Step 4: Finalize and Deploy

I wrote the program and performed all of the prototyping and testing on using the Seeed Mega clone, but I felt that was "too expensive" to deploy as the final solution. Using the Uno clone, I went ahead and soldered the connections (after testing) and mounted everything to spare piece of wood.

For an enclosure, I wanted something that was clear (so that the user could see the RGB LEDs), but also somewhat water resistant. The bathroom, the target deployment location, can have very high humidity from long showers, and I wanted the Arduino to have some level of protection. The solution was to reuse a Chinese take-out container. It came with a tight, well sealed, clear lid and had plenty of room inside to mount Arduino and battery!

I then mounted the system in the bathroom using 3M Command strips.

Homemade Gifts Contest 2017

Participated in the
Homemade Gifts Contest 2017

LED Contest 2017

Participated in the
LED Contest 2017

Arduino Contest 2017

Participated in the
Arduino Contest 2017

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    12 Discussions


    1 year ago

    Commenting on my own project...

    We've been using this for a couple of weeks now and I have determined that the system eat 9V batteries like Cookie Monster. If you create your own version, I suggest using the 8x AA battery pack instead.

    Good idea. I have two kids of my own and getting everyone ready in the morning can be a challenge. Another thing that might be helpful is motion sensor so that the alarm isn't trying to go off on an empty room.

    4 replies

    I think that the addition of a motion sensor makes a lot of sense for a half bath, especially for kids that spend a lot time on makeup and "fixing" themselves :-)

    In the shower scenario, I not sure if a motion detector would detect a person in the shower or not.

    It would probably work. PIR (passive infrared) motions sensors work by detecting a change in heat. And shower pushes heat all around a room constantly.

    I actually wondered if the PIR sensor wouldn't become saturated and not see the person just because of that reason (no discernible temperature differential).

    I'm not sure how well they sense through glass shower doors either.

    Well, it's not perfect anyway, but seems to be doing the trick so far :-)


    1 year ago

    Interesting idea and concept. One other thing you can do that surely will work as well or even better. Set a timer on the water heater flow. Give it 20 minutes and then stop flowing hot water. I bet you they will leave the bathroom rather quickly. And you can use your timer concept as well. Electric controlled water valves are everywhere and not very expensive either. They are used in dishwashers, washing machines and even irrigation systems. Pick one and have at it. Problem solved.

    1 reply

    Reply 1 year ago

    That's an interesting approach :-)

    In addition to the shower, we have one with a make-up routine that takes a long time.


    1 year ago

    great idea, sounds like 30 mins. is too long, how about 20 mins. per teen max. ?

    1 reply

    Reply 1 year ago

    In the software, you change both the number of LEDs in the chain (each LED added/removed adds/removes one more TimeInt to the total time). You can also change the TimeInt value to something lower. For example, to limit to close to 20min using 3 LEDs, you could set TimeInt = 7 and have a total of 21min.