How to drive a 12V water pump with Arduino

Hi all,

So I want to turn a water pump on and off using arduino UNO. So i’m using a relay module for this.

I have

1)a 12V windshield water pump

  1. 2 relay module

Is this enough? How do i make my connections? I have attached the picture below.

Help would be much appreciated.

First, think of the circuit that gets power to your pump, without the relay. You'll have the +V from your power source going to the red wire on your pump, going through the pump to the black wire, then from the black wire to ground on the power source. To put in the relay, your going to disconnect the circuit somewhere, doesn't matter too much where, and put each end of the wire from the disconnection to one of the screw terminals on a relay. One should connect to COM, the other depends on whether you want to the pump to operate when normally open or normally closed.

On the other side of the relay board is where your control wiring, from the Arduino, goes. Connect the +5V and GND on the board to the +5V and GND on the Arduino. Then your going to connect one of your digital outputs on the Arduino to the relay pin. This pin will trigger the relay to flip.

This Instructable should help. They're driving a light, but the principle is the same as a motor. When powering motors it can also be good to put a diode arranged opposite of flow to protect the circuit from the motor.This image below is from that Instructable. |500x378

Can i make it work by connecting the power supply to the arduino board? And not power supple to the relay except the 5v from arduino?

Its better to supply direct to the relay board.

But why a relay? A MOSFET might be easier and simpler.

But first things first, what current does this motor take? Stall current is the first thing
to find out (measure the motor resistance at the terminals). Stall current = 12V / R

hey guys I need some help, I am doing a project with a 240v to 24v transformer, an uno arduino and a 4 relay module and I need to press a pushbutton that starts a 24v dc pump, runs for 15 seconds, stops pump but starts 24v dc motor at same time for 10 seconds, stops motor and loops around to restart pump and does the continuous loop, how do I find the right code for doing this?

i need code

i need code

Why hijack an old posting. Start your own new posting and give a description of what you are doing and your questions.

Usually code is what you write, or find and modify to work as you want.