Introduction: Arduino Shower Monitor

About: Lazy Old Geek

Since this Lazy Old Geek (LOG) is getting Old, he(I) forget things. Now I like to take a shower every other day but can’t remember if it’s shower day or not. I could mark it on a calendar (paper or computer) or I could even have the calendar alarm me but for various reasons, sometimes I will want to shift my schedule. Well, my MD said my memory was okay for my age, so I decided to make a little Shower Monitor. For the electronic hobbyist, enough information is provided to make this project (hopefully). Parts list, CAD files and software is provided.

Step 1: Design

Design

1. Well, this is LOG so I naturally decided to use an Arduino.
2. It would be battery powered since it will go in my bathroom.
3. I wanted it to show the day of the week and whether or not it’s shower day.
4. I also wanted to be able to toggle the shower day on or off if I wanted to change it.

The ‘standard’ Arduino, like the UNO is not very well designed for battery operation, so I decided to build my own Arduino on a PCB.
I decided on the Lithium 18650 battery as it’s my current favorite battery of choice. (see picture) This battery voltage will vary from about 4.2Vdc fully charged down to about 2.0Vdc.
Technobabble: One of the brains of the Arduino is the AtMega328P. Another current favorite for me. Now this microprocessor will theoretically operate with a voltage of 4.2Vdc down to about 1.8Vdc but I think in the Arduino standard environment it is limited to 2.9Vdc? Anyway, that’s good enough for me. However, at lower voltages, the clock needs to be reduced to 8MHz.
Eagle files are atttached, schematic and PCB. This schematic is my prototype design so includes parts I thought might be necessary. I did not stuff the DS1307, 32.768KHz crystal and battery holder.

I made and stuffed the PCB.
I installed different colored LEDs for the day of the week so it’s a little easier to distinguish one day from another. (My eyesight isn’t the greatest)

Parts List:
1 18650 Battery
1 18650 Battery holder
1 Shower Monitor PCB (Can be made with Eagle Cadsoft files)
1 ATmega328P microprocessor
1 28 pin IC socket
6   Male header pins
1 Tactile SPST switch
1 Tactile DPST switch
1  Capacitor 0.1uFd
2  Capacitor 22pFd
1  Cylindrical crystal 8MHz
8  LED 3MM (assorted colors)
1  Resistor 10K
8  Resistor 1.5K
1 JST2.0 connector set (male/female)
Scrap wire
Scrap plastic

Step 2: Arduino Software

Problem: The standard bootloaded AtMega328P will not work with an 8MHz crystal. A different bootloader is needed.
Solution: I basically used this procedure to load the correct bootloader:

http://arduino.cc/en/Tutorial/ArduinoISP

Step 6: I selected: Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328 as the bootload I wanted on the AtMega328P.
Warning: When loading sketches under Tools>Board menu, you must select Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328

Problem: I needed a way to figure out the day of the week.
Solution: In the RTC library, there is a function called RTC_Millis. This uses the Arduino millis() function to calculate the day and time.
Technobabble: The Arduino millis() function uses the (in this case) 8MHz crystal to calculate time. This is not a very accurate way to calculate time. It depends on a lot of factors, especially the accuracy of the crystal but also, temperature and possibly voltage.
Well, some say it may be off a few seconds a day. Well, my accuracy is in days so, I don’t think it’ll be a problem, though I should have a better idea after a few weeks of use.
The time is set when the sketch is loaded. The time comes from the time set on the PC loading the sketch.

Problem: The Arduino AtMega328P is normally powered and draws current continuously. This drains the battery faster.
Solution1: I found this website that will put the AtMega to sleep

http://www.rocketscream.com/blog/2011/07/04/lightweight-low-power-arduino-library/
Here’s the library:
https://github.com/rocketscream/Low-Power
Unfortunately, I couldn’t get it to work with millis().
I also tried Narcoleptic but couldn’t get it to work either.

Solution2: Well, since I am Lazy, I decided to skip trying to implement Sleep mode and decided to just turn off the LEDs until the Start button is pushed. I am guessing the battery should last about a month.

Correction: My first sketch had an error in it so this is Sketch2!!!

Step 3: Using Shower Monitor

So being Lazy, I used double sticky tape and stuck the battery and PCB on a piece of plastic. I drilled a couple of holes, strung a piece of wire and hung it on a nail. (See picture)

Procedure: Press the Start button, one of the days of the week LEDs lights up. Hopefully, it will be the correct one. If the Shower LED is lit, it’s shower day.
The Shower Monitor will shut off after about six seconds.

Changing Shower Day: If you want to change Shower day, press and hold the Start button for about six seconds until it toggles, then release button.

Troubleshooting:
If no LEDs come on, it’s (hopefully) the battery. Replace with a charged 18650.
You will need to reload the sketch to set the time.

If the day of the week is off, reload the sketch to set the time.

Kit Contest

Participated in the
Kit Contest

Arduino Contest

Participated in the
Arduino Contest