We can't drive AC loads directly with a Microcontroller, as AC requires high current and high voltage than a Microcontroller can handle. Microcoltrollers usually operates at +5 or +3.3V DC supply and it I/O pin can provide only up to 25mA DC current. Commonly used AC loads requires 220V AC supply and 5 000mA AC current. Thus it is clear that, interfacing AC load directly with Microcontrollers will damage and destroy the microcontroller.

A relay is a simple electromechanical switch made up of an electromagnet and a set of contacts. Relays are found hidden in all sorts of devices. In fact, some of the first computers ever built used relays to implement Boolean gates. A type of relay that can handle the high power required to directly control an electric motor or other loads is called a contactor. Solid-state relays control power circuits with no moving parts, instead using a semiconductor device to perform switching. Relays with calibrated operating characteristics and sometimes multiple operating coils are used to protect electrical circuits from overload or faults; in modern electric power systems these functions are performed by digital instruments still called "protective relays".

A relay is an electrically operated switch. Many relays use an electromagnet to operate a switch mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal.

We use relay to interface microcontroller to AC loads but still can be able to control the ON and OFF state of the load, by using a RELAY.

We use relay since it is an electromechanical switch its coil can be energized by 5Vdc to 24Vdc and its secondary connection is completely isolated to its primary connection, which we need to control AC loads.

Depending on the operating principle and structural features relays are of different types such as electromagnetic relays, thermal relays, power varied relays, multi-dimensional relays, and so on, with varied ratings, sizes and applications.1. Electromagnetic Relays

These relays are constructed with electrical, mechanical and magnetic components, and have operating coil and mechanical contacts. Therefore, when the coil gets activated by a supply system, these mechanical contacts gets opened or closed. The type of supply can be AC or DC.

2. Solid State Relays

Solid State uses solid state components to perform the switching operation without moving any parts. Since the control energy required is much lower compared with the output power to be controlled by this relay that results the power gain higher when compared to the electromagnetic relays. These are of different types: reed relay coupled SSR, transformer coupled SSR, photo-coupled SSR, and so on.

3. Hybrid Relay

These relays are composed of electromagnetic relays and electronic components. Usually, the input part contains the electronic circuitry that performs rectification and the other control functions, and the output part include electromagnetic relay.4. Thermal Relay

These relays are based on the effects of heat, which means – the rise in the ambient temperature from the limit, directs the contacts to switch from one position to other. These are mainly used in motor protection and consist of bimetallic elements like temperature sensors as well as control elements. Thermal overload relays are the best examples of these relays.

5. Reed Relay

Reed Relays consist of a pair of magnetic strips (also called as reed) that is sealed within a glass tube. This reed acts as both an armature and a contact blade. The magnetic field applied to the coil is wrapped around this tube that makes these reeds move so that switching operation is performed.

Based on dimensions, relays are differentiated as micro miniature, subminiature and miniature relays. Also, based on the construction, these relays are classified as hermetic, sealed and open type relays. Furthermore, depending on the load operating range, relays are of micro, low, intermediate and high power types.

Relays are also available with different pin configurations like 3 pin, 4 pin and 5 pin relays. The ways in which these relays are operated is shown in the below figure. Switching contacts can be SPST, SPDT, DPST and DPDT types. Some of the relays are normally open (NO) type and the other are normally closed (NC) types.

Electromechanical RelaysElectromechanical relays are electrically operated switches that rely on mechanical contacts as the switch mechanism. These are also known as armature relays. They are made of coils and contacts. When the coil is energized, the induced magnetic field moves the armature, which opens or closes the contact.

Electromechanical relays support a wide range of signal characteristics, from low voltage/current to high voltage/current and from DC to GHz frequencies. For this reason, you can almost always find an electromechanical relay with signal characteristics that match given system requirements.

Electromechanical relays typically have a shorter mechanical lifetime than other types. Advances in technology have increased their mechanical lifetime, but electromechanical relays still do not have as many possible actuations as comparable reed relays. As with any relay, the amount of power being switched and other system considerations can have a significant impact on the overall lifetime of the relay. In fact, the mechanical lifetime of an electromechanical relay may be smaller than that of a reed relay, but its electrical lifetime under a similar load (particularly a capacitive load) might decrease at a much slower rate than that of a reed relay. The larger, more robust contacts of an electromechanical relay may often outlast a comparable reed relay.

