0
\$\begingroup\$

I am using an Arduino Micro to turn On/Off a 12 V Water Pump. I am using a HF3FA/005-ZTF relay --> Link

Here's how I connected everything: enter image description here

I control it with this code:

const int GO = 12;
void setup() {
pinMode(GO,OUTPUT);
}
void loop() {
digitalWrite(GO,HIGH); //WaterPumpON --> ON
delay(60000);
digitalWrite(GO,LOW); //WaterPumpOFF --> OFF
delay(60000);
}

Everything is working as it is supposed to:

QUESTION: Since I'm new electronics I would like to know if I need any kind of resistor somewhere within that circuit? I did not find similar circuits while googling and the only useful info was in this video: YouTubeLink_german and he does not use any resistors but he uses a different relay.

\$\endgroup\$
1
\$\begingroup\$

The relay you are using requires a coil voltage of 5 volts. Assuming that your Arduino Micro is able to supply the 5 volts at 72 milliAmps, then no resistor is needed.

Normally a resistor is used when the driving voltage is greater than the coil voltage. The resistor then "drops" the extra voltage across it so that the coil receives the correct voltage. So in the case of your relay, if you were using this relay but wanting to drive the coil with a 12 volt source, you would place a ~100 ohm, 1 watt resistor in series with it (7 volts / 72 mA).

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • 2
    \$\begingroup\$ You definitely need to have a diode across the relay pins or you will kill the Arduino driver for the relay. \$\endgroup\$ – Jack Creasey Jun 29 '17 at 17:20
  • 1
    \$\begingroup\$ @jackcreasey That is a good point. I added a schematic to depict this. \$\endgroup\$ – Glenn W9IQ Jun 29 '17 at 17:33
  • \$\begingroup\$ Ok sorry but now I'm a bit confused... the circuit works the way I drew it in my question.... I am using a Arduino Micro and the I/O Pin has 20 mA max just as user104163 stated... but everything works fine --> The Pump starts and shuts down without problems so the relay works.... Am I still good? \$\endgroup\$ – Peter S Jun 30 '17 at 19:02
  • \$\begingroup\$ The added diode is a safety measure. When a relay coil is turned off, it generates a voltage spike that can damage the driver. The backwards connected diode shorts out this spike so no damage occurs. \$\endgroup\$ – Glenn W9IQ Jun 30 '17 at 19:05
1
\$\begingroup\$

DC Current per I/O Pin 20 mA source: https://www.arduino.cc/en/pmwiki.php?n=Main/arduinoBoardMicro

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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