LED Flasher Using Relay

Relay is one of the most interesting electronic component. Since it electro-mechanical in nature, you can actually hear it when it is operated which makes it more easy to understand. Since I have just started my journey in making circuits, I have started with exploring the world of relay. First circuit is the most basic and simple one which is LED flasher or blinking LED.
Supplies


Components Used:
- 5V Relay
- I have used 100uF Capacitor but you can use 470uF to get visible blinking.
- 1N4007 Diode
- 1k Resistor
- LED
- Jumper Wires
Tools:
- Multimeter
- Wire Stripper
- 5V Adapter
Exploring the Relay


I am using a Single Pole Double Throw (SPDT) Relay which has 2 terminals for the coil, 1 common pin for the SPDT switch, 1 pin connected to normally closed (NC) switch and the other to normally open (NO) switch. The normally closed switch is connected to the common in normal state or when there is no supply present at the coil. So this part is the closed switch at ideal state. The basic working of relay is that when current flow happens through the coil, it acts as an electromagnet and attracts the metal inside closing the normally open switch and opening the normally closed switch. Another interesting fact is that the coil inside the relay is basically just a copper wire wound in a spiral manner which acts as the electromagnet when current passes through it.
To figure out the pins of the relay without the datasheet, you can do a continuity test or check the resistance between the pins using the multimeter. First, using the resistance check you can identify the coil terminals which will have some low resistance. Since the NC pin is connected to the common pin normally, it will have almost negligible resistance. and the NO pin will be open circuit so infinite resistance. Thus, when you check the resistance between two pins and it gives some value in few Ohms, those pins will be the coil terminals. In our case, the resistance was 73 Ohms. After this if you check the continuity between the remaining pins, the pins that give some continuity will have one side NC and other side common. The remaining pin would be the NO pin. It is not possible to distinguish between NC and common without giving supply. So to understand that, give some power to the coil and check the continuity with the normally open pin. The pin that gives the continuity is the common pin and the other one would be the NC pins.
Circuit Diagram

The circuit diagram is as shown above. The LED is connected between ground and normally closed terminal. A resistor is used in series with LED to limit the current flow through the LED. A 100uF capacitor is placed in parallel to the coil terminals to reduce the blinking frequency, basically slowing down the blinking so that we can observe it. The capacitor will also charge up when the supply is given and stores this charge. When supply is cut, it will start discharging through the inductor and thus keeping the current flowing through the coil for some time. This reduces the speed of changing the switch position. When the supply is cut and the capacitor has discharged, the coil which is an inductor will give out the stored current reversing the voltage polarity. The capacitor being electrolytic will also reverse his polarity and thus can burn out. To avoid this, we can place a diode anti-parallel to the capacitor which will take this current when the supply is cut. The negative of the capacitor and one terminal of the coil is connected to ground. The common terminal is connected to 5V supply. The remaining coil terminal is connected to the NC terminal.
This circuit works such that when you give the supply the LED turns on. The electromagnetic field also generates, moving the switch to NO position switching off the LED and the supply. Since the supply is cut, the switch returns back to the NC condition, turning on the LED and the supply. Thus in this case off time of the LED is more than the on time. If you connect the LED to the NO terminal, the on time will increase.
Connections: LED and Resistor

Let's start making the connections. I have avoided the use of soldering (as it is tedious to disconnect the circuit after use) and breadboard connections (since I wanted to make it small and portable). Here I am making the connections by just twisting the legs of the components and wires. It is not perfect since I am still learning it.
Lets first start with external connections before connecting to relay. Connect the LED with the resistor as shown above. Any terminal of the LED can be connected to the resistor but care should be taken when connecting it to the relay.
Connections: Capacitor and Diode

Connect the capacitor and diode in parallel by twisting the legs. The negative of the diode should be connected to the positive of the capacitor and the positive to the negative of the capacitor.
Connections: LED With Relay

Connect the LED and resistor between the coil terminal (which will be connected to ground) and the NC terminal. Here I have connected resistor to the positive of the LED and thus, I am connecting resistor to the NC terminal and negative of the LED to the terminal which will connect to ground.
Connections: Capacitor and Relay

Since it was my first time twisting, I was unable to directly connect the capacitor to the relay terminals. Thus I have used an external wire for the same. The negative of the capacitor should be connected to terminal of the coil which will go to ground (the same place where we connected the LED negative in previous step). The positive terminal will connect to other end of the coil which is shorted with the NC terminal.
Connections: Power Supply

Connect the positive of the supply to the common terminal and the negative to one of the coil terminal where you have connected the negative of LED and capacitor. That's it the circuit is ready!
Final Working


Turn on the supply to see the flashing. After running, the LED flashing was not visible, which means the flashing was taking place at a very high frequency which our eye cannot capture. Which means the capacitance value is not enough to slow down the LED, thus we added 220uF in parallel to this capacitor which slowed down the blinking, hence making it distinguishable. Thus, increasing the capacitance value will reduce the frequency. So you can use a capacitor value of 470uF for visible blinking.
The video below shows the working. The relay opening and closing sound can also be heard! The actual speed of the LED blinking is more than what you can see here. It looks slowed down because of the frame rate of the video captured, however you can estimate the speed of the blinking by hearing the relay sound.