OC
OceanRemote
Low-code IoT platform
Back to Troubleshooting Hub

Relay Stuck OFF

Your relay refuses to turn ON even when the dashboard shows it should be activated. The connected device stays powered off. This guide covers control signal problems, power supply issues, faulty transistors, wiring errors, and logic configuration problems.

Last updated: April 22, 2026 | 10 min read

Symptoms

  • Dashboard shows relay ON but device remains OFF
  • No audible click from relay when toggling
  • Relay LED indicator stays OFF or very dim
  • Multimeter shows 0V on load side when relay should be ON
  • Relay worked before but stopped working
  • Other relays on same module work fine
  • Relay clicks but no power passes through to load

Common Causes

  1. Wrong Relay Logic Dashboard configured for Positive Logic but module needs Negative Logic
  2. Faulty Control Transistor Driving transistor on relay module failed open
  3. Missing VCC to Relay Module 5V power not connected to relay VCC pin
  4. Incorrect GPIO Pin Assignment Dashboard configured for wrong pin
  5. Damaged GPIO Pin on ESP32/ESP8266 Microcontroller pin burned out from overcurrent
  6. Loose or Broken Signal Wire Jumper wire between ESP and relay module not making contact
  7. Relay Coil Burned Out Coil overheated from prolonged activation or overvoltage
  8. Optocoupler Failure Isolator on relay module failed, preventing signal from reaching transistor

Relay Logic Types

Logic Type GPIO HIGH GPIO LOW Most Common
Positive Logic Relay ON (click) Relay OFF Less common
Negative Logic Relay OFF Relay ON (click) Most common

90% of cheap 5V relay modules use Negative Logic .

Default GPIO Pin Mapping by Board

Relay ESP32 ESP8266 D1 Mini Pico W
Relay 1 GPIO2 GPIO5 GPIO11
Relay 2 GPIO4 GPIO4 GPIO12
Relay 3 GPIO5 GPIO0 GPIO13
Relay 4 GPIO12 GPIO2 GPIO14
Relay 5 GPIO13 GPIO14 GPIO15

Verify your firmware matches these pin assignments.

Step-by-Step Fixes

1. Check Relay Logic Configuration

Most common fix wrong logic setting:

  • Log into OceanRemote dashboard
  • Go to Device Details page
  • Look for relay logic setting
  • If relay won't turn ON, try switching from Positive to Negative
  • Save changes and test relay again
  • You should hear a click immediately
// In firmware, logic is applied in setRelay() function:
void setRelay {
  // Positive Logic 
  // digitalWrite;
  
  // Negative Logic 
  // digitalWrite;
  
  // OceanRemote firmware handles this automatically based on dashboard setting
}

2. Test GPIO Pin Directly

Bypass relay module to test if ESP pin is working:

// Add this test code to your sketch
void testGPIO() {
  int relayPin = 2;  // Change to your relay pin
  
  pinMode;
  
  Serial.println;
  
  digitalWrite;
  Serial.println");
  delay;
  
  digitalWrite;
  Serial.println");
  delay;
  
  Serial.println;
}

// Use multimeter to measure voltage at ESP32/ESP8266 pin
// If voltage changes correctly , ESP pin is working

3. Verify Relay Module Power

Relay modules need 5V power 3.3V is NOT enough:

  • Measure voltage between relay VCC and GND pins
  • Should read 4.75V - 5.2V
  • If voltage is 3.3V, you connected to wrong pin
  • Connect relay VCC to ESP32/ESP8266 5V pin
  • For Pico W, use VBUS pin
  • For high power, use external 5V power supply
// Correct wiring for 5V relay module:
// Relay VCC  ESP32 5V pin 
// Relay GND  ESP32 GND
// Relay IN  ESP32 GPIO pin

//  WRONG: VCC to 3.3V 
//  CORRECT: VCC to 5V

4. Test Relay Module in Isolation

Remove ESP from circuit to test relay alone:

  • Disconnect IN wire from ESP32
  • Connect relay VCC to 5V, GND to GND
  • For Negative Logic: Touch IN pin to GND Relay should click ON
  • For Positive Logic: Touch IN pin to 5V Relay should click ON
  • If relay clicks, module is good
  • If relay doesn't click, module is faulty

5. Check for Cold Solder Joints

Poor solder connections on relay module:

  • Inspect relay module PCB for cracked or dull solder joints
  • Pay special attention to IN pin, VCC pin, and transistor legs
  • Use magnifying glass to see fine cracks
  • Re-solder any suspicious joints with soldering iron
  • Add fresh solder to all relay pins as preventative maintenance

6. Test with Different GPIO Pin

ESP pin may be damaged try alternative pin:

  • In OceanRemote dashboard, regenerate firmware
  • Change relay pin assignment in configuration
  • Use known good pin
  • Flash new firmware and test relay on new pin
  • If relay works, original pin is damaged

7. Replace Faulty Relay Module

If all tests pass but relay still stuck OFF:

  • Purchase replacement 5V relay module
  • Common brands: Songle, SainSmart, HiLetgo, Omron
  • Ensure same logic type
  • Disconnect power, remove old module
  • Connect new module with same wiring
  • Test relay operation should work immediately

Relay Coil Diagnostics

Measurement Good Relay Faulty Relay Action
Coil Resistance 50-150 Open circuit () or short Replace relay module
Contact Resistance <0.5 when activated High resistance or open Contacts worn, replace relay
Contact Resistance <0.5 when deactivated High resistance or open Contacts dirty, replace relay
Optocoupler LED forward voltage ~1.2V Open or short circuit Replace relay module

Prevention Tips

  • Always verify relay logic before first use
  • Use quality jumper wires cheap wires break internally
  • Add flyback diode across inductive loads to protect relay contacts
  • Keep relay module away from heat sources
  • Use optocoupler-isolated relay modules for better protection
  • Document your wiring and logic settings for each device
  • Test new relay modules with simple blink sketch before final installation

Related Issues

Frequently Asked Questions

Q: My relay clicks but the LED indicator is dim. What's wrong?

A: Dim LED indicates insufficient voltage or current to the relay coil. Measure VCC should be 5V. If VCC is correct, the transistor or optocoupler may be failing. Replace the relay module.

Q: Can I use 3.3V to power a 5V relay module?

A: No. 5V relay modules require 5V for the coil. 3.3V is insufficient the relay may click weakly or not at all. Some modules work at 3.7-4.5V, but 5V is required for reliable operation. Use ESP32's 5V pin or external 5V supply.

Q: One relay works but another on the same module doesn't. Why?

A: Individual channel failure. The transistor driving that specific relay channel may be burned out, or the GPIO pin from ESP is damaged. Test the GPIO pin with LED first. If pin works, replace the relay module.

Still having issues? Contact Support or return to the Troubleshooting Hub.