Looking for advice on running a 12V water pump with arduino due

I am looking for advice for an automated watering system that I am trying to make. As a part of the project, I want to control a water pump with a relay based on the values from the soil moisture sensor using my Arduino DUE. These are my components for this part that I have chosen to use:

  1. A 12V water pump
    https://www.digikey.ca/en/products/detail/adafruit-industries-llc/1150/5638299

  2. Relay Module (Still not sure, I was unsure what to choose when I chose this)
    https://www.amazon.ca/Yizhet-Channel-Relay-Control-Optocoupler-Raspberry/dp/B08Q3G6X39/ref=sr_1_2_sspa?dchild=1&keywords=Relay+Module&qid=1612835624&sr=8-2-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEyR0xJNlM5SDRGNjZRJmVuY3J5cHRlZElkPUEwNTE0MzU5MkxOQlE5MUlKREs4NSZlbmNyeXB0ZWRBZElkPUEwMTE5MzM2M0IyQ1ZFSVBKVDdIRiZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU

  3. Soil Moisture Sensor
    https://www.digikey.ca/en/products/detail/dfrobot/SEN0193/6588605
    OR
    https://www.digikey.ca/en/products/detail/sparkfun-electronics/SEN-13637/7400839

Are the mentioned components compatible? If not, could anyone show me in the right direction regarding the components to use?

I would be happy for any help I can get! Thank you!

Those parts should work fine.
But I would personally use a mosfet rather than a relays, so you don't have any nerve wrecking clicking noises.
Other than that I don't know where your flowers are located...
... You might want to add an additional light sensor to prevent the motor from running in the night and keeping you awake.

Do you already have a power supply?

Hello Johannes,
Arduino DUE runs at 3.3V not at 5V like the Uno and the Mega.
Your sensor should work fine (3.3V - 5V) as in the spec.
Your proposed relays board is risky: the spec says 5V and you do not have a specification about what kind of electronics are mounted on it. So it could work, it could work not, or it could destroy your DUE after a while.
Is there any reason why you are using such a big gun as a DUE for your application? A small board such as the UNO would be fine and is much more robust.
Below a page with a link to a very detailed document I wrote about the same application: (press "Read More" on the web page and you will see a .pdf with some ideas and other things to watch out for.) Greehouse watering
Best Regards,
Johi.

The relay is not a good choice. Because it is a 5V relay, it needs a lot of current at 5V to activate it's coil. You might have planned for this current to be provided by the 5V pin on the Due. But if the Due is powered from 12V on its Vin pin, then the Due's on-board regulator may overheat and shut down or fail when it attempts to regulate so much current from 12V down to 5V. More than half the input power will be turned into heat by the regulator, and it has no heatsink or fan, so will get very hot.

A better choice would be a 12V relay. This can be powered directly from the 12V supply and will require almost no current from the Due to activate it.

As mentioned, better than a relay would be a mosfet. It should be an "n-channel" model with a "logic-level gate" such as stp16nf03l stp16nf06l or many others.

johannes_kunder:
Those parts should work fine.
But I would personally use a mosfet rather than a relays, so you don't have any nerve wrecking clicking noises.
Other than that I don't know where your flowers are located...
... You might want to add an additional light sensor to prevent the motor from running in the night and keeping you awake.

Do you already have a power supply?

I may have forgotten about a power supply. I'm not sure what power supply to get then, do you have any recommendations?

JOHI:
Hello Johannes,
Arduino DUE runs at 3.3V not at 5V like the Uno and the Mega.
Your sensor should work fine (3.3V - 5V) as in the spec.
Your proposed relays board is risky: the spec says 5V and you do not have a specification about what kind of electronics are mounted on it. So it could work, it could work not, or it could destroy your DUE after a while.
Is there any reason why you are using such a big gun as a DUE for your application? A small board such as the UNO would be fine and is much more robust.
Below a page with a link to a very detailed document I wrote about the same application: (press "Read More" on the web page and you will see a .pdf with some ideas and other things to watch out for.) Greehouse watering
Best Regards,
Johi.

The reason why I am using a DUE is because it's for my project for class. As for the relay module, do you have any recommendation in replace of my proposed relay? Would also be helpful if you can send me a link too.

Sorry, I made a typo, should have been stp16nf06l.

Watch out: some suppliers on Amazon are offering these at over £5 each + postage!!!! You can probably get 10 for that... don't pay more than £1.50 each.

according to the data sheet the due is capable of handling 12V(on the Vin Port!!).
But like PaulRB said, this is not the best option.
I woult buy a standard 12V Transformer (with DC out!!) and buy a seperat step-down converter, to regulate the Voltage down (you can adjust theese ones so you are able to reuse it for another projekt if you scrap this one further in the future).

PaulRB:
Sorry, I made a typo, should have been stp16nf06l.

Watch out: some suppliers on Amazon are offering these at over £5 each + postage!!! You can probably get 10 for that… don’t pay more than £1.50 each.

If I get the stp16nf06l do I need a 12V supply?

johannes_kunder:
according to the data sheet the due is capable of handling 12V(on the Vin Port!!).
But like PaulRB said, this is not the best option.
I woult buy a standard 12V Transformer (with DC out!!) and buy a seperat step-down converter, to regulate the Voltage down (you can adjust theese ones so you are able to reuse it for another projekt if you scrap this one further in the future).

As for this, I am not sure what these are, but I will look at them. Nonetheless thank you for this tip, though I’m sure that I probably won’t know what to get.

Hi all, I'm new here and I wanted to try making a automatic watering system for my plant. I already bought and am using an Arduino Due and I am planning on buying these components:

  1. water pump
    https://www.digikey.ca/en/products/detail/adafruit-industries-llc/1150/5638299

  2. Soil moisture sensor
    https://www.digikey.ca/en/products/detail/sparkfun-electronics/SEN-13637/7400839

  3. Relay (unsure)
    https://www.amazon.ca/SainSmart-101-70-101-4-Channel-Relay-Module/dp/B0057OC5O8

Could anyone help me if these components aren't compatible and can you please send a link too?

Nonetheless, I would be happy for any help I can get! Thank you!

kevhua36:
If I get the stp16nf06l do I need a 12V supply?

You need a 12V supply for your 12V water pump!

I have also forgot about a potentiometer. I just now know that the sensor I am buying does not come with a potentiometer so I was wondering if anyone has any good recommendation for one. Because I am not sure if a trimmer one or a single turn potentiometer would do.

A DC-DC Stepdown converter is pretty easy to explain...
You put a high(er) inputvotage in and you will get a low(er) output voltage from it.
In our case: 12V -> 5V.
you can adjust the voltage with a little screw driver. All you need is a Multimeter.

another opertunity would be to use a 5V supply in combination with a DC-DC stepup-converter to get the 12V, but this solution is not so elegant.
It probably would work just fine, cause you arn´t draining a high current out of it, but i am not a fan of it.
The step up converter is more reliable!

PaulRB:
You need a 12V supply for your 12V water pump!

Okay.
Also does anyone know a good potentiometer to go with this? I just realized may want to use one for the soil moisture sensor. I am currently thinking about using this:
https://www.digikey.ca/en/products/detail/bourns-inc/3362p-1-103tlf/1232540
as I was talking to someone from digikey for some support on the equipment. But she does not know much about arduino too and this potentiometer looks different from the others that i have seen (and not sure if it works like the others), so I would like an experienced person's word on it too.

johannes_kunder:
A DC-DC Stepdown converter is pretty easy to explain...
You put a high(er) inputvotage in and you will get a low(er) output voltage from it.
In our case: 12V -> 5V.
you can adjust the voltage with a little screw driver. All you need is a Multimeter.

another opertunity would be to use a 5V supply in combination with a DC-DC stepup-converter to get the 12V, but this solution is not so elegant.
It probably would work just fine, cause you arn´t draining a high current out of it, but i am not a fan of it.
The step up converter is more reliable!

Do you perhaps have a guide that I can read? Also, why would I need a DC-DC Step-down converter? I am using the Arduino due which runs at 3.3V to try to run a 12V water pump.
Sorry if I am ignorant but this is my first time and I dont see the use to lowering voltage instead of increasing it.

Why is this the same as this recent post?

First I suggest you read this [soil moisture hookup guide](http://"https://media.digikey.com/pdf/Data Sheets/Sparkfun PDFs/Soil_Moisture_Sensor_HookupGuide_Web.pdf") and pay special attention to when they mention "You need to supply power to VCC and GND. We recommend not powering the sensor constantly to prevent corrosion of the probes (more on this in a bit)". Depending on your soil chemistry the probe will deteriorate pretty quickly and different soil chemistry will afford different readings (conductivity) for a given moisture content. I suggest you work from the link and have no idea why you want a potentiometer? The sensor module gives you a signal out proportional to Vcc and soil moisture.

Running on 12 volts the pump only draws about 200 to 300 mA so can easily be switched using a simple transistor, you really don't need a relay. This link has a few schematics. There are other schematics to be found online and they are pretty simple to follow.

Understand what is going on. The sensor sends an analog voltage to the micro-controller. You determine a suitable moisture threshold. When soil moisture drops below your threshold the micro controller turns on the pump. Obviously do not place your watering outlet beside the sensor. Again, keep in mind these sensors are not quite durable.

Ron

I see in my slow reply other post. :slight_smile: Good point Paul.

Duplicate topics merged

@kevhua36
@bocis1212

You have the same IP address and I would conclude that you are working on the same project

Would one or both of you like to explain what is going on here before one or both of the accounts are banned ?

UKHeliBob:
Duplicate topics merged

@kevhua36
@bocis1212

You have the same IP address and I would conclude that you are working on the same project

Would one or both of you like to explain what is going on here before one or both of the accounts are banned ?

Kind of forgot my password on this account when trying to log in to on my mom's laptop, since this laptop had died. So I created a new account as I didnt want to lose any more time since a part of my assignment is due till midnight (my lack of sleep and nervousness combined made me forgot that I could have just clicked forgot password). Wanted to ask on another forum category (is that what it's called? forum topic? I dont know), to see other people's view and. I do not know how to like send it to other related category so I just went and asked over there and made some changes as I was updating my new list of materials.

i also just realized. I could have just continued to use my laptop while it was charging.

The bocis1212 account has been deleted

Please be more careful in future

You will need a step down converter to power your arduino...
12v for the motor...
3,3v for the board...
That are two different voltages!

And it does not make much difference which poti you are using, as long as it changes its resistance when you turn it.

But maby you should start with the basis of enectronics/programing first...