Codey OnlineArduino & ESP32 component library › Pump 5V
Pump 5V
Actuators

Pump 5V

A pump converts electrical power into fluid movement, typically as a small DC load with two power terminals. It is usually driven through a transistor, relay, or motor driver rather than directly from a microcontroller, because it can draw more current than an Arduino or ESP32 pin can supply.

Width: 29.3 mm

Pinout — Pump 5V

Pin Signal Description
5V - power 5V DC Negative wire
5V + power 5V DC Positive wire

Example wiring diagram — Pump 5V

From To Wire
board:5V x1:+ red
board:GND x1:- black
board:D9 x1:1 green
board:GND.1 x1:2 black

Example Arduino code — Pump 5V

This example was written and compile-checked for the arduino-uno. Codey Online adapts it to any other supported board for you.

const int pumpPin = 9;

void setup() {
  pinMode(pumpPin, OUTPUT);
  Serial.begin(9600);
  while (!Serial) {
    ;
  }
  Serial.println("Pump example starting.");
  Serial.println("The pump will turn on for 2 seconds, then off for 2 seconds.");
}

void loop() {
  Serial.println("Pump ON");
  digitalWrite(pumpPin, HIGH);
  delay(2000);

  Serial.println("Pump OFF");
  digitalWrite(pumpPin, LOW);
  delay(2000);
}

Related components

A4988 Stepper Driver

A4988 Stepper Driver

BTS7960 Motor Driver

BTS7960 Motor Driver

DRV8825 Driver Board

DRV8825 Driver Board

L298N Motor Driver Board

L298N Motor Driver Board

Build your Arduino or ESP32 project with AI

Describe what you want to build. Codey Online writes the code, draws the wiring diagram, compiles it and flashes your board straight from the browser.

Start for free