Relay Lights Up But There's No Click

I've searched the forum for the past couple hours and read through some threads but haven't come across one that solves my issue, so please, please forgive me if this has been answered already.

I'm not total n00b but I'm sort of newish.

I have an arduino nano hooked up to this relay: https://www.amazon.com/gp/product/B00E0NTPP4/ref=oh_aui_search_detailpage?ie=UTF8&psc=1

VCC to D12
GND to GND
IN1 to A1
IN2 to A2

Jumpers on RY-VCC -> VCC

There is nothing hooked up to the relay at this point (there was, but for simplicity / space /testing considerations I removed it.

This is the bare bones sketch I am testing with:

const int relayPower = 13;
const int pumpRelay = A1; 
const int lightsRelay = A2; 
  
void setup() {
  pinMode(relayPower, OUTPUT);
  pinMode(pumpRelay, OUTPUT);
  pinMode(lightsRelay, OUTPUT);

  digitalWrite(relayPower, OUTPUT);
}

void loop() {
  digitalWrite(pumpRelay, HIGH);
  delay(500);
  digitalWrite(lightsRelay, HIGH);
  delay(500);
  digitalWrite(pumpRelay, LOW);
  delay(500);
  digitalWrite(lightsRelay, LOW);
  delay(500);
}

All this gives me is a light show. I expect clicks, I get no clicks.

This is supposed to be a soldered up version of a project I'd previously built successfully on a breadboard, so other than that there isn't (or shouldn't be) any differences between this and the functional project, so I really am not sure what I'm missing here.

One thing I should mention is I desoldered the header pins so I could attach it better to my perf board, and I think I was a little too aggressive on IN1 and pulled off part of the solder pad / ring thingy. I'm still apparently getting connectivity there though, since it lights up when I tell it to.

Forgive me if my thoughts are less than organized. It makes sense to me, but I've been at this since I got off work and am tired.

Thanks in advance, I love you.

VCC to D12

const int relayPower = 13;

pinMode(relayPower, OUTPUT);

No...
Can't POWER a relay module from an OUTPUT PIN.
Two relays (coils) could draw 150mA when active, and a pin shouldn't supply more than 20mA (40mA absolute max).

Connect relay VCC to the 5volt power pin.
The IN pins are safe, because they only have to sink ~2mA.
Leo..

Well, I didn't know. I thought it was the same amount of power, the difference was in how you could control it.

Thank you for your help, I will implement this tomorrow.

If you've tried to drive a highly inductive part like a relay direct from an Arduino pin there
is a very good chance you've fried the Arduino or at least its pin driver. Unless of course you
had a free-wheel diode in the circuit (always needed for driving relays, note).

The arduino itself works just fine and does what it's supposed to, but the relay does not.

I implemented WaWa's suggestion and ran the relay's VCC to the arduino's 5V pin, and I still only get the light show.

I am out of ideas.

Post a picture of the setup.
Leo..

I know it's not exactly fine craftsmanship and that those wires should be shielded. But there are no shorts I can detect.

You can follow this tutorial for the relay.

Very likely, the pin used on the Arduino to "power" the relay is fried, so don't assume you can use it.

jremington:
You can follow this tutorial for the relay.

Very likely, the pin used on the Arduino to "power" the relay is fried, so don't assume you can use it.

Why would the relay fry the 5V pin? And if it was fried, would it still power other components? Because it does.

I wasn't talking about the 5V pin. See reply #3.

Here's a drawing for a board similar to yours, relay is energized on a LOW output.
D0upWXs_d.jpg

jremington:
I wasn't talking about the 5V pin. See reply #3.

Well, I really don't understand what you mean then. Nothing is fried as far as I can tell, and the relay is powered by the 5V? If it's obvious what you mean I apologize.

outsider:
Here's a drawing for a board similar to yours, relay is energized on a LOW output.
D0upWXs_d.jpg

Correct. You send a LOW voltage to the pin that controls that relay input and it closes the circuit, in a normally functioning relay.

ThreeNinjas:
Well, I really don't understand what you mean then. Nothing is fried as far as I can tell, and the relay is powered by the 5V? If it's obvious what you mean I apologize.

From your reply #2, it appears that you were initially powering the relay directly from an Arduino pin. Doing so would have resulted in more than the maximum current for the pin to be drawn from the pin. This would have "fried" the pin - it wouldn't have caught fire, or charred the area around it, it just would not properly function any more. If you actually implemented the fix the next day as stated, then you can check if this was the problem by using a different Arduino. If that makes it work, then that was the problem.

Problem with powering the relay coils from the 5v pin is the coils draw about 75 mA each, 150 for 2, you may be OK if powering Arduino from computer USB (the relays picking up and dropping out can cause "dips" in the supply that may interfere with sensitive devicies, AND if powering with 9 or 12V through the barrel jack or VIN pin the Arduino's 5V regulator is already dropping 5 to 7 volts so an added 150 mA load (0.15A times 7V = 1.05 Watts) might cause the regulator to overheat and shut down, you can try, but be ready for that eventuality.

How do you power the Arduino?

Do you have a multimeter? Set it to measuring voltage and connect it to 5 V and GND on the Arduino. What does it say?

Verify that your relay works without using the output pin of the Arduino. Connect Vcc to 5 V and GND to GND on the Arduino. Connect the input of the relay directly to 5 V on the arduino. What happens? Do the voltage reading between 5 V and GND change?

The thing you write about the soldering is worrying. Test with your multimeter in continuity mode that all connections still work.

larsgregersen:
How do you power the Arduino?

Right now it's just powered by computer USB for testing.

larsgregersen:
Do you have a multimeter? Set it to measuring voltage and connect it to 5 V and GND on the Arduino. What does it say?

Verify that your relay works without using the output pin of the Arduino. Connect Vcc to 5 V and GND to GND on the Arduino. Connect the input of the relay directly to 5 V on the arduino. What happens? Do the voltage reading between 5 V and GND change?

I will do this after work tonight! I tested for continuity yesterday and everything seems right (though this is literally the first time I've used my meter for testing so I don't put too much faith in what seems right to me!).

Thank you everyone for your help! I guess it's time to look into powering the relay via an external source. I just get sad at the idea of adding yet another plug to this project. That puts the grand total of things that need to be plugged into the wall at 5.

ThreeNinjas:
I guess it's time to look into powering the relay via an external source. I just get sad at the idea of adding yet another plug to this project. That puts the grand total of things that need to be plugged into the wall at 5.

5!!! surely you jest? if all the external devices are 5VDC then a 5Vdc bus is the answer, one power supply connect the Ground to the Arduino gnd and connect VCC for each device to the 5VDC Pos (+) of your power supply. If you have multiple voltages required I would look at Buck or Boost convertors from a common power supply.

Unfortunately, for many people, if it's not "plug-n-play", it's beyond comprehension.

outsider:
Unfortunately, for many people, if it's not "plug-n-play", it's beyond comprehension.

This is extremely rude and exactly why it took me an entire year of messing around with arduinos before making posts on the forum. You have entirely validated my fears. Thank you.

1 Like