How to use a relay
A relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current can be on or off so relays have two switch positions and they are double throw (changeover) switches.
The relay’s switch connections are usually labeled COM(POLE), NC and NO:
COM/POLE= Common, NC and NO always connect to this, it is the moving part of the switch.
NC = Normally Closed, COM/POLE is connected to this when the relay coil is not magnetized.
NO = Normally Open, COM/POLE is connected to this when the relay coil is MAGNETIZED and vice versa.
A relay shown in the picture is an electromagnetic or mechanical relay.
Fig. Relay and its symbol
There are 5 Pins in a relay. Two pins A and B are two ends of a coil that are kept inside the relay. The coil is wound on a small rod that gets magnetized whenever current passes through it.
COM/POLE is always connected to NC(Normally connected) pin. As current is passed through the coil A, B, the pole gets connected to NO(Normally Open) pin of the relay.
Here is an example,
First of all try the following circuit.
This is a dark sensor circuit.
Fig. Dark sensor using two transistors
Components for this experiment are available at buildcircuit.net.
Output of this circuit: When you block light falling on LDR, the circuit switches on the LED- D1.
Now, replace LED-D1 and R2- 330R with a relay and diode.
Reconfigure the circuit as shown in the figure below:
Note: In R3, you can keep any resistor from 330R to 4.7K, this resistor is for sensitivity of the dark sensor.
The following circuit also works as a dark sensor. When you block light falling on LDR, the relay gets activated and Pole of relay gets connected to NO pin that eventually gives power to LED- D1.
Fig. Dark sensor using two transistors and a relay.
Light sensor using relay and transistors
In this case, the configuration of relay has been changed. Here, NO (Normally open) terminal has been left open. In normal case, the D1-LED remains ON. When light falling on LDR is interrupted, pole of relay gets connected to NO terminal. Hence, NC (Normally connected) terminal does not get power and that switches the D1- LED off.
Fig. Light sensor using two transistors and a relay.
Connect to COM(pole) and NO if you want the switched circuit to be on when the relay coil is on.
Connect to COM(pole) and NC if you want the switched circuit to be on when the relay coil is off.
You can buy all the components required for this experiment at buildcircuit.net.
WORKING WITH 220V
WARNING: IF YOU ARE A NOVICE DO NOT PLAY WITH 220V AC. CALL AN EXPERIENCED PERSON FOR ASSISTANCE.
Fig. Dark sensor circuit for 220V powered lights.
A relay can be used to turn on lights working on 220V, AC. The AC powered light has to be connected to relay as shown in the picture above.
Fig. Connecting wires on relay
The following video shows a soldered/finished prototype.
PROTECTION DIODE FOR RELAY
Fig. Protection diode in the circuit
Transistors and ICs must be protected from the brief high voltage produced when a relay coil is switched off. The diagram shows how a signal diode (eg 1N4148 or 1N4001 or 1N4007) is connected ‘backwards’ across the relay coil to provide this protection.
Current flowing through a relay coil creates a magnetic field which collapses suddenly when the current is switched off. The sudden collapse of the magnetic field induces a brief high voltage across the relay coil which is very likely to damage transistors and ICs. The protection diode allows the induced voltage to drive a brief current through the coil (and diode) so the magnetic field dies away quickly rather than instantly. This prevents the induced voltage becoming high enough to cause damage to transistors and ICs.
GENERAL SPECIFICATION OF A RELAY
06VDC- means that the voltage across the relay coil has to be 6V-DC.
50/60Hz- The relay can work under 50/60Hz AC.
7A, 240VAC- The maximum AC current and AC voltage specification that can be passed through NC, NO and pole pins/terminals of relay.
One more example (update 19.3.2014)
05VDC- It means that you need 5V to activate the relay. In other words, it means that the voltage across the relay coil has to be 5V-DC.
10A 250VAC 10A 125VAC – The maximum AC current and AC voltage specification that can be passed through NC, NO and pole pins/terminals of relay. Some countries have 220V AC power standard, so, it works in those countries also.
10A 30VDC 10A 28VDC- The maximum DC current and DC voltage specification that can be passed through NC, NO and pole pins/terminals of relay.
Tips:
– If you are using a 5-6V relay, use a 6V power supply.
– If you are using a 9V relay, use a 12V power supply.
Buy the components for all the experiments published on this page at buildcircuit.net.
Dear Sir,
We would like to know where can I buy this relay 6vdc to 240vac?
or
Could you provide me to get this relay?
I need 50 unit of this product.
many thanks,
Best regards,
Eg
I bought this relay 5 years ago, so I cannot remember from which seller did I buy. But, you can search on ebay.com for different kinds of relay. I am sure that you can find the needed one.
sir i would like to know , whats the maximum input current rating that we can give to the poles A &B of the relay?
how many hours it can serve continusoly if i used this to switch the bulbs?
how it depends on the input current reting?
will it depends on coil resistence??
Hi there!
I am loving the tutorials on this site they are so professionally prepared, thanks! In the case of the dark sensor + relay, is it OK to use 12v as the source voltage for the dark sensor portion? Also, a typical 5 pin relay marked “24v”, will it work on 12v?
Thanks
Hw much it cost ..
Hi,
Will this still work if you change the LDR for an Infrared Sensor? Also, i’m planning on using this for another project, turning on an LED Lamp (works on 3 AAA batteries), do i need to change anything else besides the LDR?
Please check this tutorial about using an infrared sensor: http://www.buildcircuit.com/remote-operated-switch/
and check this also: http://www.buildcircuit.com/basic-remote-tester/
Thank you very much for your response. Since this is my first project i would like to start with something less complicated. That’s why i was wondering if i replace the light sensor in this project with an infrared receiver would still work? I checked out the other project (Remote operated switch) but i’m having problems understanding the circuit diagram.
wrong circuit
u r brilliant
here was no need to amplify current.i dint know why you used the transistors then?
Hmm it seems like your blog ate my first comment (it was extremely long) so
I guess I’ll just sum it up what I submitted and say, I’m thoroughly
enjoying your blog. I as well am an aspiring blog writer but I’m still new to everything. Do you have any helpful hints for inexperienced blog writers? I’d certainly appreciate it.
Is it ok to use a 15-50 watts AC bulb in this circuit?
I was confused,but after getting the details of relay i’m happy.i have cleared my idea. Thank u.
Great thanks for this tutorial!
can I use 3 LDR (siri) at this digram.
that mean, whet any one LDR is dark, the lamp will “ON”.
how much voltage apply in relay
woo! this is seriously amazing sites. Thanks a lot sir, i am very thank full to you, may you live long , helping the other.
Thank you sir. It helped me a lot.
Get a clear idea about relay:-)… Thank u soo much…..sir!
@ADMIN we can make this circuit using 1 transistor also. y did u use 2.
I think he used two transistors because of the orientation of the LDR the way it forms a voltage divider with R3. Hope I’m not wrong but Q1 there is an inverter.
visit my blog about simple hobby electronics projects all detail available about any circuit try this this very useful about
http://www.electronicsirfan.blogspot.com
Thank you, I built the low-voltage dark-sensing circuit and it works fine. Now coupling with a solar charger for 6VDC SLA, to drive four LED spotlight.s
Very helpful circuits.
Stephen Gard
it is quite helpfull thanx sir
I bought one relay from ebay for my fans and till now its working and I am using this.
I learned here how to connect relay…
Lord Jesus with you!
thus, relay can also be used to trigger AC from DC
can a relay be used to separate ac from dc?
can a relay be also use to separate dc from ac?
I have assembled this circuit considering Relay option to activate bulb.However,as soon as I connect power,relay gets connected as “ON” and bulb gets lit.I do not get any control from LDR. What could be the reason?
Kindly suggest any troubleshooting option.
Thanks
Can we use BC548 instead of BC547 for the above circuit?
Yes, you can use BC548 or any other transistor. It works for all transistors.
What should be the voltage rating of relay for 6v or 9v dc supply dark sensor?
What should be the rating of relay for the dark sensor circuit with 6v or 9v dc source?
It should be 5V to 9V.
What is the eagle code for relay?
Do there is any requirement of circuit for realy for switching 230 v ac or can directly be used
I am using Din Rail Timer having relay voltage specifications : 5A @ 230V AC/ 24VDC / Resistive ….My question is can i give 70V DC as a coil voltage my current draw out will be not more than 1 A .
for 6v relay how much watt ac bulb is required???
plz tell me
I have a 12VDC fan with reversable polarity for pushing or pulling air, and I would like to use ( 2 ) lighted switches, one for each direction. My question is how do wire in the relay/s so both switches can’t be on at the same time ? the fan only draws 1/10th of an amp
I would just use a DPDT switch. Wire it so up is forward, down is reverse and center is off.
Comment: can I use 12v relay in is above circuit
hi i need somo help.i have build a circuit using a 12v relay.but it fluctuaute that means it gives tik tik tik sound continously.what may be the problem?
Thanks for this. I was able to build this and put it into my lighted model kit. Now when the lights go off in the room the model lights up.
Hi i am building dark detector with ac bulb circuit..i just want to know minimum how much amps we need for this circuit
can i run tank motor using this relay and another sensor in place of dark light sensor.
can i use this relay in arudino?
where is the input pin in this relay?