4

I am trying to build an automatic watering system by following some examples. However, I don't have all the components for the entire system, therefore I have built it in Fritzing using only the components that I have (see scheme below):

enter image description here

I didn't build the physical version yet, because I am not sure that such a system would work without burning anything. In many examples, people connect the pump to a Relay Module, but since I don't have it yet, I would like to build it like this until I set up the watering system.

Can anyone help me understand why a relay would make it better or worse?

P.S. I have a JPC-3F relay, but I can see that the Relay Module contains multiple components. Is it possible to add the JPC relay to the pump without having the entire Relay Module? Would I need extra components for that?

Thank you!

EDIT: Thanks to the answer from ratchet freak, I have added resistances and a transistor. It works fine, but the same question stands. Do I still need a relay in this case? enter image description here

3 Answers 3

9

You should put a resistor in series with the led to limit the current.

The IO pins cannot source enough current to run the pump without damaging themselves. That's why you need a buffer of some kind.

The extra components in the relay module are a transistor to do the actual switching and a reverse-biased flyback schottky diode in parallel with the relay coil. The flyback diode is required to absorb the voltage spike generated by the coil getting switched off and acting like an inductor.

You can use a transistor to switch the motor directly assuming you can find one that can handle the current draw. If you do then you absolutely will need a flyback diode on the motor to avoid damage to the transistor.

4
  • Thank you very much for the explanation. Can you please tell me which transistors should I use? In my kit I have one IRF520N, one ST8050 and one S8550 . Would any of these work? I can see that only S8550 can work with 5V, but negative. And will I have to supply extra energy for the pump or it'll work through the IO pins?
    – Physther
    Sep 20, 2017 at 11:29
  • 2
    You'll need extra energy.
    – f p
    Sep 20, 2017 at 13:01
  • Thank you all. I have tried with only the IRF520N and it works perfectly. Is there any danger in this?
    – Physther
    Sep 20, 2017 at 17:08
  • Doesn't the IRF520N already have an internal diode?
    – dandavis
    Sep 26, 2017 at 1:00
4

this is not an answer to the question you asked, but you need to understand this:

generic DC relay advice. Use commutating diodes. this is not a special kind of diode, it is a particular use of a generic diode. you want 2:

one across the coil, reversed biased - cathode to +VDC. The coil throws a huge spike of negative DC when power to the coil is cut and the magnetic field collapses. this diode eats that spike

second one from the load to ground, reverse biased. this eats any spike from the load to ground - the fat blue arc you see when you disconnect a load by yanking the wire

https://www.allaboutcircuits.com/textbo ... -circuits/ https://www.allaboutcircuits.com/textbo ... ing-diode/ https://en.wikipedia.org/wiki/Flyback_diode G

2

The relay have a coil resistance of 70 ohm for the 5 Volt version.

Ohms law, U = I x R

I = U/R = 0.071 Ampere, and now you have to find out, can an Arduino I/O pin drive a load of 71 mA? If not you have to add a driver aka most commonly a transistor.

And now you should ask yourself, can I drive the motor directly with a transistor driver and skip the relay? So do you have any data on the pump?

And if you look at the datasheet for IRF520, fig 3 and fig 4 have the data for planning if it will work or not.

Ref.: https://www.infineon.com/dgdl/irf520npbf.pdf?fileId=5546d462533600a4015355e340711985

4
  • Thank you for the answer. The pump is AD20P (5V). It works very nice with transistor only (and a 5V power supply), but I don't know if this is a good idea.
    – Physther
    Sep 20, 2017 at 17:56
  • Datasheet for the AD20P ? To post only the AD20P mean that I have to search for the datasheet...
    – MatsK
    Sep 20, 2017 at 18:06
  • Sorry: Input Voltage: DC 3.5-9V, Power: 1-3W, Qmax = 120L / H (44GPH). This is what I could find.
    – Physther
    Sep 20, 2017 at 18:14
  • Worst case is 3 W and 5 Volt: I = P/U = 3/5 = 0.6Amp then will the IRF520 handle the pump without problem.
    – MatsK
    Sep 20, 2017 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.