There are two types of electromechanical relays: latching and non-latching. A latching relay maintains its state after being actuated. It has no default position and remains in its last position when the drive current stops flowing. A latching relay has internal magnets that hold the relay once current starts flowing; this reduces energy because once actuated, it requires no current flow to maintain its position. For this reason, a latching relay is useful in applications where power consumption and dissipation must be limited. For very low-voltage applications, a latching relay is preferable because the lack of coil heating minimizes thermal electromotive force (EMF), which can affect your measurements.

A latching relay can have one or two coils. In one-coil latching, the direction of current flow determines the position of the armature. In two-coil latching, the coil in which the current flows determines the position of the armature.

Conversely, a non-latching relay maintains its state only while being actuated. It has an initial position of NC that is maintained by the force of a spring or permanent magnet while no current flows. The NO contact is maintained by the force of a magnetic field while current flows through the coil. When the current stops, the relay reverts back to its initial NC position. A non-latching electromechanical relay is useful in control applications when the switch must return to a known state if power is lost. It is often used in push button applications such as keyboards or microcontroller input buttons.

Reed RelaysReed relays are switches that use electromagnets to control one or more reed switch. Reed relays, like electromechanical relays, have physical contacts that are mechanically actuated to open/close a path. For reed relays, however, the contacts are much smaller and lower mass than those used in electromechanical relays. Dry reed relays are made of coils wrapped around reed switches. The reed switch is composed of two overlapping ferromagnetic blades (called reeds) hermetically sealed within a glass or ceramic capsule that is filled with an inert gas. The reeds have contacts on their overlapping ends. When the coil is energized, the two reeds are drawn together such that their contacts complete a path through the relay. When the coil is de-energized, the spring force in the reeds pulls the contacts apart.

Because the moving parts are small and lightweight, reed relays can switch faster than armature relays and tend to require very little power. However, they are susceptible to damage from arcing. When a spark jumps across the contacts, it can melt a small section of the reed. If the contacts are still closed when the molten section resolidifies, the contacts may weld together. The spring force in the reeds is often insufficient to mechanically break the weld, causing the reeds to stick in the “on” position.

Because of the smaller, less massive contacts and the different actuating mechanism, reed relays can switch about 10 times faster than electromechanical relays with equivalent ratings. Reed relays also have a much higher mechanical lifetime than electromechanical relays. The trade-off, however, is that the smaller contacts on reed relays make them much more susceptible to damage from arcing when closing a circuit. When an arc jumps across the contacts, it can melt a small section of the contact surface. If the contacts are still closed when the molten section resolidifies, the contacts may weld together. The spring force in the reed is often not sufficient to mechanically break the weld after the drive current has been turned off, which renders the relay unusable. Electromechanical relays may also be damaged from arcing, but the energy required to cause this is much higher.

Solid State RelaysSolid state relays (SSRs) are electronic switches that actuate when a small external voltage is applied across their terminals. They consist of a sensor that responds to an input, a solid-state electronic switching device that switches power to the load circuitry, and a coupling mechanism to enable the control signal to activate without mechanical parts. They are often constructed using a photosensitive metal-oxide semiconductor, field-effect transistor (MOSFET) device with an LED to actuate the device.

SSRs are a faster alternative to electromechanical relays because their switching time is dependent on the time required to power the LED on and off—approximately 1 ms and 0.5 ms, respectively. Because there are no mechanical parts, their life expectancy is higher than electromechanical or reed relays. This also makes them less susceptible to physical vibrations. However, the downside is that contact resistance for SSRs is greater because the connection is made via a transistor instead of physical metal like in electromechanical and reed relays. Although technology is continually improving the contact resistance of SSRs, it is still not uncommon to find them in production today with resistances of 100 Ohms or more.

SSRs tend to generate very little noise, but they are not as robust as electromechanical relays. Much like reed relays, they are highly susceptible to surge currents and damage when used at signal levels above their rating. Although there are no metal contacts to weld, damage to the MOSFET can render the relays unusable.

Lastly, SSRs tend to be more expensive than other switches. They also dissipate more heat. SSRs are useful for high-voltage applications and are common on matrices and multiplexers.

The term Relay generally refers to a device that provides an electrical connection between two or more points in response to the application of a control signal. The most common and widely used type of electrical relay is the electromechanical relay or EMR.

