

A relay module is an electronic device that allows a low-power signal to control a higher power circuit. It typically consists of one or more relays, which act as electrically operated switches. Relay modules are widely used in automation and control systems to manage devices such as motors, lights, fans, and other electrical equipment. They provide electrical isolation between the control circuit and the high-power circuit, ensuring safety and reliability.








Below is the pin configuration for a typical 1-channel relay module:
| Pin Name | Description |
|---|---|
| VCC | Power supply pin (5V DC) |
| GND | Ground connection |
| IN | Control signal input (connect to microcontroller GPIO pin) |
| COM | Common terminal of the relay switch |
| NO | Normally Open terminal (connected to COM when the relay is activated) |
| NC | Normally Closed terminal (connected to COM when the relay is not activated) |
For multi-channel relay modules, the pin configuration is similar, with additional IN pins for each relay channel (e.g., IN1, IN2, etc.).
VCC pin to a 5V power source and the GND pin to ground.IN pin to a GPIO pin of a microcontroller (e.g., Arduino). Ensure the control signal voltage matches the relay module's trigger voltage.COM and NO terminals if you want the device to turn ON when the relay is activated.COM and NC terminals if you want the device to turn OFF when the relay is activated.Below is an example of how to control a relay module using an Arduino UNO:
// Define the pin connected to the relay module's IN pin
const int relayPin = 7;
void setup() {
// Set the relay pin as an output
pinMode(relayPin, OUTPUT);
// Ensure the relay is OFF at startup
digitalWrite(relayPin, LOW);
}
void loop() {
// Turn the relay ON
digitalWrite(relayPin, HIGH);
delay(5000); // Keep the relay ON for 5 seconds
// Turn the relay OFF
digitalWrite(relayPin, LOW);
delay(5000); // Keep the relay OFF for 5 seconds
}
Note: Replace relayPin with the GPIO pin number you are using to control the relay.
Relay Not Activating:
Erratic Behavior:
Relay Stuck in ON/OFF State:
LED Indicator Not Working:
Q: Can I use a 3.3V microcontroller with a 5V relay module?
A: Yes, if the relay module supports a 3.3V trigger voltage. Otherwise, use a level shifter or transistor circuit.
Q: Can I control AC appliances with a relay module?
A: Yes, ensure the appliance's voltage and current ratings are within the relay's specifications.
Q: Why is the relay clicking but not controlling the load?
A: Check the wiring of the load to the relay's COM, NO, and NC terminals. Ensure proper connections.
Q: Can I use the relay module to control multiple devices?
A: Yes, but only if the total current does not exceed the relay's maximum rating. Use a multi-channel relay module for independent control of multiple devices.