

A relay is an electromechanical switch that allows a low voltage signal to control a high voltage or high current circuit. The 8-pin relay is a versatile component commonly used in automation, home appliances, automotive systems, and industrial control applications. It operates by energizing a coil to open or close its internal contacts, enabling the control of devices such as motors, lights, and heaters.








Below are the key technical details for a standard 8-pin relay:
| Parameter | Value |
|---|---|
| Coil Voltage | 5V, 12V, or 24V (depending on model) |
| Contact Configuration | SPDT (Single Pole Double Throw) or DPDT (Double Pole Double Throw) |
| Contact Rating | 10A at 250VAC or 30VDC |
| Coil Resistance | Varies by model (e.g., 70Ω for 5V relay) |
| Switching Time | 5ms to 15ms |
| Dielectric Strength | 1000VAC between coil and contacts |
| Operating Temperature | -40°C to 85°C |
| Dimensions | Varies (e.g., 28mm x 12mm x 15mm) |
The 8-pin relay typically has the following pinout:
| Pin Number | Name | Description |
|---|---|---|
| 1 | Coil (+) | Positive terminal of the relay coil. Connect to the control voltage. |
| 2 | Coil (-) | Negative terminal of the relay coil. Connect to ground. |
| 3 | Common (COM1) | Common terminal for the first set of contacts. |
| 4 | Normally Open (NO1) | Contact that remains open until the relay is energized. |
| 5 | Normally Closed (NC1) | Contact that remains closed until the relay is energized. |
| 6 | Common (COM2) | Common terminal for the second set of contacts (for DPDT relays). |
| 7 | Normally Open (NO2) | Contact that remains open until the relay is energized (for DPDT relays). |
| 8 | Normally Closed (NC2) | Contact that remains closed until the relay is energized (for DPDT relays). |
Note: For SPDT relays, only pins 3, 4, and 5 are used for the contacts.
Power the Coil:
Connect the Load:
Add a Flyback Diode:
Test the Circuit:
Below is an example of how to control a relay with an Arduino UNO:
// Define the relay control pin
const int relayPin = 7;
void setup() {
pinMode(relayPin, OUTPUT); // Set the relay pin as an output
digitalWrite(relayPin, LOW); // Ensure the relay is off initially
}
void loop() {
digitalWrite(relayPin, HIGH); // Turn the relay on
delay(1000); // Keep it on for 1 second
digitalWrite(relayPin, LOW); // Turn the relay off
delay(1000); // Keep it off for 1 second
}
Important Notes:
- Always check the relay's voltage and current ratings before connecting a load.
- Use an external power supply for the relay if the Arduino cannot provide sufficient current.
Relay Not Switching:
Load Not Turning On/Off:
Arduino Resets When Relay Activates:
Relay Buzzing or Chattering:
Q: Can I use the relay to switch AC loads?
A: Yes, the relay can switch AC loads, but ensure the load's voltage and current are within the relay's contact rating.
Q: Do I need a separate power supply for the relay?
A: It depends on the relay's coil voltage and the current requirements. If the microcontroller cannot provide sufficient current, use an external power supply.
Q: What is the purpose of the flyback diode?
A: The flyback diode protects the circuit from voltage spikes generated when the relay coil is de-energized.
Q: Can I use the relay with a Raspberry Pi?
A: Yes, but since the Raspberry Pi's GPIO pins cannot supply enough current, you must use a transistor or relay driver circuit.
By following this documentation, you can effectively integrate an 8-pin relay into your projects and troubleshoot common issues.