Relay NO not working


I am working with some 5V relays at the moment and for some reason, the Normally open terminal is not working for some reason. I have the positive side of the power supply connected to CO, and another wire going from NO to the positive wire of a pump I want to run. The pump runs when connected to the NC terminal, so it isn't a power issue, I just can't get the NO side to close to run the circuit.

This is my code

void setup() {
  // put your setup code here, to run once:
  pinMode(5, OUTPUT);

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(5,HIGH);// turn relay ON
  delay(3000);// keep it ON for 3 seconds

  digitalWrite(5, LOW);// turn relay OFF
 delay(5000);// keep it OFF for 5 seconds

Relay link -

Post a schematic of how the relay is wired. Show how the relay coil is powered.

Something close to this, just with a pump instead of an LED strip.

I suspect the contacts are welded (NC-COM).

  • Tap the relay housing with the handle of a screwdriver (or similar) to free-up the contacts.
  • Install a flyback diode across the 12VDC motor (1N4004 or similar).
  • digitalWrite(5, HIGH); // turn relay OFF
  • digitalWrite(5, LOW); // turn relay ON

1 Like

I just have a question, is the positive terminal of the power supply connected to COM or the negative terminal, or does it not matter?

Cause I've seen both and I have no idea if it matters or not?

Hello vinvenkat
Post a picture of the relay too.
Have a nice day and enjoy coding in C++.

It doesn't matter - the relay contacts can switch 12V to the motor (high side) or the relay contacts can switch the motor to GND (low side). It also doesn't matter which connection goes to NO or COM terminal. However, what does matter is that a flyback diode is added to the motor.

Relay logic is often inverted HIGH is OFF, LOW is ON. Is the relay onboard status LED blinking? Yes? Problem is relay. No? Problem is connection to relay.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.