# 2 12V pumps to arduino Uno

**URL:** <https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787>\
**Category:** Motors, Mechanics, Power and CNC\
**Created:** [March 7, 2022, 4:31pm UTC](https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787 "2022-03-07T16:31:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinvenkat](https://avatars.discourse-cdn.com/v4/letter/v/ecb155/32.png) [@vinvenkat](https://forum.arduino.cc/u/vinvenkat)\
**Post date:** [March 7, 2022, 4:31pm UTC](https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787/1 "2022-03-07T16:31:08Z")

</div>

Hi,

I am pretty new to using Arduino and have to power 2 12V pumps. I have an external 12V DC supply and 2 5V relays to independently control the 2 pumps, but I have no idea how I'd wire everything nor do I get if I need any other components (MOSFETs, resistors) to make sure I don't fry anything.

Here are the links for the pumps and the relay. Any help would be appreciated.  
Pumps - [https://www.tinytronics.nl/shop/en/mechanics-and-actuators/motors/pumps/under-water-pump-horizontal-3-6v](https://www.tinytronics.nl/shop/en/mechanics-and-actuators/motors/pumps/under-water-pump-horizontal-3-6v)  
Relay - [https://www.tinytronics.nl/shop/en/switches/relays/5v-relay-1-channel-high-active](https://www.tinytronics.nl/shop/en/switches/relays/5v-relay-1-channel-high-active)

Thanks

---

<div class="post-metadata">

**Author:** ![wildbill](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wildbill/32/1126438_2.png) [@wildbill](https://forum.arduino.cc/u/wildbill)\
**Post date:** [March 7, 2022, 4:38pm UTC](https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787/2 "2022-03-07T16:38:27Z")

</div>

Your link to the pump suggests that it is 3-6V, not 12.

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [March 7, 2022, 4:51pm UTC](https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787/3 "2022-03-07T16:51:10Z")

</div>

An Uno output cannot supply sufficient current to directly drive a relay. There needs to be a transistor driver to switch the current. The linked relay module has the driver on board so should be OK.

I think the better way is to use the transistor to drive the motor and not use the noisy mechanical relay that will wear out.

 ![mosfet motor driver](https://europe1.discourse-cdn.com/arduino/original/4X/c/b/5/cb567db03a08477481ed667a6b1d3d3e9bab6f2d.jpeg)

Choose the motor driver based on the stall current of the motor and the motor supply voltage. The stall current can be several times the running current. The stall current will be drawn, briefly, every time that the motor is started. The stall current should be listed in the motor data sheet. In the absence of a data sheet, the stall current can be estimated. To estimate the stall current, measure the motor winding resistance. Zero your meter lead resistance before measuring the motor coil resistance. Take several measurements rotating the motor a bit between readings. Use the lowest reading in the calculation. The estimated stall current is the motor supply voltage divided by the measured resistance.

Also, if required, the transistor driver allows the use of PWM to vary the speed of the motor. Not possible with a relay.

The relay and the motor **require external power supply** (s). The Uno is not a power supply and cannot, safely, provide the current to drive relays and motors.

---

<div class="post-metadata">

**Author:** ![vinvenkat](https://avatars.discourse-cdn.com/v4/letter/v/ecb155/32.png) [@vinvenkat](https://forum.arduino.cc/u/vinvenkat)\
**Post date:** [March 7, 2022, 5:41pm UTC](https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787/4 "2022-03-07T17:41:22Z")

</div>

So a MOSFET for each pump as opposed to the relay. Do the MOSFET also need external power supplies? And secondly, for the code, I can give a condition like a sensor reading \> 1000 to switch the transistor on, right?

Also in the drawing, are the diode and capacitor necessary for the circuit, or is that an example of the kind of motor?

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [March 7, 2022, 5:51pm UTC](https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787/5 "2022-03-07T17:51:26Z")

</div>

> [@vinvenkat](#):
>
> Do the MOSFET also need external power supplies

No. They need so little power that you may be able to run the Uno from the 12V supply without it overheating, and not need a separate 5V power supply for the Uno. But that's a maybe. Tell us what else will be connected to the Uno - sensors, displays?

> [@vinvenkat](#):
>
> I can give a condition like a sensor reading \> 1000 to switch the transistor on, right?

Yes

> [@vinvenkat](#):
>
> are the diode and capacitor necessary for the circuit

Yes. The diode protects the rest of the circuit from the jolt of reverse voltage/current that is created at the moment when the pump is switched off. The cap suppresses electrical noise that could cause problems in the circuit when the pump is on.

---

<div class="post-metadata">

**Author:** ![vinvenkat](https://avatars.discourse-cdn.com/v4/letter/v/ecb155/32.png) [@vinvenkat](https://forum.arduino.cc/u/vinvenkat)\
**Post date:** [March 7, 2022, 6:23pm UTC](https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787/6 "2022-03-07T18:23:00Z")

</div>

> [@PaulRB](#):
>
> Tell us what else will be connected to the Uno - sensors

4 sensors; 2 capacitive soil moisture sensors, a light sensor and a temp and humidity sensor, all of which run on 3.3 - 5V

> [@PaulRB](#):
>
> Yes. The diode protects the rest of the circuit from the jolt of reverse voltage/current that is created at the moment when the pump is switched off. The cap suppresses electrical noise that could cause problems in the circuit when the pump is on.

If that's the case, any idea on what kind of or what value diodes, capacitors and whatever is in the middle of the 2 that I should be using?

Thanks

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [March 7, 2022, 6:36pm UTC](https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787/7 "2022-03-07T18:36:19Z")

</div>

> [@vinvenkat](#):
>
> any idea on what kind of or what value diodes, capacitors and whatever is in the middle of the 2 that I should be using?

The [flyback diode](https://forum.arduino.cc/t/flyback-diodes-and-why-you-need-them/675409) can be a common silicon rectifier diode like a 1N4004 - 1N4007.

The cap, a 0.1uF ceramic cap is a good starting point. [Reducing motor electric noise.](https://www.pololu.com/docs/0J15/9)

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [March 7, 2022, 6:41pm UTC](https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787/8 "2022-03-07T18:41:09Z")

</div>

Here are the MOSFET motor driver and the relay module(with transistor driver) driving a motor to show the power supplies required. The MOSFET only driver only needs a motor supply, the relay needs a coil driving supply and a, separate, motor supply. Do you see an advantage to using the relay?

 ![mosfet motor driver V RELAY](https://europe1.discourse-cdn.com/arduino/original/4X/c/7/7/c77a352bcfba8b226539bff35732fc86faf2ada7.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 3, 2022, 6:41pm UTC](https://forum.arduino.cc/t/2-12v-pumps-to-arduino-uno/966787/9 "2022-09-03T18:41:30Z")

</div>

Closed on September 3, 2022, 6:41pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
