Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Maria Angeline Adajar
Published © Apache-2.0

HydroPaws: Arduino-Based Automated Pet Hydration Station

An Arduino-powered automated pet water dispenser ensures pets stay hydrated by dispensing water based on time and water level.

IntermediateFull instructions providedOver 2 days57
HydroPaws: Arduino-Based Automated Pet Hydration Station

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
tubing
×1
Relay Module (Generic)
×1
water level sensor
×1
9V battery (generic)
9V battery (generic)
×1
water pump
×1
Solderless Breadboard Full Size
Solderless Breadboard Full Size
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

HydroPaws

Code

HydroPaws Code

C/C++
 // Define the pins connected to the components
 const int relayPin = 3;
 // Pin connected to the relay module
 const int waterLevelPin = A5; // Analog pin connected to the water level sensor
 // Variables
 int waterLevelThreshold = 300; // Set your desired water level threshold value
 int waterLevel;
 void setup() {
 pinMode(relayPin, OUTPUT); // Set relay pin as output
 digitalWrite(relayPin, LOW); // Ensure the relay is initially off
 Serial.begin(9600); // Initialize serial communication for debugging
 }
 void loop() {
 // Read the water level sensor
 waterLevel = analogRead(waterLevelPin);
 // Print the water level value (for debugging purposes)
 Serial.print("Water Level: ");
 Serial.println(waterLevel);
College of Engineering Department of Electrical Engineering
 // Check if water level sensor value is below a certain threshold indicating no water
 if (waterLevel == 0) {
 // If water level is below the threshold, indicate that there is no water
 Serial.println("No water detected!");
 Serial.println("Pump ON");
 digitalWrite(relayPin, LOW);
 } else if (waterLevel > waterLevelThreshold) {
 Serial.println("Water is High");
 Serial.println("Pump OFF");
 digitalWrite(relayPin, HIGH);
 } else if (waterLevel < waterLevelThreshold) {
 Serial.println("Water is Low");
 digitalWrite(relayPin, LOW);
 Serial.println("Pump ON");
 }
 delay(1000); // Adjust delay time as needed to avoid rapid readings
 }

Credits

Maria Angeline Adajar
3 projects • 1 follower
I'm a Computer Engineering student passionate about hardware-software integration, data analytics, and embedded systems.
Contact
Thanks to Jamaica Kaye Lopez, Mark Joshua Rodil, Carlos Miguel Marabe, and Peter Arellano.

Comments

Please log in or sign up to comment.