Introduction: Automated Temperature Control Water Faucet

My water faucet of the gas burner is difficult to regulate warm water, especially in summer, either is hot or cold, may be the incoming water pressure of the building is not enough, I need to manually switch the hot and cold side handle, in hot side the burner starts and in cold side it stopped. So I design this device to automate adjust the on-off of the burner by sensing the water temperature, this device indirect control the faucet handle only and did not temper the burner to violate the warranty or repair term, but it may only worked in my faucet because the handle is easy to move by little force, if your faucet can adjust the water temperature or your water pressure if big enough, you don't need such device, this is only an experimental report on the work done.

Supplies

In this project I used several factory products, Arduino UNO, W1209 temperature control borad, LM2596 step down converter, and MG996R high torgue servo, while others are handmade or DIY.

Step 1: Making the Servo Box

In order to install the sensor with the W1209 board, I bought a shower hose coupler and drilled a hole to insert the sensor and sealed with silicon, and then I install the servo into a custom made box with incline angle matched the faucet handle, the couple bar of the servo is cut from the plastic lid of storage box. The servo box is mounted on a plywood back plate and suck to the wall not using drill or nail, so it can be removed without leaving a trace

Step 2: The Electronic Control Box

The electronic control box is a bit complicated, as it used in bath room so I'm not going to use AC, instead I use 3x 18650 battery to supply 12V for the W1209 control board, while the servo and UNO I need to step down to 6V by LM2596. The W1209 sending the trigger pulse to UNO board to turn the servo, the UNO code I used is simple and readily available in the IDE, I modify it a bit to suit may need

#include <Servo.h>

Servo myservo; // create servo object to control a servo

// constants won't change. They're used here to set pin numbers:

const int buttonPin = 2;   // the number of the pushbutton pin

int buttonState = 0;     // variable for reading the pushbutton status

int hotState = 0;

int coolState = 0;

void setup() {

 myservo.attach(9); // attaches the servo on pin 9 to the servo object  

 pinMode(buttonPin, INPUT);

}

void loop() {

 // read the state of the pushbutton value:

 buttonState = digitalRead(buttonPin);

 // check if the pushbutton is pressed. If it is, the buttonState is HIGH:

 if (buttonState == HIGH) { 

  hotState = 0;

  if (coolState == LOW) {

    myservo.write(110);

    delay(2000);

    myservo.write(100);

    delay(2000);

  }

  myservo.write(87);

  coolState = 1;  

  } else {

   if (hotState == LOW) {

    myservo.write(100);

    delay(2000);

    myservo.write(110);

    delay(2000);

   }

   myservo.write (120);       // tell servo to go to position in variable 'pos'

   hotState = 1;

   coolState = 0;

  } 

}  

The two major angles are 120 and 87 which is the on and off angle of the faucet handle, I added some intermediate steps in order for the water temperate to stay sometimes.

Step 3: How It's Work

First select the desirable water temperature something about 35 degree (Celsius), which is the hottest temperature, when it reached it turns the faucet to off state, when the water cool down 1 degree it will turn to the on state, the object temperature and temperature difference can be set on the W1209 board, the optima temperate control is around 34 degree to 37 degree.

I used somedays with good feeling, I need sometime to study if it will adversely affect the gas burn because of frequently switching on and off.