Introduction: Sustainable Shower: Arduino Uno

In this time of being conscious of your energy consumption, it's hard to keep track of all the energy you are consuming. Especially when you are enjoining a warm, long shower. This combination of Arduino hard and software and every stuff you have in your house, makes it possible to keep track of your energy consumption.

With measuring the temperature of the water and the existence of a flow we make the calculation of the energy consumption of your shower.

Step 1: Materials


  • Arduino Uno
  • Breadboard
  • 3 LED's ( 1x green, 1x yellow, 1x red)
  • 3x 220 Ohm resistance
  • 1x 3.9 kilo Ohm resistance
  • 1x TMP36 temperature sensor
  • at least 6 short wires (7 - 10 cm)
  • at least 5 long wires (60 cm) (just as far as the Arduino has to be away from your shower)
  • 1 piece of copper tube (15 cm)
  • 2 pieces of hose pipe (The diameter of the hose pipe has to fit nicely over the copper tube)
  • some tape
  • some tie wraps

Step 2: The Hardware

  1. Connect the LED's to the output:
    Use the short wires to connect the LED's.
    Make sure you connect the LED's with the following output ports:
    - Red: 13
    - Yellow: 12
    - Green: 11
  2. Connect the TMP 36
    You have to use the long wires, since the TMP 36 will be connect to the shower and you don't want your Arduino to get wet.
    The middle wire has to be connect to input A1. In case you don't know how to connect the tmp36, you can check the picture above. If the ground(GND) and 5 Volts are switched, you are gonna burn the tmp36
  3. Connect the flow analysers
    The cable from the breadboard to the Arduino can be a short one, for the other two you have to use the longer ones for the reason descripted above.

Step 3: The Copper Tube

  • Since the TMP36 is not suitable for using it in the flow, it is going to measure the temperature throw the copper tube. Preventing short circuiting, tape the legs of the TMP 36 sensor. Place the TMP 36 with the flat side onto the copper tube and use (enough) tape to keep it in place.
  • Connect one end (only the wire, not the cloak) from the flow analyzer to the copper tube, also use enough tape to make sure it will stick to it.
  • The other end (also the wire without the cloak) will be connected to the shower hose. This should be an upper part of the hose, so it won't be connected to the water if the shower is off. Make a small hole with a needle in the rubber hose. Then put the end in the hose. The part in the hose should be at least 3 cm long and not touching the copper!

Step 4: Connect to Shower

Put the shower hose over the copper pipe like shown on the photo and use tie wraps to keep it place. Now you can connect the hose to your shower head and your faucet. Congratulations, all the hardware is done!

You can use your imagination if you want to pack the Arduino and the breadboard into a housing.

Step 5: The Code

Here you find the code to program onto your Arduino. For this program it is needed to download an extra function(elapsedmillis) for the Arduino, which you can find here. The .h file in this folder must be added to the library of your Arduino program.

In this code it is assumed that the shower gives a constant flow of 15 liters per minute.

The following limits are set for the different LED lights.

Red: X > 15 MJ

Yellow: 6 MJ < X < 15 MJ

Green: X < 6 MJ