Introduction: Getting Started With Relays

Picture of Getting Started With Relays

This instructable will make you familiar with Relay and its working using a simple circuit.

Step 1: What Is a Relay?

Picture of What Is a Relay?

A relay is an electrically operated switch. It is mainly used to control higher voltage circuits with lower voltage. The 'control' and 'controlled' circuits are electrically isolated from each other.
Since relays are switches, the terminology applied to switches is also applied to relays; a relay switches one or more poles, each of whose contacts can be thrown by energizing the coil.

1) Normally-Open(NO) : The circuit is disconnected i.e. open when the relay is inactive.

2) Normally-Closed(NC) : The circuit is connected i.e. closed when the relay is inactive.

Step 2: Things You Need

Picture of Things You Need

Things needed to make a simple relay circuit:-

1) Two LEDs (in this case, white) to demonstrate NO and NC.

2) NPN Transistor

3) Diode (Any value will do)

4) Resistors:- 1k for transistor base and 220 ohm for LEDs. The value depends on LED colour.

Few other things are:-
1) breadboard
2) wires

Step 3: Circuit Diagram

Picture of Circuit Diagram

Most of the relays work on 12V DC power supply. Here, a transistor controls the 12V supply which goes to the Relay.

As mentioned before, there is no actual need for transistor if you want to simply control the output by manually turning the 12V supply ON or OFF.

The transistor comes into picture if you want to control the circuit automatically using microcontrollers (like Arduino). To do so, just replace the 5V power supply with "output" of microcontroller.

NOTE:- Make sure that you connect the GND of both the power supplies together.

The diode is used to avoid any damage to the transistor.

NOTE: Add a switch between the base and 5V power supply.

Step 4: Identify NC, NO & C

Most of the relays have the abbreviations (NO, NC, C) printed near the leads. If its not, follow these simple steps to identify them:-

1) C (common) can be easily recognised as it is placed in the middle of any one of the side of a relay.

2) Coil terminal lies besides the Common terminal.

3) Once you have figured out which one is common then NC and NO can be identified using continuity tester from multimeter.
Connect one probe of multimeter to common(C) and other to any one of the two leads on the opposite side. The one which gives continuity is Normally Closed(NC) and so the other is obviously Normally Open(NO).

NOTE:- Make sure that the relay is not connected to 12V supply i.e. inactive

Step 5: Connections

Picture of Connections

Please note that Arduino is only used as a 5V power supply.

Make sure you follow these important steps:-

-The GND of both the power supplies are connected together.

-The diode is connected properly with correct polarity to avoid damage to transistor. (I burnt a transistor because of neglecting the polarity :P )

-Connect the base of the transistor to +5V via 1K resistor and a switch, Emitter to GND and Collector to one of the Coil terminals

- +12V is connected directly to other coil terminal and not on the breadboard power rails.

Step 6: Working

Picture of Working

In the first picture, the switch is open and so the relay is inactive. And so the LED connected to NC is light up.

In the second picture when the switch is closed, the relay gets activated thereby pulling a switch inside it which then gets connected to NO.
The LED at NC turns OFF while the LED at NO turns ON.

Step 7: Some Other Ideas!

-Control relay using Arduino or any other microcontroller.

-Control high voltage electrical appliances. (Make sure that you don't exceed the current limit.)

-Home automation using relay boards to power up lights, fans and much more.

Thank you for reading this instructable. Hope you have enjoyed it and learnt the basics of relay.

If there is any mistake in the instructable, let us know in the "Comments" section below with your relay project and many more awesome ideas. Those will be updated in our instructable.

Comments

tabampusheng (author)2015-06-23

Must I use microcontroller even when I want my relay switch to turn ON only if a small current is flowing to it and it switches OFF when there is no more little current?

The microcontroller can be used here if the current is being brought from another circuit.Using it as a power source would be a waste.

BradG9 (author)2016-09-29

You might want to add a limiting resistor to the coil. It can improve life of the relay and makes sure not to overdrive the coil. Check out http://www.breakoutbros.com/tutorial-for-controlling-your-lights-with-arduino-and-a-relay/ for some instruction on how to properly size the resistor.

Ninjacat1 (author)2016-07-12

if i where to press the switch what would make the LED turn on? no or nc?

tahirhasanjafri (author)2015-02-15

What do you mean by inactive?

It probably means that there is no power going to the coil of the relay.

vokus (author)2014-11-22

How it suppouse to work if you place 5v and 12 on the coil - you should place 5V from arduino and gnd on the coil and 12V on the common. Thanks to this instruction i have burnt my arduino, so thank you very much...

Raphango (author)2014-10-08

Thanks!

The 5V battery in your circuit diagram is inverted. The "bigger" dash of the battery should be the positive side. I spend a little time trying to make it work, but I've finally did!

Gula (author)2014-05-21

Could you use this to turn a motor on and off in both directions via remote control?

Poppy Ann (author)2014-02-27
  1. where is the switch in the circuit diagram?

2. why would anyone want to use a switch on 5 volt to operate a transistor switching 12 volt to a relay switching 5 volt to operate 2 LEDs when all you would need is a double throw single pole switch to do the same removing the cost of relay,transistor and 12 volt supply.

GitarGr8 (author)Poppy Ann2014-02-27

The switch should be in line with the resistor on the collector leg of the transistor. I think the point of this circuit is just a proof of concept. You could just use as switch, as you said, but you can't control a switch with a micro controller.

Probably the main reason to use a relay is so that you can control a much larger load with a smaller voltage current. Want to turn on a 110V lamp or 220V motor with a +5 or +3 volt singnal? Use a relay. Since relays are electromechanical devices, they are not suitable for PWM style outputs.

Garbagepit (author)2014-02-26

Small suggestion if you care to take it; It might be interesting to mention the ability to reverse connections with a DPDT relay.

See "mousey the junkbot" as an example via MakeZine at:

http://cdn.makezine.com/make/mousey.pdf

I was first made aware of this technique from the book "JunkBots, Bugbots, and Bots on Wheels: Building Simple Robots with BEAM Technology" when the book first came out. I highly recommend it to anybody who hasn't read it already.

billbillt (author)2014-02-26

thanks for this...

thormj (author)2014-02-26

And, FWIW, a completely stupid product:

Relay In a Box (RIB) -- it's just a relay, mounted in a conduit fitting with leads so you can wire nut it in place. It costs a few bucks more than a "plain relay," but its form factor enables installers to make up the cost (and then quite a bit more) by lowering the install time. You can innovate with anything.

mwm2929 (author)2014-02-18

I noticed the schematic diagram doesn't show the 220 ohm resistors for the LED's, but anyone who has used LED's before should know where they go. There should be a dot indicating connection at the ground junction.

ElectroFrank (author)mwm29292014-02-25

One appropriate resistor anywhere in the common line will be adequate for the two LEDs.

The diagram needs to show this resistor as some readers may be new to electronics.

mwm2929 (author)2014-02-18

Excellent instructable.

About This Instructable

117,417views

391favorites

License:

Bio: IndoorGeeks is a group of electronics lovers!
More by IndoorGeeks:Getting Started With Relays
Add instructable to: