0
\$\begingroup\$

I'm trying to make a water pump work with arduino but I have a problem, it doesn't work and I don't know why. I'm a beginner with arduino so there are a lot of thing that I don't know.

I'm using a relay and a external energy suply, a battery, because I know that the arduino cannot do it by itself.

The conections in the relay are:
INPUTS

  • DC+: positive power supply (VCC)
  • DC-: negative power supply (GND)
  • IN: Digital 9


OUTPUTS

  • COM: Battery +
  • NC: Water pump

And finnaly I have the water pump connected to the Battery - and to the relay (NC).

Here is an image: enter image description here

The code I'm using is this:

const int control = 9 ;

void setup()
    {
         pinMode(control,  OUTPUT) ;
    }
void loop()
    {
         digitalWrite(control, HIGH);
         delay(2000);
         digitalWrite(control, LOW);
         delay(1000);
    }

Can anybody help me please? I'm in a hurry and I don't know what else to do.
Thanks beforehand.

\$\endgroup\$
2
  • \$\begingroup\$ Do you hear the relay click when you put your ear close to it? \$\endgroup\$
    – Bradman175
    May 22, 2017 at 14:38
  • \$\begingroup\$ That looks like a PC Fan connector, which usually requires 12V, not 9V. (if that is a pc watercooling pump) \$\endgroup\$
    – Wesley Lee
    May 22, 2017 at 14:41

1 Answer 1

3
\$\begingroup\$

The relay you have is rated at 12VDC. You need 12V to power the relay you are using when your Arduino can only output 5V max. You probably bought the wrong relay, because the one you linked on eBay which is the right one is different to the one you have.

I can tell because in the photo, your relay is marked as SRD-12VDC-SL-C: enter image description here

And in the datasheet below... https://www.ghielectronics.com/downloads/man/20084141716341001RelayX1.pdf That 12VDC refers to the voltage needed on the coil to activate the relay. So buy a new relay that has a coil rated at 5V or refund and replace the relay with the SRD-5VDC-SL-C if they gave you the wrong product.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the answer! Can I use the battery and connect it to the relay so that way it wil have the 12V that it needs? Something like this maybe: link \$\endgroup\$ May 22, 2017 at 18:42

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