A 5V relay is an electromechanical switch that allows a low-power control signal to operate a high-power circuit. It provides electrical isolation between the control circuit (e.g., a microcontroller) and the load circuit, ensuring safety and reliability. The relay is commonly used in applications where a microcontroller or other low-power device needs to control high-power devices such as motors, lights, or appliances.
Below are the key technical details for a standard 5V relay:
Parameter | Value |
---|---|
Operating Voltage | 5V DC |
Trigger Current | ~70-100 mA |
Contact Type | SPDT (Single Pole Double Throw) |
Maximum Load Voltage | 250V AC / 30V DC |
Maximum Load Current | 10A |
Coil Resistance | ~70Ω |
Electrical Isolation | Yes (via electromagnetic coil) |
Switching Time | ~10 ms (operate) / ~5 ms (release) |
Dimensions | Varies (e.g., 28mm x 10mm x 15mm) |
The 5V relay typically has 5 pins. Below is the pinout and description:
Pin Name | Description |
---|---|
VCC | Connects to the 5V power supply to energize the relay coil. |
GND | Ground connection for the relay coil. |
IN | Control signal input (low-power signal from a microcontroller or other source). |
COM | Common terminal for the load circuit. |
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. |
Below is an example of how to control a 5V relay using an Arduino UNO:
// Example: Controlling a 5V relay with Arduino UNO
// Pin 7 is used to control the relay
const int relayPin = 7; // Define the pin connected to the relay's IN pin
void setup() {
pinMode(relayPin, OUTPUT); // Set the relay pin as an output
digitalWrite(relayPin, LOW); // Ensure the relay is off at startup
}
void loop() {
digitalWrite(relayPin, HIGH); // Turn the relay on
delay(1000); // Keep the relay on for 1 second
digitalWrite(relayPin, LOW); // Turn the relay off
delay(1000); // Keep the relay off for 1 second
}
Relay Not Activating
Load Not Switching
Microcontroller Resetting When Relay Activates
Relay Making Noise
Q: Can I use a 5V relay to control a 220V AC appliance?
A: Yes, as long as the appliance's current and voltage are within the relay's maximum load ratings (e.g., 250V AC, 10A).
Q: Do I need a separate power supply for the relay?
A: Not necessarily. If your microcontroller's power supply can provide sufficient current, you can use it to power the relay. Otherwise, use a separate 5V power source.
Q: What is the purpose of the flyback diode?
A: The flyback diode protects the control circuit from voltage spikes generated when the relay coil is de-energized.
Q: Can I use the relay with a 3.3V microcontroller?
A: A 5V relay typically requires a 5V control signal. Use a transistor or relay driver module to interface a 3.3V microcontroller with the relay.