Welcome to Kerala Project Center.

Automatic Water Dispenser

Automatic Water Dispenser

Water dispensers with taps

Image: Orange and Apple infused water dispenser.jpg by Grandmaster Huon via Wikimedia Commons, CC0

Shared water dispensers with manual taps or push levers get touched by everyone who uses them, which is a real hygiene concern in public spaces, offices, and health-sensitive environments.

This project builds a contactless water dispenser: an ultrasonic sensor detects when a container is placed under the spout and automatically activates a water pump for a set duration, with no button, lever, or tap contact needed from the user.

How It Works

  • An ultrasonic sensor aimed downward at the spout area continuously measures distance to whatever's below it.
  • When a container is placed within range, the measured distance drops below a threshold, which the controller interprets as "container present."
  • The controller then energizes a relay driving a small submersible pump for a fixed duration (or until the container is removed), dispensing a measured amount of water.
  • Removing the container restores the longer baseline distance reading, and the pump stops automatically.

Components



Arduino Uno
Ultrasonic sensor (HC-SR04)
Relay module
Small submersible water pump
Water reservoir + dispensing spout
Power supply


Applications

  • Public and office water dispensers
  • Health-sensitive environments (clinics, hospitals)
  • Touchless dispensing for any liquid, not just water

Advantages

  • Fully touchless operation improves hygiene in shared spaces
  • Simple, low-cost sensor and pump setup
  • Adaptable to dispense any pumpable liquid, not just water

Sample Code — Container Detection and Pump Trigger



// Simplified touchless dispenser - Arduino
#define TRIG 9
#define ECHO 10
int pumpRelay = 7;
int containerThresholdCM = 8;

long readDistanceCM() {
  digitalWrite(TRIG, LOW); delayMicroseconds(2);
  digitalWrite(TRIG, HIGH); delayMicroseconds(10);
  digitalWrite(TRIG, LOW);
  return pulseIn(ECHO, HIGH) * 0.034 / 2;
}

void setup() {
  pinMode(TRIG, OUTPUT);
  pinMode(ECHO, INPUT);
  pinMode(pumpRelay, OUTPUT);
}

void loop() {
  long dist = readDistanceCM();
  if (dist < containerThresholdCM) {
    digitalWrite(pumpRelay, HIGH); // container detected - dispense
  } else {
    digitalWrite(pumpRelay, LOW);  // no container - stop
  }
  delay(200);
}


Related Research


Hours

Monday - Saturday: 9:00 AM - 5:00 PM
Sunday: Not Working

Location

2nd Floor, Comptron Arcade, Kallattumukku,
Thiruvananthapuram, Kerala 695012

Book Now

+91 9633118080