Introduction: Automatic Water Dispenser

Most at times we wish to wash our hands but the hands are too dirty to get a water as it will stain the rest. So this project is a simple water dispenser which dispenses water automatically once your hands are in a certain range to the tap.

Supplies

  1. Arduino uno
  2. Servo Motor
  3. Jumper Wires
  4. Ultrasonic Sensor

Step 1: Things to Consider Before Starting

The first step is to determine the maximum distance the hand has to be to the tap for it to dispense. in my case i'm using 20cm and also since we will be using a servo motor to open and close the tap, we need to determine at what angle does it open and at what angle it closes. i will use 180 deg for open and 0 deg for closed.

Step 2: The Code

Comments are written within the code for more understanding. the full code is given below

Step 3: Schematic