
An electrical relay consists of a electromagnet and a spring loaded changeover contacts. When the electromagnet is switched ON/OFF with a DC supply, the spring loaded mechanism is corresponding pulled and released by this electromagnet, enabling a changeover across the end terminals of these contacts. An external electrical load connected across these contacts are subsequently switched ON/OFF in response to relay electromagnet switching.
In this post we learn comprehensively regarding how relay works in electronic circuits, how to identify its pinouts of any relay through a meter and connect in circuits.
Introduction
Whether it’s for flashing a lamp, for switching AC motor or for other similar operations, relays are for such applications. However young electronic enthusiasts often become confused while assessing the pin outs of the relay and configuring them with a drive circuit inside the intended electronic circuit.
In this article we’ll study the basic rules that will help us to identify relay pinouts and learn regarding how a relay works. Let’s begin the discussion.
How a Relay Works
The working of an electrical relay can be learned from the following points:

- A relay mechanism basically consists of a coil and a spring loaded contact which is free to move across a pivoted axis.
- The central pole is hinged or pivoted in such a way that when the relay coil is powered with voltage, the central pole joins with one of the side terminals of the device called the N/O contact (Normally Closed).
- This happens because the pole iron gets attracted by the relay coil electromagnetic pull.
- And when the relay coil is switched OFF, the pole disconnects itself from the N/O (Normally Open) terminal and joins itself with a second terminal called the N/C contact.
- This is the default position of the contacts, and happens due to the absence of an electromagnetic force, and also due to the spring tension of the pole metal which normally keeps the pole connected with the N/C contact.
- During such switch ON and switch OFF operations it switches from N/C to N/O alternately depending upon the ON/OFF states of the relay coil
- The coil of the relay which is wound over an iron core behaves like a strong electromagnet when a DC is passed through the coil.
- When the coil is energized the generated electromagnetic field instantly pulls the nearby spring loaded pole metal implementing the above explained switching of the contacts
- The above movable spring loaded pole inherently forms the main central switching lead and its end ts terminated as the pinout of this pole.
- The other two contacts N/C and the N/O form the associated complementary pairs of relay terminals or the pin outs which alternately get connected and disconnected with the central relay pole in response to the coil activation.
- These N/C and N/O contacts also have end terminations which move out of the relay box to form the relevant pinouts of the relay.
The following rough simulation shows how the relay pole moves in response to the electromagnet coil when switched ON and OFF with an input supply voltage. We can clearly see that initially the central pole is held connected with the N/C contact, and when the coil is energized, the pole is pulled downwards due to the electromagnetic action of the coil, forcing the central pole to connect with the N/O contact.

Video Explanation
Thus basically there are three contact pinouts for a relay, namely the central pole, the N/C and the N/O.
The two additional pinouts are terminated with the coil of the relay
This basic relay is also called a SPDT type of relay meaning single pole double throw, since here we have a single central pole but two alternate side contacts in the form of N/O, N/C, hence the term SPDT.
Therefore in all we have 5 pinouts in an SPDT relay: the central movable or switching terminal, a pair of N/C and the N/O terminals and finally the two coil terminals which all together constitute a relays pin outs.

How to identify Relay Pinouts and Connect a Relay
Normally and unfortunately many relays don’t have there pinout marked, which makes it difficult for the new electronic enthusiasts to identify them and make these work for the intended applications.
The pinouts that needs to be identified are (in the given order):
- The coil pins
- The Common Pole pin
- The N/C pin
- The N/O pin
The identification of a typical relays pinouts may be done in the following manner:
1) Position the multimeter in the Ohms range, preferably in the 1K range.
2) Begin by connecting the meter prods to any of the two pins of the relay randomly, until you find the pins which indicate some kind of resistance on th meter display. Typically this may be anything between 100 ohm and 500 Ohm. These pins of the relay would signify the coil pinouts of the relay.
3) Next, follow the same procedure and proceed by connecting the meter meter prods randomly to the remaining three terminals.
4) Keep doing this until you find two pins of the relay indicating a continuity across them. These two pinouts will be obviously the N/C and the pole of the relay, because since the relay is not powered the pole will be attached with the N/C due to internal spring tension, indicating a continuity across each other.
5) Now you need to simply identify the other single terminal which may be oriented somewhere in across the above two terminals representing a triangular configuration.
6) In most cases the central pinout from this triangular configuration would be your relay pole, the N/C is already identified and therefore the last one would be your relay's N/O contact or pinout.
The following simulation shows how a typical relay may be wired with a DC voltage source across its coils and a mains AC load across its N/O and N/C contacts

