Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO Controlled Water Pump with 5V Relay and Battery Power

View and Edit Project In Cirkit DesignerImage of Arduino UNO Controlled Water Pump with 5V Relay and Battery Power

Circuit Documentation

Summary

This circuit is designed to control a water pump using a 5V relay and an Arduino UNO. The relay is toggled on and off every second by the Arduino, which in turn controls the water pump. The power for the circuit is supplied by a battery.

Component List

  1. 5V Relay

    • Pins: Normally Open, Common terminal, Normally Closed, In, GND, VCC
    • Description: A relay that operates at 5V to control high-power devices.
    • Purpose in Circuit: To control the water pump based on signals from the Arduino.
  2. Battery

    • Pins: -, +
    • Description: A power source for the circuit.
    • Purpose in Circuit: To provide power to the water pump and relay.
  3. Water Pump

    • Pins: positive, negative
    • Description: A pump used to move water.
    • Purpose in Circuit: The device being controlled by the relay.
  4. Arduino UNO

    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
    • Description: A microcontroller board based on the ATmega328P.
    • Purpose in Circuit: To control the relay based on the programmed code.

Wiring Details

5V Relay

Battery

Water Pump

Arduino UNO

Code Documentation

/*
 * This Arduino sketch controls a 5V relay connected to pin D3 of the Arduino UNO.
 * The relay is toggled on and off every 1 second, causing the connected water pump
 * to turn on and off at the same interval.
 */

const int relayPin = 3; // Pin connected to the relay

void setup() {
  pinMode(relayPin, OUTPUT); // Set relay pin as an output
}

void loop() {
  digitalWrite(relayPin, HIGH); // Turn relay on
  delay(1000); // Wait for 1 second
  digitalWrite(relayPin, LOW); // Turn relay off
  delay(1000); // Wait for 1 second
}