electrical relay circuitAn Electrical RelayThe most fundamental control of any equipment is the ability to turn it “ON” and “OFF”. The easiest way to do this is using switches to interrupt the electrical supply. Although switches can be used to control something, they have their disadvantages. The biggest one is that they have to be manually (physically) turned “ON” or “OFF”. Also, they are relatively large, slow and only switch small electrical currents.

Over Reach and Under Reach of a relay signify the accuracy and coordination setting of the relay. For example in Distance(mostly impedance relay) protection, when a relay over reaches beyond its pre-set setting (the distance up to which it should protect the line) it is said to have over-reached and similarly if it is not able to detect the fault within its defined reach and detects only upto a lesser (nearer) point then it is said to have under-reached. This may occur due various phenomena. For eg.1. Due to abrupt change in impedance of the line (say due to arc impedance, load changes affecting reach of relay).2. Due to mutual coupling of the lines.Modern relays are provided with algorithms to compensate this effect.ANSI code for distance protection is 21/21N

An over-current (OC) relay has a single input in the form of ac current. The output of the relay is a normally-open contact, which changes over to closed state when the relay trips. The relay has two settings. These are the time setting and the plug setting. The time setting decides the operating time of the relay while the plug setting decides the current required for the relay to pick up.Types:1. Instantaneous Over-current Relay2. Definite Time Over-current Relay3. Inverse Time Over-current Relay

In an over current relay, there would be essentially a current coil. When normal current flows through this coil, the magnetic effect generated by the coil is not sufficient to move the moving element of the relay, as in this condition the restraining force is greater than deflecting force. But when the current through the coil increased, the magnetic effect increases, and after certain level of current, the deflecting force generated by the magnetic effect of the coil, crosses the restraining force, as a result, the moving element starts moving to change the contact position in the relay.

Definite Time Over Current RelayThis relay is created by applying intentional time delay after crossing pick up value of the current. A definite time over current relay can be adjusted to issue a trip output at definite amount of time after it picks up. Thus, it has a time setting adjustment and pick up adjustment.

Instantaneous Over Current RelayConstruction and working principle of instantaneous over current relay quite simple.The preset value of current in the relay coil is referred as pick up setting current. This relay is referred as instantaneous over current relay, as ideally, the relay operates as soon as the current in the coil gets higher than pick up setting current. There is no intentional time delay applied. But there is always an inherent time delay which can not be avoided practically. In practice the operating time of an instantaneous relay is of the order of a few milliseconds.

Inverse Time Over Current RelayInverse time is a natural character of any induction type rotating device. This means the speed of rotation of rotating art of the device is faster if input current is increased. In other words, time of operation inversely varies with input current. This natural characteristic of electromechanical induction disc relay in very suitable for over current protection. This is because, in this relay, if fault is more severe, it would be cleared more faster. Although time inverse characteristic is inherent to electromechanical induction disc relay, but the same characteristic can be achieved in microprocessor based relay also by proper programming.

We can set the pick-up value of the relay, keeping in mind that the relay should allow normal load as well as a certain degree of overload to be supplied. Thus the pick-up value of the relay should be more than the allowable maximum load. At the same time, the relay should be sensitive enough to respond to the smallest fault. Thus, the pick-up value should be less than the smallest fault current.

A relay must get an adequate chance to protect the zone under its primary protection. Only if the primary protection does not clear the fault, the back-up protection should initiate tripping. Thus as soon as the fault takes place, it is sensed by both the primary and the back-up protection.Naturally the primary protection is the first to operate, it’s operating time being less than that of the back-up relay. We have to allow for the overshoot of the primary relay, so that there is proper coordination between the primary and the back-up.

Pick Up Current of RelayIn all electrical relays, the moving contacts are not free to move. All the contacts remain in their respective normal position by some force applied on them continuously. This force is called controlling force of the relay. This controlling force may be gravitational force, may be spring force, may be magnetic force.The force applied on the relay’s moving parts for changing the normal position of the contacts, is called deflecting force. This deflecting force is always in opposition of controlling force and presents always in the relay. Although the deflecting force always presents in the relay directly connected to live line, but as the magnitude of this force is less than controlling force in normal condition, the relay does not operate. If the actuating current in the relay coil increases gradually, the deflecting force in electro mechanical relay, is also increased. Once, the deflecting force crosses the controlling force, the moving parts of the relay initiate to move to change the position of the contacts in the relay. The current for which the relay initiates it operation is called pick up current of relay.