These three contacts may be further confirmed by powering the relay coil with the specified voltage and by checking the N/O side with the meter for a continuity..
The above simple procedure could be applied for identifying any relay pinout which may be unknown to you, or unlabelled.
Now since we have thoroughly studied how a relay works and how to identify the pinouts of a relay, it would be also interesting to know the details of the most popular type of relay which is mostly used in small electronic circuits, and how to connect it.
If you want to know how to design and configure a relay driver stage using a transistor, you can read it in the following post:
How to make a transistor relay driver circuit
A Typical Chinese Make Relay PinOuts



How to Wire Relay Terminals
The following diagram shows how the above relay may be wired with a load, such that when the coil is energized, the load gets triggered or switched ON through its N/O contacts, and through the attached supply voltage.
This supply voltage in series with the load may be as per the load specifications. If the load is rated at DC potential then this supply voltage could be a DC, if the load is supposed to be an AC mains operated then this series supply could be a 220V or 120V AC as per the specifications.

Hello sir, thanks for the info.
But what about the square based 11 pin relays?
I have an inverter that doesn’t charge batteries, so I built an external 40A battery charger for my batteries.. But whenever I want to charge the battery, I’ll have to remove the inverter red and black terminals from the battery so that current will not flow from the charger into the inverter and damage it. I want something that will enable me not worry about this, with the use of those 11pin square base 40A relay so that when it is time for charging, the inverter terminals can still be on the battery, as well as the charger terminals, without current going into the inverter
Hello Jerry, you will have to find the pin diagram and internal configuration of the relay. Once you find it you can easily configure it for the required changeover and switching.
Without seeing the schematic or the pin diagram of the relay it may be difficult to judge its operational details
Just wanted to say thanks for a great tutorial on relays.The explanations,animations and pics helped this beginner grasp relay concept and uses.Keep up the good work.
Glad you liked leo, appreciate you feedback!
I know very very little about circuitry. Someone told me the project I’m working on needs a “timer relay” and someone who knows controls. Thanks to this article, I think I now understand what a relay does, thank you! However, you seem like someone who knows controls, so perhaps you might be able to help more specifically. 🙂
I’m trying to make a setup where one light runs continuously during the daytime, but when a button is pushed, that light would turn off and a different one would turn on for 30 seconds. After the 30 seconds, it would go back to the normal light.
Scorpions glow under blacklight/UV light, and we want to be able to show that in an exhibit. We had a simple switch setup with on/off, so we left the blacklight on all day (controlled with simple lamp timer to turn off when we were closed) and put the “normal” light on the on/off switch, so when the switch was ON, the white light interfered with the UV and the scorpions looked black, and when OFF you could see the scorpions’ fluorescence under the blacklight. But apparently scorpion fluorescence decreases with chronic exposure to UV, so after a few months of ~12h/day of UV, they were barely glowing anymore. Instead, we want to make a setup where someone pushes a button (or flips a switch or similar interaction) to view the animals under blacklight, but it automatically goes back to the normal light after.
Usually we just use a lamp timer to set the daytime hours the normal light is on (for viewing & to give animal day/night cycle), so bonus if the system can work with that, or incorporate the day/night cycle as well.
Sorry if this is a simple question – I’m a biologist, so can tell you tons of cool stuff about scorpions and a bunch of other animals, but can’t figure out what words to enter into Google to try to find this answer!
Hi, please provide the electrical specifications of the black light and the day time timer, are these operated with 220V AC? I’ll try to figure out a suitable solution once I get these details.
dear sir, i want to a relay to be on for desired period (say 10 seconds) and off when power supply is given and it has to be remain at off state further with availability of power supply. again it has to on after main power supply is connected after disconnection. please give instructions for that. thanks sir.
Jayanth, you can try the first circuit from this article:
https://www.homemade-circuits.com/interesting-timer-circuits-using-ic-555-explored/
replace S1 with a 0.1uF capacitor.
ok sir i will
Hi, Swagatam. We build control circuits with 24VDC relays operated by PLC transistor outputs. Some of the PLCs have (-) 24VDC outputs and others have (+) 24VDC outputs. We have a standard 1N4002 diode across the relay coil as a snubber, which works just fine. However, we have to build two different types of circuit boards, one with the snubber diode biased one direction and the other board with the snubber diode in the other direction, depending on the PLC outputs being utilized. We want to use two zener diodes in series, reverse biased across the relay coil so that we can build one board and utilize either PLC output style without modifications. The relay coil common voltage is jumper selectable. The relay draws 5.1mA when energized. We are having trouble deciding what power rating the zeners need to be. We would greatly appreciate your expertise on this. Thank you very much.
Hi Louis, since the current rating of the relay coil is only 5.1 mA, any standard zener (400mW) should work. However for greater safety you can use 1 watt diodes which will be more than enough.
Thank you so much for the rapid reply. It is important to us that we build our boards to be as reliable as possible.
No problem, wish you all the best!
Hello Mr.Swag. If a relay is 10a / 250 . can the load of a 220v 40w x 20 lamp be used?
how to calculate the load power of maximum the relay? Thanks
Hello Sarwana, yes yoo can use the relay for the mentioned load, which will consume not more than 4 amps
Dear sir,
Very informative, could i ask,
I have a campervan with inverter to make 240v, i have a 240v mains hookup, my question is, what sort of relay setup would i use to switch from inverter power to hookup power
automatically? would i need to switch both positive/live and negative/neutral using double pole relay (so nothing goes to inverter completely) or just the live?
regards
Paul
Thank you Paul, yes you will need a DPDT relay and a SPDT relay for the changeover action.The DPDT can be used for changing over the AC LIVE/NEUTRAL lines, while the SPDT can be used for changing the positive line of the battery
Thanks for timely reply,
I think i understand, i would like to use n/o dpdt relay that allows inverter to be main supply to fuse/sockets (that would be default 240v power to camper) control of relay action (n/o relay) would be ac coil(240v) supplied from hookup, this changes live/neutral from inverter over to hookup power live/neutral, 240v mains power. correct?
why do i need spdt relay for changing the positive line of the battery, is this to remove power that is going from 12v batteries to inverter?
I’m looking at din rail mount relay placed in enclosure with din rail 240v trip/fuses, that is auto switched from inverter to mains when hookup is pluged in.
sorry if this is a bit long winded, just a safety thing for me. ask ask ask, get it right first time.
regards
Paul
Yes your assumptions are correct for the DPDT mains connections. The battery positive also needs a changeover, since its needs to be transferred from the inverter powering mode to charging mode when mains is present.
That would stop any sort of charging, by mains hook-up feeding into inverter from batteies. correct?
what ampage relay would you suggest? I’m looking at about 25-40amp din rail dpdt relay and wire all in enclosure with the Mcb’s and rcd, the spdt relay will be 40amp? my 12v split charge circuit have 50amp trip fuses.
hope this will also be imfromative to other people out there, thinking camper van and open skys.
The SPDT relay will disconnect the battery positive from the inverter and connect it with the charger positive supply, during the mains AC presence.
The respective relay contacts will depend on the battery Ah rating or the charging current, and the transformer wattage.
Clearest explanation on the Internet! Thank you
Thank you for your kind feedback!
MR SWAG, I REALLY APPRECITAE YOUR EFORT ON THIS RELAY EXPLANATON, I HAVE BEEN FINDING IT DIFFCULT IN CONNECTING RELAY PREVIOUSLY BUT I NOW UNDERSTAND HOW THEY WORK N HOW TO CONNECT THEM IN A CIRCUIT. THANKS SO MUCH SIR GOD BLESS YOU.
Thank you Godspower…I am glad the post helped you!
How to make your car system to charge normal
Learning motor vehicle wiring