Introduction: Self-Powered Automatic Water Tap

About: I like to learn, like to make, like to share.

Recently, I made an automatic water tap which does not require any external power. It can power itself from a micro generator. I used a rechargeable Li-ion battery to store energy when water flows out from the tap. It can be manually controlled from a button. The treasure behind it is very simple. I used an IR receiver & transmitter pair to sense the presence of hand below the tap. IR transmitter transmit infrared light and when something obstruct the light it reflect back to the receiver. The resistance of the receiver decrease with increased infrared light. The output of IR receiver is taken by a microcontroller and compared it to a preset value. If it receive more light compare to preset vale of threshold then it sent a signal to a servo motor and servomotor rotate the knob of the water tap.

Features of the project:

1. Self-Powered

2. Automatic & Manual Control

3. Simple design

4. Low cost

Step 1: Bill of Materials

1. 3.6V Micro Hydro Generator (you can use SeedStudio 3.6V Micro Hydro Generator Pro with Built-in Lithium Battery & built-in Lipo Charging Circuit).

2. Screw thread (G 1/2", female) (you can get it from local hardware store)

3. Thread seal tape (you can get it from local hardware store)

4. Arduino Uno (Sparkfun)

5. IR Transmitter (Sparkfun)

6. IR Receiver

7. 56k Resistor

8. 220 ohm resistor

9. PCB board

10. Micro servo motor (Sparkfun)

11. Polymer Lithium Ion Battery (Sparkfun)

12. 1.25" diameter plastic pipe

13. Some wires

Required Tools

1. Hot glue gun

2. Soldering Iron (Sparkfun)

3. Solder (Sparkfun)

4. Wire cutter (Sparkfun)

Step 2: Prepare the Tap

First, remove the handle from the water tap by opening the screw. Fix the servo horn to the stem of the water tap using any strong glue. I used hot glue and is working perfectly. Be careful when connecting, the axis of the servo horn and the axis of the stem should be perfectly aligned. Take 2 inch plastic pipe with the diameter of 1.25 inch. Truly speaking, the size of the pipe is dependable on the tap. A 3D printed part will be a great replacement of the pipe. Cut the pipe in one side according to your servo size to put the servo on it.

Step 3: Adjust Servo to Pipe

Rotate the fixed servo horn by your hand and place it in a position where it close the valve of the water tap. Now put the servo motor to the pipe and connect the pipe to the tap. Be sure it perfectly match to the servo horn you fixed previously with the stem of the water tap otherwise it will not work.

Step 4: Fix the Pipe to Water Tap

Fix the pipe to the water tap using hot glue. Use glue around all the side to strongly connect and prevent from entering water into it.

Step 5: Join the Servo Using Hot Glue

Join the servo motor to the pipe using hot glue. Make sure no gap is present to prevent entering of water. Are you sure it perfectly matched to the servo horn fixed on stem of water tap previously? If yes, then you completed the hardest part of the entire task. Now you can check it either it will work perfectly or not.

Give air from your mouth blowing into one side of the water tap and observe from the other side. As you set the valve of the tap in close position before, air should not pass.

Now, connect the servo motor to the Arduino and upload the servo program given below.

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

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

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

} void loop() { }

Now, test it again by flowing air. This time air should pass from one side to the other. If so then it is working well.

Step 6: Connect Screw Thread to the Hydro Generator

Now, we will work with another vital thing of our system, the hydro power. For that we will use 3.6V micro hydro generator which will be enough for our system. Hydro generator produce power when water flows within it. Connect a BSP female screw thread to the hydro generator. Use seal tape to prevent leak of water. Note the arrow mark on the top of hydro generator when connecting screw thread.

Step 7: Connect Water Tap to Hydro Generator

Now connect the prepared water tap to another side of the screw thread using seal tape. One important thing, always wrap the seal tape in clockwise direction.

Step 8: Make Sensor Module

Make the sensor module according to the circuit diagram. The long lead of the IR receiver and transmitter is anode and short lead is cathode. Transmitter led is connected as forward bias and receiver must be connected as reverse bias. Solder all the components to the PCB according to the circuit diagram and then cut extra lead using a diagonal cutter. According to my experience, an old nail cutter works well even better than a diagonal cutter. Then solder three long wire to VCC, GND and Signal point of the PCB.

Step 9: Fix Sensor Module to the Water Tap

Fix the sensor module you just made to the bottom side of the water tap according to the photo using hot glue.

Step 10: Make Control Circuit & Upload the Program

Make the control circuit according to the circuit diagram. ATmega328P microcontroller was used for the main controlling unit of the project. I used this microcontroller for the project because this is the main microcontroller of Arduino Uno board. Using this controller makes my work easy. It can be program easily using Uno board. External 16MHz crystal was used as clock source. I added 1 button to manually control the tap. If you press the button for the first time the tap will be on and if you again press the button the tap will be off. I used a hydro generator which has no built-in battery and for that I had to used external Li-ion battery & charging circuit.

To connect hydro generator and battery charging module follow the block diagram shown above. I used a 5V regulator between hydro generator and charging module to stabilize the output of hydro generator because charging module can tolerate maximum 5.5V. If you used Seeedstudio micro hydro generator then you need not to connect these external parts. Just connect the button and upload the following Arduino sketch and enjoy it.

#include <Servo.h>
int value = 0;
int avg_value = 0;
int sensorPin = A5;  //connect ir receiver output to this pin
int buttonPin = 18;  // button pin to A4
boolean buttonState = HIGH; 
boolean tapState = LOW;
int ledPin = 13; //this is for testing purpose
int tapForState = 0;
Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);
  digitalWrite(buttonPin, HIGH);
  //servo motor is connected to Arduino digital pin 3
  myservo.attach(3);
}

void loop() {
  buttonState = digitalRead(buttonPin);
  delay(50);
  if(buttonState==LOW && tapState==LOW){
    digitalWrite(ledPin, HIGH);
    myservo.write(0);
    delay(7000);
    tapState = HIGH;
    tapForState = 1;  // check either tap was on for button press or not
    }
  else if(buttonState==LOW && tapState==HIGH && tapForState==1){
    digitalWrite(ledPin, LOW);
    myservo.write(80);
    delay(100);
    tapState = LOW;
    tapForState = 0;
    }
  // put your main code here, to run repeatedly:
  for(int i=0; i<20; i++){
     value += analogRead(sensorPin);
     delay(5);
    }
  avg_value = value / 20;
  Serial.println(avg_value);
  if(avg_value<=500){
    digitalWrite(ledPin, HIGH);
    myservo.write(0);
    delay(7000);
    tapState = HIGH;
    if(tapForState==0)
      tapForState = 2; // check tap was on using sensor data
    }
  if(avg_value>500 && tapForState==2){
    digitalWrite(ledPin, LOW);
    myservo.write(80);
    delay(100);
    tapState = LOW;
    }
    value = 0;   
}

Step 11: Test Your Creation

If you followed all the steps describe above, Congratulation!!! You successfully created your self-powered automatic water tap. Enjoy it and modify it in creative way to make it better.

Automation Contest 2016

Runner Up in the
Automation Contest 2016

Renewable Energy Contest

Participated in the
Renewable Energy Contest

Makerspace Contest

Participated in the
Makerspace Contest