Relay Tutorial

31 Mar

Of the many components I have encountered, I can say that RELAYs were the most exciting, breathtaking, and fun experience. If you are now in the stage of learning this component I would like to advice that you must be extra careful because in this component, you are dealing with your main outlet supply, that is, the 220v source.

A relay works the same as the transistors do. By using a smaller current, you control a larger current. Transistors control low currents(usually in milliamps) and is usually in DC. Relays on the other hand, can control currents in the AC range by using DC. By control I mean switching it ON and OFF.

One type of example I have here is my Electronic Card Key Switch project. You can click the link for you to see what it looks like. The schematic, where the relay is placed is shown on that page also. By that example, we can notice that we were able to control an AC bulb by using a DC voltage from the LDR.

That’s how Relays come to work.


So, how to use a relay?



Here is how we view it to be simple. If a voltage is present on the control pins of the relay, then the relay is turned on. The AC switch is now moved to the other and completes the AC loop – therefore turning on any device.

Step 1: First step you should do is to know how much power your load is consuming. The AC lamp on the card switch is rated 20 Watts. How much power does your load require?


Step 2: Know the capacity of the relay. Examine the RELAY’s specification. For example in the picture below, the RELAY is rated 2.4kW – multiply the current and the voltage then you get the P for POWER. In this case, P = V x I = 240v x 10A = 2400W, that’s the amount of power the relay can handle. The other specs like shows the same. It may vary if you are controlling DC like the one stated on the bottom.


Step 3: Pins. Basic RELAYs are in SPDT type. SPDT or Single-Pole Double-Throw is a kind of switch that has two ends —> . There are also SPST (Single-Pole Single-Throw) or DPDT (Double-Throw Double-Throw) types of relay.


An SPDT Relay consists of 5 pins: 2 pins for CONTROL and 3 Pins for the SWITCHING. A diagram is shown below illustrating the NO (Normally Opened) Switch or NC (Normally Closed) Switch.

When the RELAY is turned on, the NC pin Opens and the NO pin Closes. So if you want to turn on the bulb with the presence of a control voltage, then connect it to the NO terminal. If you want to turn off the bulb when the control voltage is present, then connect it to the NC terminal. Easy!

Below is a picture on connecting the relay to the NO terminal meaning the bulb turns on if control voltage is present.


Note: Not all relays ‘ NC and NO terminals are located as shown above, I suggest you should test its continuity first – if it’s connected without the presence of control voltage, then its NC. Very Easy!

Step 4: Know the control voltage. Know the control voltage of your relay. If the specs shows a 6V then your VCC must be equal to 6 volts, may be higher or lower, but not too much. Same concept goes for 12V, 24V and so on.

Step 5: Use a transistor. If you are controlling the relay using low voltages, use a transistor. For example, connecting the pin of a microcontroller to a relay of 12V control voltage won’t do anything to the relay, because the microcontroller’s logic high output is only 5 volts. In cases like these, use a transistor.



Below is a simple driver circuit from a microcontroller to relay using transistor.

The following values must be determined: Icollector, Ibase, Rbase.


The steps on determining these values are exactly the same to the steps on determining the DC Motor Driver Circuit. Kindly view the topic by simply clicking the link.

Note: Never forget the flywheel diode, it protects your transistor from back emfs the relay draws. Also, the Control Pins doesn’t have any polarity, you can jolt them any position you want.

Once you have it all solved and connected then I guess you are ready to turn it on. Just be very careful to not SHORT the AC Lines because I tell you… BOOM!


During my first try on using a relay I was drowned with nervousness and excitement because it was honestly my first time messing up with 220 volts! But then when the 220v fluorescent bulb turned on, I felt completely fulfilled and satisfied. I know for sure you will feel the same way too. Goodluck and have fun 🙂


Posted by on March 31, 2011 in Tutorials


Tags: , , , , ,

2 responses to “Relay Tutorial

  1. k3ndro

    July 10, 2011 at 7:18 pm

    Relays doesn’t have polarities!!

  2. vipul

    October 27, 2012 at 4:19 pm

    sir, please tell that, how i do connect VCC & GD


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: