Introduction: DIY Solid State Relay
Ever wanted to get rid of that tic-tac sound electromagnetic relays make? Electromagnetic relays require significant power to turn the electromagnet on/off and need a driver circuit for that, oh! wait! also they need a flyback diode to avoid the risk of inductive spiking which may not be suitable for projects running on battery or projects which you want to be power efficient.
If you want to get rid of all those things in once you are at the right place, here I will show you how to make Solid State Relay using just couple of components.
WARNING:- THIS PROJECT DEALS WITH HIGH-VOLTAGE (AC MAINS) USE FULL PRECAUTIONS. I WILL NOT BE RESPONSIBLE FOR ANY KIND OF DAMAGE CAUSED TO YOU.
LET's GET STARTED!!
DOWN HERE IS THE COMPLETE VIDEO TUTORIAL FOR THE SAME.
Step 1: THINGS WE NEED
https://www.utsource.net/ is an online platform for technicians, Makers, Enthusiasts, Kids to buy electronic components
Triac- BT136
Optocoupler- MOC3021 (used to isolate high-voltage from low-voltage input)
Resistors- 220 ohms and 470 ohms
LED - Just for indication of state
Breadboard- For making prototype
Jumpers
5V power supply ( I will use my arduino for this)
Finally the Schematic.
Step 2: OPTOCOUPLER
Add it to the breadboard.
Step 3: Add Negative Pin of Led to Pin 1 of Optocoupler
Step 4: Add 220 Ohm Resistor to +ve Pin of LED
Step 5: Add Jumper to Pin 2 of Optocoupler Which Will Go to -ve Power Supply
Step 6: Join Source of Triac to 4th Pin of Optocoupler
Step 7: Add 470 Ohm Resistor Between the Drain and 6th Pin of Optocoupler
Step 8: Add Two Jumpers, One to Drain and Another to Gate
Step 9: BINGO! Time to Test
Step 10: Add Power Supply
I used my arduino mega with blink sketch.
Step 11: Print the Final PCB
Don't know how to print PCB's? Watch this
From HERE you can download the PCB file in .pcb extension.
Don't know how to print PCB's?
PAY ATTENTION- you need to make the traces thick because it is a high-voltage project, to know how to tin PCB see this instructable
To see the working watch the video I linked in Introduction.
Thanks to DIY bloke for my inspiration for this project.
Thank You for coming here
see you again,
Tanishq Jaiswal

Participated in the
Summer Fun Contest 2016

Participated in the
Trash to Treasure Challenge
17 Comments
Question 4 years ago on Step 11
Can I use the MOC3023 so I can do dimming?
Answer 4 years ago
No, Dimming is a completely different concept, have a look at this excellent instructable for more details about dimming - https://www.google.co.in/amp/s/www.instructables.com/id/AC-PWM-Dimmer-for-Arduino/%3famp_page=true
Question 5 years ago
Hello, what is the load voltage and current?
Thanks
Reply 5 years ago
Load voltage I used is 220V and Load is a 100W bulb, I do not recommend going beyond that without a heatsink on triac, but remember that heatsink will be connected to AC mains, don't do the mistake of going near it.
6 years ago
I have a question regarding the polarity on pin 1 and 2 of the Opto coupler. You say that pin 2 is positive, but in the data sheet I downloaded for the MOC3021, pin 2 is the negative side. Am I mistaken in my understanding?
Reply 6 years ago
Opps a huge mistake, I reversed the polarity everywhere, Thank you very much for pointing it out, edited it.
6 years ago
Good enough! But for the beginer's safety.. the breadboard you made: The ACV (230V) side, ALL wiring and isolation requiers at least 5mm. spaceing, (in Europe), + it should be isolated in other method's too. Make absolutely sure to have the AC side fused, (recommend a fault leakage current circuitbraker 20mA). There are Triacs that you can turn ON/OFF directly with logical levels = no need of the opto. Can't recall them types right now, but they are not expensive. These ON/OFF, (direct logik control triacs), differe's in use from the usually used zero crossing methods in that their effience is much higher.
6 years ago
i build one last week ;) and its very easy thank you
Reply 6 years ago
Glad that you tried! :)
6 years ago
Good ible. I would recommend using a software such as Fritzing to draw a schematic and layout, instead of spending so many steps on how to do the wiring. You could instead use those steps to explain how the circuit works, or explain the code, etc.
6 years ago
This relay isn't exactely synchronized with mains. If you send a pwm signal, this time synchronized at 50 or 60Hz, on the moc, you'll have a dimmer !
High intensities will need a dissipator for the triac which produces 1.4 x Int watt.
Reply 6 years ago
I think by saying synchronization you mean zero cross detection, yes you can use it as dimmer in that way, but it is very complex for beginners to code microcontroller to detect zero cross and also because power MOSFETS(like irfp460) are cheaply available, so for the simplicity of code and circuit, I use them instead of using triacs.
6 years ago
where is code
Reply 6 years ago
It is a simple blink sketch, you can get it in examples in IDE, I used microcontroller only for testing, you just have to supply 5V to turn it on.
6 years ago
Great job on this... Funny because i had done something very similar for a steam punk ish spark gap "macro" logic gate( just for visuals).... My one suggestion for clarity is to make a diagram for the breadboard, some of the placements are tricky to see, esp for circuit noobs:)
6 years ago
Good explanation, this may be useful to some.
Reply 6 years ago
thanks!