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

Arduino-Controlled Water Pump with Transistor Switching

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled Water Pump with Transistor Switching

Circuit Documentation

Summary of the Circuit

This circuit is designed to control a water pump using an Arduino UNO microcontroller. The pump is switched on and off by the Arduino through an NPN transistor acting as a switch. A resistor is used to limit the current to the transistor's base, and a diode is included to protect against reverse current when the pump is turned off. The Arduino is programmed to turn the pump on for a fixed duration and then turn it off for a shorter period in a continuous loop.

Component List

Arduino UNO

NPN Transistor (EBC)

Resistor

Diode

Water Pump

Wiring Details

Arduino UNO

NPN Transistor (EBC)

Resistor

Diode

Water Pump

Documented Code

// Filename: sketch.ino

const int pumpPin = 8; // Pin connected to the base of the transistor through a resistor

void setup() {
  pinMode(pumpPin, OUTPUT); // Set the pump pin as an output
}

void loop() {
  digitalWrite(pumpPin, HIGH); // Turn the pump on
  delay(6000); // Wait for 6 seconds (on time)
  digitalWrite(pumpPin, LOW); // Turn the pump off
  delay(2500); // Wait for 2.5 seconds (off time)
}

Description: The code sets up the Arduino to control the water pump via a digital pin (D8). The pump is turned on for 6 seconds and then turned off for 2.5 seconds in a continuous loop.