## Sunday, January 5, 2014

### Relay - How it works

Welcome back everyone. It's been a long time haven't written anything. I will still blame my laziness not me! So anyway I guess many of you folks already know how it works still this post might help you a bit.

Let's assume you have to control a main line driven lamp or fan or maybe any other thing. And your controller is driven by USB power or maybe 12 volts, in this case you have to isolate the high voltage side from the low voltage side, you have to use something that at the same time runs from lower voltage but can control stuff on very high voltage that might be detrimental to the controller. In such scenario we will use Relay.

Relay - What is this?

So, basically Relay is an electrical switch,it has two sides, one, where you will supply a certain amount of DC voltage for activating the electromagnet, the other side is a spring based switch, you can use AC/DC on the other side, no problem as long as you don't cross the limit(marked on its body). So, using the electromagnet switch turns on, and as soon as the power on the first side cuts off electromagnet turns off and with the help of spring switch goes back to previous position.

This is how a relay looks like, it usually has 5 pins. Let's talk about the ratings first. As you can see it has a few lines written on it.

In the lower line the 5VDC means you have to provide 5 volts of DC supply to activate the electromagnet that means the switch runs from 5V.

On the other side, you can use a load of maximum 10A on 250VAC or 30V DC.

Going beyond these might cause permanent damage to this certain relay.

So, let's see the the diagram.

First let's talk about the 5 pins of it.

Two of them will be the dc input for electromagnet. (as you can see from left side of the diagrams)

The other three pins can be used for switching, they are

1. NC - Normally Connected
2. C- Common
3. NO - Normally Open

Normal condition means power supply off condition. Common pole is the movable pole. When power supply is turned off NC and C is connected. As soon as the power supply is on and electromagnet is on, magnetized I mean, the common pole touches the Normally open pole. And if the power across electromagnet fails, electromagnet goes to neutral thus the common pole goes to Normally connected pole again with the help of a spring.

Why is the diode?

Relays have inductive nature, so when power fails across it, it generates a voltage spike, that might damage any other sensitive devices connected to it. So, a diode is used to bypass that voltage through the diode thus saving other components.

Photo taken from the book Electronic Devices and Circuit theorem by Boylestad & Nashelsky.

Relay Noise :

If you connect the relay with a unregulated power supply it might create humming noise. You have to use regulated power supply for this.

This is the basic of how Relays work.