I am currently trying to work on an auto watering plant project. My goal is to use a moisture sensor to help indicate when the plant needs to be watered. I am using a 12V water pump (https://www.amazon.com/Docooler®-Ultra-quiet-DC12V-Brushless-Submersible/dp/B00JWJIC0K?&_encoding=UTF8&tag=dailyjk02-20&linkCode=ur2) to help get the water from point A to B. However, when I tried wiring this pump up, it seems to be stuck in one mode where it continues to pump until power is taken away.
Any help / guidance on what to do to help control the on and off switch of this certain water pump? Thank you for your time!
Any help / guidance on what to do to help control the on and off switch of this certain water pump?
Write code to control the pump?
A proper power supply would be another good idea. No way a 9V block battery is going to power a 12V pump properly... it may run but it won't have significant pumping power left.
the pump need 417 mA to run normally, by switch-on even the double or more.
To switch the pump on/off you should use a Power-FET or Power-MOSFET in serial to the power (PWR=Red-wire).
This Power-FET can be driven directly from Arduino, if the Arduino-Output (or other output) not deliver enough current for the "gate" of FET you should use an amplifier or an OP between the signal output and the gate of FET.
To monitor if the pump run, just put in parallel to Pump (12V to ground) or the 5V of Arduino-output one LED with one resistor in serial to limit LED-current. For 12V use 600 Ohm resistor and for 5V 250 Ohm for a blue LED using 20mA current, for other LED colors or type see the specifications.
The formula to calculate the "Resistor" is "Voltage" divided by "Current": R = V/I.
Note/consider: The most 12V-motors (without a brake, PC-fun or pump) start to rotate at 5-5.1V, that's is 30% of 12V, if Arduino max. voltage 5V and you give this signal to FET or amplifier... remember 30% of 5V = 1.67V
You should have a 12V supply rated at least 4 times the motor's full load current and wired like:
M1 is your pump, Q1, a logic level MOSFET like IRLB8721PBF or similar.
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code.Hi
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?