How To Make Solid State Relay?

Table of Contents


A relay is an actuator that connects two terminals or points based on a control signal. Unlike manual switches, a small electrical current controls the ON and OFF switching operation of a relay.

There are two types of relays: Electromechanical relays and Solid-State Relays (SSR). Electromechanical relays use an electromagnet to achieve the mechanical action of the switch. In contrast, an SSR uses semiconductor devices like transistors, thyristors, SCR’s, or TRIACs to achieve switching.

SSRs have many advantages over electromechanical relays. One of the main advantages is that they have no moving parts and are less susceptible to wear and tear.

In this DIY project, we designed a simple solid-state relay using an optocoupler and a TRIAC. It can be used as a replacement for mechanical relays for currents up to 4A (depending on the TRIAC used). However, be cautious when using breadboards with AC supply as it can be dangerous. We recommend making the circuit on a PCB instead.

Circuit Diagram

Solid State Relay

Components Required

  • MOC3021 Optocoupler – 1
  • BT136 TRIAC – 1
  • 100Ω Resistor (½ W) – 1
  • 100Ω Resistor – 1
  • 330Ω Resistor – 2
  • LEDs – 2
  • Push Button – 1

Component Description


It is a 6 pin Optocoupler IC which consists of an Infrared emitting diode optically coupled to a photo TRIAC. Some of the main applications of this IC are solenoids or control valves, solid state relays, motor control, incandescent lamp dimmer, AC power switch etc.

It can be used for 115V and 240V AC applications. Pins 1 and 2 of the IC ARE THE Anode and Cathode of the diode while Pins 6 and 4 are the main terminals.


It is the TRIAC IC used in the project. This TRIAC can be generally used in applications where high bidirectional transient and blocking voltage is involved.

The maximum off-state voltage or blocking voltage is 600V and up to 4A of on-state RMS current can be allowed. The common applications are motor control, industrial lighting, heating applications and static switching.

Caution: Using breadboards with AC supply is dangerous. You need to be very careful. Make the circuit on a PCB”.

Circuit Design of Solid State Relay

A Red LED with a current limiting resistor is used as a power on indicator. A push button is connected between supply and Pin 1 of MOC3021.

A Green LED with current limiting resistor is connected from Pin 1. Pin 2 of MOC3021 is connected to ground through a current limiting resistor.

Pin 6 of MOC3021 is connected to T1 (Pin 1) of TRIAC BT136 with a 100Ω resistor. Pin 4 of MOC3021 IC is connected to gate (Pin 3) of the TRIAC.

T1 of TRIAC is connected to “hot” mains line. One end of the load like a lamp is connected to T2 of the TRIAC and other end is connected to “cold” mains line or ground.

Working of Solid State Relay

Solid State Relay

Relays are used in circuits where galvanic isolation is required i.e. when low power circuit is required to control a high current or high voltage circuit.

The best example is in case of microcontrollers that can control heavy loads like AC motors. The aim of this project is to demonstrate a DIY solid state relay. The working of the project is as follows.

As mentioned above, a small current at the input of the relay must be able to switch ON and OFF the relay contacts. Hence, a button is placed between the supply and the input (anode terminal of diode) of the MOC3021 optocoupler.

When the button is pushed, infrared emitting diode emits IR rays and is captured by the optically triggered TRIAC of optocoupler. The output of the optocoupler (internal TRIAC to be specific) is given to the Gate of the external TRIAC BT136.

Hence, when ever the button is pushed, the external TRIAC is activated. As the terminals of the TRIAC BT136 are connected to mains supply, the load connected will be switched ON or OFF according to status of the button.

The function of a relay without any mechanical operations or moving parts is achieved as all the components are semiconductor devices. Hence, it is called a Solid State Relay.

A power on LED is used to indicate the circuit is powered on and a button status LED is also used to indicate switching operation.

Caution: Using breadboards with AC supply is dangerous. You need to be very careful. Make the circuit on a PCB”.


The circuit is suitable only for resistive loads. In order to use this for inductive loads, a snubber circuit must be placed between T1 and T2 of the TRIAC BT136.

A Snubber circuit is a series RC circuit used to suppress any spikes in voltage due to interruption in current. A 39Ω resistor in series with 10nF/400V capacitor can be used as the snubber circuit.

Snubber Circuit


  • The TRIAC BT136 is connected to AC mains. Must be careful when dealing with AC.
  • The circuit is a fully efficient relay in solid state form and can be used as a replacement to mechanical relays or expensive solid state relay ICs.
  • As there are no moving parts, there is wearing out problem and the switching action is faster than mechanical relays.
  • There will be no de-bouncing condition.
  • Can be used with AC or DC loads.

Caution: Using breadboards with AC supply is dangerous. You need to be very careful. Make the circuit on a PCB”.


Similar Articles & Blogs

Explore similar articles on various electronics and electrical topics – 

Logic AND Function

In 1854, George Boole performed an investigation into the “laws of thought” which were based around a simplified version of the “group” or “set” theory, and from

Learn More >>

Binary Coded Decimal

As we have seen in this Binary Numbers section of tutorials, there are many different binary codes used in digital and electronic circuits, each with

Learn More >>

Binary Fractions

We know that decimal (or denary) numbers use the base ten (base-10) numbering system where each digit in a decimal number is allowed to take one

Learn More >>

Octal Number System

The Octal Numbering System is very similar in principle to the previous hexadecimal numbering system except that in Octal, a binary number is divided up into groups

Learn More >>