The 1 Channel Relay Module with Optocoupler (Manufacturer Part ID: SRD-05VDC-SL-C) is a versatile electronic component designed to control high-voltage devices using low-voltage signals. Manufactured by Songle, this module features an optocoupler for electrical isolation, ensuring safe operation by protecting the control circuit from high-voltage spikes or surges.
This relay module is widely used in home automation, industrial control systems, and DIY electronics projects. It is particularly popular for applications requiring the control of AC appliances, such as lights, fans, and motors, using microcontrollers like Arduino, Raspberry Pi, or other low-power control systems.
The module has two sets of pins: Control Pins and Relay Output Terminals.
Pin Name | Description |
---|---|
VCC | Connect to the 5V power supply of the control circuit. |
GND | Connect to the ground of the control circuit. |
IN | Control signal input. A LOW signal (0V) activates the relay. |
Terminal Name | Description |
---|---|
NO (Normally Open) | The load is disconnected when the relay is inactive. Closes when active. |
COM (Common) | Common terminal for the load connection. |
NC (Normally Closed) | The load is connected when the relay is inactive. Opens when active. |
Below is an example of how to control the relay module using an Arduino UNO:
// Define the relay control pin
const int relayPin = 7;
void setup() {
// Set the relay pin as an output
pinMode(relayPin, OUTPUT);
// Ensure the relay is off initially
digitalWrite(relayPin, HIGH); // HIGH = Relay off (low-level trigger)
}
void loop() {
// Turn the relay on (activate the load)
digitalWrite(relayPin, LOW); // LOW = Relay on
delay(5000); // Keep the relay on for 5 seconds
// Turn the relay off (deactivate the load)
digitalWrite(relayPin, HIGH); // HIGH = Relay off
delay(5000); // Keep the relay off for 5 seconds
}
Relay Not Activating:
Load Not Turning On/Off:
Microcontroller Resetting or Malfunctioning:
Relay Clicking but No Load Response:
Q1: Can I use this relay module with a 3.3V microcontroller?
A1: Yes, but you may need a level shifter or transistor to ensure the control signal is compatible with the relay's 5V logic.
Q2: Is the relay module safe for controlling AC appliances?
A2: Yes, as long as the load does not exceed the relay's maximum ratings (250V AC/10A). Always follow proper safety precautions when working with high voltage.
Q3: Can I control multiple relays with one microcontroller?
A3: Yes, you can control multiple relay modules by connecting each module's IN pin to a separate digital output pin on the microcontroller.
Q4: What is the purpose of the optocoupler?
A4: The optocoupler provides electrical isolation between the control circuit and the high-voltage load, protecting sensitive components from voltage spikes or surges.