### Lesson Plan: Understanding and Utilizing the SRD-05VDC-SL-C Power Relay 5-Pin in Electronic Circuits
**Introduction**
In this lesson, we will explore the operational principles and practical applications of the SRD-05VDC-SL-C Power Relay. Relays are electromechanical switches used to control high-power devices with low-power signals. They play a critical role in various electronic applications, providing isolation between control circuits and high-power loads. By the end of this lesson, you will have a comprehensive understanding of its characteristics and how to incorporate it into your electronic projects.
Relays have been a fundamental component in electronics since their invention in the 19th century. They are crucial in applications where it is necessary to control a large amount of power with a minimal control signal. This capability makes them indispensable in automation, industrial control systems, automotive electronics, and home automation.
**Learning Objectives**
Upon completing this lesson, you will be able to:
1. Identify the physical characteristics of the SRD-05VDC-SL-C Power Relay.
2. Explain the function of a relay and its role in electronic circuits.
3. Implement the SRD-05VDC-SL-C Power Relay in various circuit configurations to control high-power devices using low-power signals.
**Materials Needed**
– SRD-05VDC-SL-C Power Relay (5-pin)
– Breadboard
– Jumper wires
– Raspberry Pi Pico WH
– LED
– 330-ohm resistor
– Diode (1N4007)
– Transistor (S8050 or similar)
– External power source (e.g., 9V battery)
– Multimeter (optional)
**Background Information**
The SRD-05VDC-SL-C is a 5V DC single-pole, double-throw (SPDT) power relay capable of switching high current and voltage loads. It has five pins: two for the coil, one common (COM), one normally open (NO), and one normally closed (NC). Relays are essential in applications where it is necessary to isolate low-power control circuits from high-power loads.
**Relay Characteristics**
The SRD-05VDC-SL-C Power Relay has five pins:
– **Coil Pins**: The two pins that connect to the control voltage, which energizes the coil and operates the relay.
– **COM (Common)**: The terminal that connects to either the NO or NC terminal depending on the relay state.
– **NO (Normally Open)**: The terminal that is connected to COM when the relay is energized.
– **NC (Normally Closed)**: The terminal that is connected to COM when the relay is not energized.
**Principles of Operation**
Relays operate by using an electromagnet to mechanically switch contacts between the NO and NC terminals. When a voltage is applied to the coil pins, it creates a magnetic field that attracts a movable armature, causing it to switch the connections between the common terminal and the normally open or normally closed terminals. Here’s a detailed look at how this works:
1. **Electromagnetism**: When a current flows through the coil of the relay, it generates a magnetic field. This phenomenon is governed by Ampere’s Law, which states that the magnetic field in the vicinity of an electric current is proportional to the current itself.
2. **Magnetic Attraction**: The magnetic field produced by the energized coil attracts the armature, a movable part of the relay connected to the switch contacts. The armature is typically spring-loaded, keeping the contacts in their default position (connected to the NC terminal) when the coil is not energized.
3. **Switching Action**: As the armature moves due to the magnetic attraction, it switches the connection from the NC terminal to the NO terminal. This change in connection allows the relay to control a high-power circuit with a low-power input.
4. **Isolation**: One of the key benefits of using a relay is the electrical isolation it provides. The coil circuit (low power) is electrically isolated from the contact circuit (high power). This isolation protects the sensitive control circuitry from high voltages and currents.
5. **De-energized State**: In the default state, without any current flowing through the coil, the COM terminal is connected to the NC terminal. This means the circuit connected to the NO terminal is open, and no current flows through it.
6. **Energized State**: When the coil is energized by applying the appropriate voltage (5V in this case), the armature is pulled by the magnetic field, switching the connection so that the COM terminal is now connected to the NO terminal. This completes the circuit connected to the NO terminal, allowing current to flow through it.
**Circuit Diagram and Setup**
**Step-by-Step Instructions**
1. **Identify the Relay Pins**:
– Locate the coil, COM, NO, and NC pins on the SRD-05VDC-SL-C Power Relay.
2. **Set Up the Breadboard Circuit**:
– Place the SRD-05VDC-SL-C Power Relay on the breadboard.
– Connect one coil pin to the collector of the transistor (e.g., S8050).
– Connect the other coil pin to the 5V pin on the Raspberry Pi Pico WH.
– Connect the emitter of the transistor to the ground (GND) pin on the Raspberry Pi Pico WH.
– Connect a GPIO pin (e.g., GP15) to the base of the transistor through a 1k ohm resistor.
– Place a diode (1N4007) across the relay coil with the cathode connected to the 5V side to protect against back EMF.
– Connect the COM terminal of the relay to one terminal of the external power source.
– Connect the NO terminal of the relay to the anode of the LED through a 330-ohm resistor.
– Connect the cathode of the LED to the ground.
3. **Write the Control Code**:
– Open your MicroPython IDE and write the following code to control the relay:
“`python
from machine import Pin
from time import sleep
relay = Pin(15, Pin.OUT)
while True:
relay.on() # Energize the relay
sleep(1)
relay.off() # De-energize the relay
sleep(1)
“`
4. **Upload and Test the Code**:
– Connect your Raspberry Pi Pico WH to your computer using a Micro USB cable.
– Upload the code to the Raspberry Pi Pico WH.
– Observe the LED turning on and off, indicating the relay switching between the NO and NC states.
5. **Optional: Measure Voltage and Current**:
– Use a multimeter to measure the voltage and current across the relay coil and the load. Ensure the relay operates correctly without exceeding its ratings.
**Applications and Extensions**
1. **High-Power Switching**:
– Use the SRD-05VDC-SL-C Power Relay to control high-power devices such as motors, lamps, and heaters from a low-power microcontroller like the Raspberry Pi Pico WH.
– Implement safety features to prevent damage to the control circuit from high-power loads.
2. **Isolation and Protection**:
– Integrate the relay into circuits where isolation between the control and power sections is crucial for safety and reliability.
– Experiment with different load types and switching configurations to understand relay operation better.
**Summary and Review**
This lesson has provided a detailed exploration of the SRD-05VDC-SL-C Power Relay, covering its identification, operational principles, and practical applications in electronic circuits. By understanding and utilizing relays, you can effectively control high-power devices using low-power signals, enhancing the functionality and safety of your electronic projects.