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.
Explore Projects Built with relay_5V
Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
This circuit uses an Arduino UNO to control a 5V relay. The relay is powered by the Arduino's Vin and GND pins, and its control input is connected to digital pin D9 on the Arduino. The provided code is a basic template with no specific functionality implemented.
This circuit uses a pushbutton to control a 5V relay, which in turn powers a red LED. The MAHIR 1.mini module provides the necessary 3.7V power supply, and the relay switches the LED on and off based on the pushbutton input.
This circuit uses a WeMos D1 R2 microcontroller to control a 5V 2-relay module, which in turn controls the power to an AC bulb and a cellphone charger. The microcontroller also interfaces with a line tracking sensor, which likely provides input to control the relay states. The AC bulb and cellphone charger are powered by an AC wire connection, with the relay acting as a switch for the bulb.
This circuit consists of a 5V battery powering a 4-channel relay module, which controls four LEDs (red, yellow, green, and blue) through individual resistors. Each relay channel is activated by a corresponding SPST toggle switch, allowing manual control of the LEDs.
Home automation systems (e.g., controlling lights or fans)
Industrial control systems
Motor control
Switching high-voltage AC or DC loads
Electrical isolation in sensitive circuits
Technical Specifications
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)
Pin Configuration and Descriptions
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.
Usage Instructions
How to Use the Relay in a Circuit
Power the Relay: Connect the VCC pin to a 5V DC power source and the GND pin to ground.
Control Signal: Connect the IN pin to a digital output pin of a microcontroller (e.g., Arduino UNO). Use a current-limiting resistor if necessary.
Load Circuit:
Connect the high-power load to the COM and NO pins if you want the load to be powered only when the relay is activated.
Alternatively, connect the load to the COM and NC pins if you want the load to be powered when the relay is not activated.
Isolation: Ensure proper electrical isolation between the control and load circuits to prevent damage to the control circuit.
Important Considerations and Best Practices
Flyback Diode: Always use a flyback diode across the relay coil to protect the control circuit from voltage spikes caused by the collapsing magnetic field when the relay is deactivated.
Power Supply: Ensure the power supply can provide sufficient current to energize the relay coil.
Load Ratings: Do not exceed the relay's maximum voltage and current ratings for the load.
Noise Suppression: Use snubber circuits or capacitors to suppress electrical noise when switching inductive loads.
Example: Connecting a 5V Relay to an Arduino UNO
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
}
Troubleshooting and FAQs
Common Issues and Solutions
Relay Not Activating
Cause: Insufficient current from the control circuit.
Solution: Ensure the control circuit can supply at least 70-100 mA. Use a transistor or relay driver module if necessary.
Load Not Switching
Cause: Incorrect wiring of the load circuit.
Solution: Verify the connections to the COM, NO, and NC pins. Ensure the load is within the relay's voltage and current ratings.
Microcontroller Resetting When Relay Activates
Cause: Voltage spikes or insufficient power supply.
Solution: Add a flyback diode across the relay coil and ensure the power supply can handle the relay's current draw.
Relay Making Noise
Cause: Rapid switching or unstable control signal.
Solution: Check the control signal for stability. Avoid rapid switching of the relay.
FAQs
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.