Picture of Small Triac Switch
In order to switch some floodlights by my Arduino, the small switch circuits I built around a 39mf22 were just not man enough to handle the current needed, so I decided to build a switch with discrete components around a TRIAC.

Now these circuits are very easy and come a dime a dozen on the internet: just google for TIC206 or MOC3041 and you have lots of choice. The reason I make an instructable for such a simple circuit is to also provide a print design for those people to lazy or unable to make a design themselves :-)

But let me start with a disclaimer/warning:
This circuit is connected to a mains voltage that can kill you. If you do not know what you are doing then do not build this circuit.. Do not touch it when it is connected to the mains. The metal plate of the Triac is connected  to it's Terminal 2 and thus to the mains voltage. When in use, do not touch that plate to feel how warm it gets.
Put this circuit in a proper container.

Materials List
Triac TIC206  €1.20
MOC3041 €0.65
DIL 6 IC foot €0.15
LED €0.15
Resistor 220 Ohm 1/4 Watt €0.10
Resistor 470 Ohm 1/4 Watt €0.10
Connector €0.20
Piece of scrap PCB 23x43 mm

That is a total of €2.55
The links are just there to illustrate what I mean and to give a price indication. I have no links to that webshop other than that i use it and am satisfied with it.
It is also possible to use the considerably cheaper BT136-600, that like the TIC206 can deliver 4Amps, but it's gate current is a hefty 35-70mA as compared to the TIC206's 5mA. If a BT136 is used, the 470Ohm resistor may need to be a bit smaller (150 Ohm). The BTA16-600 is also a good choice

additionally you may need:
capacitor 10-100nF 400V
resistor 39-100 Ohm
resistor 330 Ohm

The PCB is here.
and mirorred here.

The circuit
The main components in this circuit are the MOC3041 optocoupler and the TIC206 TRIAC (M or D version). I have chosen for a MOC3041 because it has a zero crossover circuit in the chip, ensuring smooth switching. The TIC 206  is a triac that has a relatively sensitive gate.

The output from an Arduino or other uP  is led to the MOC3041 via a 22o Ohm resistor and an LED. This way one can see for sure if there is current flowing through the optocoupler. 
The gate of the thyristor is fed  from a 470 Ohm resistor that connects through the MOC3041 optocoupler
On the printed circuit board there is room for a 330 Ohm resistor (labelled with a '*'). If one uses the TIC206 TRiac this resistor is not necessary. Some other thyristors however may need that resistor in order to start.

As I am switching a lamp, I have no use for a snubber circuit (formed by the 100R resistor and C1). However, if you switch inductive loads you will need one. The values of the resistor and capacitor may vary depending on your situation but a proper way to start would be a 100 Ohm resistor and a 100nF capacitor. The PCB offers holes at various distances, suitable for different sizes of capacitors.

Download the PCB design(s) above and use your favorite method to etch your PCB. With regard to the design: the pcb picture in this ibble is seen from the component side: The copper traces thus are actually seen as if you are looking through the board. That is why the writing is in reverse. This design is suitable for a direct toner transfer

If you use the mirrorred design, the writing  is in fact not mirrorred. 

I have used the non mirrorred design for a direct toner transfer (printing it on glossy paper and ironing it on a copperplate)  and that works well. Etching in Hydrochloric acid and Hydroyperoxide.

There is only a two pole connector on this PCB that can be thought of as a switch, interrupting the 'Live' line of a connection, just like a regular switch. The figure shows the proper way to connect it according to EU codes: Blue is neutral, brown is live black is switched and yellow green is earth. Outside the EU there are different colour codes.

1-40 of 61Next »


I tried this circuit with moc 3061 and BTA16-600 BW, with 470 and 330 ohms resistors. It works perfectly switching on and off. But when Direct AC driven LED is connected, i can see light flickering after 2 second. Can you please suggest me any changes that needs to be done to the circuit for LED load?



diy_bloke (author)  Nikki SamridhiM1 month ago

AC LED's work completely different and many are not compatible with a circuit like this. For starters you would need an

lED that is labelled as suitable for dimmers

Yes true, the one i have does not support dimmer. Let me buy one with dimmer and try. Thanks diy_bloke.

diy_bloke (author)  Nikki SamridhiM1 month ago

if you buy one with dimmer then ofcourse you do not need this circuit anymore. I meant onr suitabl for a dimmer

ManojM17 months ago


i think the T2 label in your diagram should be T1, as its on the side of the Gate.

As per http://www.bristolwatch.com/ele/triacs.htm and other references, Gate should be triggered from T2.

i was trying out a circuit with bta136 and 3061. for safety, i was testing it with an AC-AC adapter that output 18V AC, with a 1uF/300V capacitor in series, so as to limit the current, so that i could it it with a load of LEDs.( one can also design an LEDs light from mains this way). initially had the problem with the circuit always remaining on, as well as the leakage issue. i replaced bta136 with bta16, as per comments here, but no change. researched the internet for some triac basics, one of the tips was to make sure to connect "Mt2 to Gate". Checked the pinout of bta16, and made the connections again, keeping t2-gate in mind. Now i tried to make the circuit work first with 3061 alone, then with the bta16 alone, and finally using both, and had success all times. It also worked with the bta136. Note that the resistor to the input of 3061 may have to be reduced, in order to provide sufficient current. the snubber causing leakage seems unavoidable, as it provides a parallel path to the triac. I=V/R = V/(1/wC) = VwC = 240*50*10^-8 is around .12 mA, probably not significant when a proper load is connected. some circuits suggest a value of higher 100nF, so would not reduce it. i was also thinking of using a non-zero-detect photo-triac, so that i could send pulses instead of providing a continuous input current.( zero-crossing detection can help protect the load by providing a gradual voltage, and may be a must for some loads ) am attaching a pic of my test circuit. the black box at the start is a fuse-holder.

diy_bloke (author)  ManojM13 months ago

oddly, my earlier reply to you has not been posted. There was a time that apparently I had to click the button 'Make Comment' twice. and as I didnt always do that, comments disappeared when i left the page.
Anyway, Thanks for your contribution. There indeed can be some confusion about those pins.
As my earlier reply got lost, I am not sure if I indeed had changed the picture then, but as far as i can see it is now correct.
You can use a non zero crossing detect photo triac to which you can send pulses, but as there will be no defined relation then to the point in the cycle when u send the pulse, the effect will be unpredictable. for that you may want to check mu ibble on the triac dimmer.

thanks for your picture. i always appreciate to see what othes do.

ManojM1 diy_bloke3 months ago

thats odd, i had read your earlier reply and seen the corrected diagram posted around 3 mths ago. i can still see your comment on my home page, maybe its just lost here. thanks for responding.

diy_bloke (author)  ManojM13 months ago

that is odd indeed, but thanks for letting me know

JeffW133 months ago

@diy_bloke Will this work with 120V? what values change? Also the other circuit with the triac the dimming one can it be used with 120V as it is shown?

diy_bloke (author)  JeffW133 months ago

yes it will. no need to change any values.
With regard to the dimmer, the changes are described in the article. If you are running 120 Volts, most likely you will also have 60Hz and then it involves changing a value in the software as well as changing 2 resistors.. as described in the article:-)

mashiurmmr1 year ago


I am making another switch to control water valve of over head tank and using this circuit. I am facing problem that when I supply current to pin 1 of MOC3410 pin 4 & 6 get connection but even after cutting the current supply to pin 1 the connections of pin 4 & 6 remains. I want some thing which cuts off connection when the signal is off. Can you suggest any solution.


diy_bloke (author)  mashiurmmr1 year ago

It seems like you have exactly the same problem as before:
The MOC3041 should shut off once you remove power. if it doesn’t, you might have a faulty one or yr circuit is not correct.
If it is just to switch a control valve and you are having so much trouble with teh MOC, how about a transistor with a relay?

mashiurmmr1 year ago


Thanks for the circuit I made it, used a mobile for input signal ( ringtone) and 12 volt for operation of a relay had to use a triac 547 to enhance the signal the relay is switch on but it remains switched on even after cutting the input signal. I have used all registers and the PF(100n) only R330 register excluded and I used Tric225 instead of 206.

I am using it with timer and magnetic contract to drive a pump, I solved the problem of shutting the relay of by using the magnetic contracts connection to cut the power (12v) when the time is on.

I thought the load (relay) will switch off when input signal is stops. Can you advice me what to change in the circuit.

diy_bloke (author)  mashiurmmr1 year ago

yes the Triac should switch off so something is keeping it on.
But first I need some clarification of your sentence: "I solved the problem of shutting the relay of by using the magnetic
contracts connection to cut the power (12v) when the time is on."
What exactly are you cutting the power off from??
Also, I am not really sure what it is that is not switching off? is it your relay or the TRIAC?
The 547 btw is a transistor and not a triac.
Could you perhaps send me a drawing of yr circuit?
If you are using a relay, you may as well use that to switch yr load


Yes 547 is a transistor, actually I am a hobbyist. Trying to make home automation.

I use a timer and a magnetic contact to drive overhead water pump. I made the connections such a way that when I apply power through a push button switch to timer, timer starts the magnetic contact which starts the pump and also provides power to timer. When the time is up timer shuts the magnetic contact, the pump and timer both stops.

I used this circuit to activate the connection of push button switch. As mobile ringer signal is low used the transistor. But the triac keeps supplying current even after input signal is stopped.

As I had ideal connections in the magnetic contact which is connected when the contact is off, I used that connection to supply power(12v) to circuit. So as soon as the timer starts, the magnetic contact is activated and power to the circuit is cut off. When the time is up the power to the circuit get restored.

I think I did it manually, but I plan to use a flip flop circuit in future. Give me some tips on that but now I need to know why the triac keeps the connection on. Thanks for reading.


Switching circuit.jpg
diy_bloke (author)  mashiurmmr1 year ago

I admire your energy and drive, but i get the impression your circuit is needlessly complicated. Why not just use 1 transistor and one relay to switch your contact, no need for the Triac circuit

rmatkar made it!1 year ago


It had a lot of fun doing this. Got a PCB printed and have the ability to control 7 switches using this. I have added a xbee module to make it wireless.




Hello Rituparna,

Congratulations for your work. I'm in a similar project and I have faced some problems. I sent you a message about this project. If you can help me, thank you very much!

what have u sent the msg on? i don't have anything in my inbox...rituparna89@gmail

diy_bloke (author)  rmatkar1 year ago

looks great. Thanks for posting it. Always good do see what people do with ibbles. Impressibe PCB :-)


Nice Work. Looks awesome.



XenonHK1 year ago

Hi all,

I have using MOC3043 and BT136-600 (without using snubber circuit due to system will automatically triggered). When the circuit is connected to the fan or digital clock, it works fine. I can control it on or off without any problem. However, when i connect the circuit with CFL, light is flashing. How to solve the problem?

My circuit is follow MOC3043 datasheet Figure 13. Hot-Line Switching Application Circuit ( http://www.fairchildsemi.com/ds/MO/MOC3043M.pdf)

diy_bloke (author)  XenonHK1 year ago

You are touching on a frequently asked question. The fact is that just a regular CFL isn't really suitable to be dimmed by a traditional TRIAC dimmer as it is not merely a resistive load, but a piece of electronic equipment. An incandescant lamp and a CFL are as comparable as a bread toaster and a TV set: both use electricity and that's about it.
There are specific dimmers for CFL lamps and dimmable CFL lamps: They usually function by feeding a variable voltage (1-10V) to the CFL controller.
That means that if you have such a lamp, you could make an analog out circuit coming from your arduino, that you feed to the dimmable CFL lamp.

This may help you a bit:


Also this article describes exactly what you are experiencing:


Hi diy_bloke,

Thanks a lot for your quick reply and your information. I will study it. I would like to ask one quick question on my circuit. Can the my circuit able to handling CFL on/off control, without flickering (no dimming function is needed)? Thanks a lot

Best regards


Thanks for all your help guys.

I completed the required circuit and it works great. I tested it with a pedestal fan for 4-5 hours and no heating and things like that.

I switched to BTA16 - due to its high dv/dt values I was able to remove the issue created due to the transients on the power lines.

Also I discovered that snubber circuit tend to leak a very minimal amount of current which will not turn the load on but could give a nasty shock. But still its OK and sort of necessary to use them in inductive circuits, along with Safety Fuse and safety warning mentioned appropriately.

diy_bloke (author)  egrabhishek1 year ago

good to hear that. Thanks for the feedback. I always appreciate hearing if people got their problems solved :-)
The TIC206 is kinda my TRIAC of preference and I haven't had any problems with it.
I guess you found out about the charge in the snubber circuit the hard way? :-)
We have all been there, but it underlines again the care one should take working with high voltages. One would not really expect to have a capacitor charge on AC :-) . Probably has something to do with phase shifting or whatever, I am no AC crack

x09001 year ago

Thank you for this nice tutorial. I used BTA16-600C and it worked but for a few minutes. I tried putting heat sink but problem return after few minutes. Do you get same problem ? Do you have some tips for me ? Please :)

diy_bloke (author)  x09001 year ago

Usually problems like this are a faulty soldering connection, a faulty optocoupler or a faulty triac.
Are you using it with a microcontroller?
Please do the following:
Unplug everything
check yr connections
Dont use yr microcontroller but put a 5 Volt tension on the entrance and connect to the mains again.
Let me know what happens

Thanks for this easy to implement tutorial. I have implemented the same stuff using MOC3041 and BT136 TRIAC. I am using 470 and 330 ohms resistance and the things work pretty well.

However I am facing a strange issue with the snubber circuit, which I had incorporated to get rid of the transients in the line. The transients auto-triggers my TRIAC for a moment which I want to remove. Removing the snubber makes my circuit work well. With the snubber my switch is always ON.

I removed the MOC3041 from the circuit and no input signals as well but still it is ON always when snubber is present in parallel to TRIAC. Seems like it provides a parallel path to the external load turning it ON.

Any help would be highly appreciated.



diy_bloke (author)  egrabhishek1 year ago

Abishek, thanks for yr kind words. It is indeed odd, but what I do expect is that the 100nF might be a bit too big for yr setting and the BT136 may see it as a capacitive load (though it isnt strictly a load). As a result the current and the voltage might be a bit out of sync, so that at zero crossing there is still a voltage (from the 100nf) that keeps the TRIAC open.
There are a couple of solutions to tru: some people use a distinctly different valueset for their snubber: say 33 Ohm and 10nF and you cold try that.
100 ohm (even 120 ohm) and 100nF are however tried and tested.
The dV/dt is probably too slow for yr BT136.
What I suggest is that you try the 33Ohm/10nF combo and see if that solves your problem.
You say you need the snubber network to get rid of transients that trigger your TRIAC.
Is it the Triac that gets auto triggered, or might it be your moc that is triggering because of the transients?
What load are you switching? is it an inductive load?
Although I never had problems, the datasheet of the MOC30xx suggest a somewhat more complicated snubber to get rid of transients in an inductive load:


The BT136 is a 'sensitive' Triac.
I would suggest though that you first try the 33 ohm (or 39 ohm) and 10nF

diy_bloke (author)  diy_bloke1 year ago

let me just add that snubber circuits are largely empirical and depend largely on the load you are switching. Sure, there is sort of a general range of what seems to work, but the fact that some people swear by 33/10 and others by 100/100 or 120/100 already show there isn't a one right solution

Issue 1: Snubber Leakage

Exp: My snubber circuit is leaking voltage/current and keeping my

devices turned ON with very less intensity.

To avoid any possiblity of leakage via 3041 (opto-coupler) I had

removed it from my circuit entirely. No more IC is present.

Even now I can see that leakage happening. Initially this leakage

was high and as per your suggestion reducing the capacitor value

helped and now its pretty low but is still there.

Issue 2: Changing resistance shows no further impact on the


Exp:I tried 10 nF capacitor with 39 / 68 / 100 /180 ohm but it

still glows slightly.

Issue 3: False Trigering

Exp: My circuit activates for a fraction of a second when I turn on

another heavy load on the same line like an AC cieling fan.

My Background:

I am working as a Mobile Software Engineer (Android etc.) for last 9 years. Do not have in-depth knowledge of electronics. But can corelate things based on basic idea, R&D and certainly a bit of common sense. Need to get into more tech depth soon but may be not right away.

What am I trying to achieve:

I am trying to make such digitally controlled switches and my range of appliances that should work includes household components like CFL, TubeLights, Cieling and Pedestal Fans, TV etc.

I do not have to control some really heavy gadgets. I feel that to increase the circuit endurance I might have to end up making different model of switches which I will do later. For now only CFL, Mobile Charger, Cieling Fans and TV control switches should suffice.

Thanks for all your inputs and your valuable time.

diy_bloke (author)  egrabhishek1 year ago

Thanks for your exposé. You have not chosen the easiest gadgets to switch as a mobile charger and a ceiling fan are inductive loads and a TV is most likely an inductive load. CFL's also carry their own problems and they may have a high starting current.
For one thing, I wonder, have you experienced these problems too if you were switching a say 60-100 watt incandescent lightbulb?
Secondly, I wonder if yr purpose wouldnt be better served with a relay.
Thirdly, as long as you are switching low currents (like a fan or a charger) you could consider a cheap SSR (I published a circuit of that one too).

But as it is your problem might be related to the MOC3041/BT136 combination.
Try the following:
1- remove the 330 Ohm resistor and increase the 470 to 560 or 1k and see what that does

2- if that doesnt do it, build the snubber like you see here:


Thanks once again for your prompt reply.

I think you are correct but since I am working on a Touch Screen Based home automation system I really cannot limit to 1-2 equipments and hence my list unfortunately contains all of those inductive elements :-(.

To answer you, I DO NOT get any false trigger with fluorescent tube light or a simple light bulb operation. It occurs only when I switch a ceiling fan and that too I turn it ON/OFF deliberately several times, just to test.

Secondly, I cannot survive with mechanical relays as I cannot keep them turned ON for long time which would be the scenario if someone turns On and electrical equipment. It will reduce the life time of the coil.

I can switch to SSR but tI have read that they tend to fail in Closed State which is not so safe.

The other snubber circuit is switching the neutral and not the load. Will try this if I fail to make the one I am currently trying.

Also I do want to know the exact reason for this so that it does not become a blocker for me and can move to the next level of learning.

I am gonna try with even smaller capacitor and see if that helps.

Will post the results in a while. Also one more thought that other folks are also using the same datasheet circuit with no issues, why is it happening with me then :-(.

Anyways thanks for your time buddy. Let me know if you come up with some other thought. :-)

diy_bloke (author)  egrabhishek1 year ago

The fact that the other snubber circuit is switching the neitral and not the laod doesnt really seem that relevant I think. Should give it a try.
What also sometimes helps I have been told is to swith M1 and M2.
As I understand the MOC series can als sometimes give false triggering and that 'other' circuit should prevent that.
The cause of yr problems where others are succesful could very well be product variation. Also, if you happen to have a Tic206 laying around, give that one a try

The market is pretty far from here so will try to get TIC206 in a day or two. Also there is no MOC present at all even then the same behavior. It means it has nothing to do with the MOC.

Next when no MOC is present there is no connection of the gate terminal to anything so no possibility of false gate trigerring.

Also smaller cap makes a difference.

One more thing I want to know is that I am testing using a 3 pin socket or extension.

In the 3 pin female socket I am plugging in a very small night light indicator and that flickers and glows lightly. Do I have to test using some heavier load or something ?

Well for now I am clueless and totally lost. Will try it from scratch and will try the TIC206 option as well. Thanks for all your help.

diy_bloke (author)  egrabhishek1 year ago

you'd better test with a decent load like a 60 w incandescent bulb

Thanks for the suggestion. I am at work. Will go home and try with a 100 W bulb. I found another guy facing similar issue. Find below the link to his question:


Looking at this I am at least convinced that my circuit is almost correct and there exists no universal snubber. I also got a direction that if I end up making a home-automation project, I am going to create different switches for different types and capacities of loads. I think that will fit my business use-case.

Thanks for all your help and input. If you have time please have a look at it and let me know how can I decide for different kinds of loads.




I am able to make it work with BTA16-600B. I could not get the snubber less version so I might end up adding extra snubber for inductive loads. But for smaller resistive loads I am good to go. No more false trigerring. Thanks to higher dv/dt values of the IC.

I tested my circuit for 4-5 continuously with a pedestal fan and it worked without any issues like heating and all.. For now .. things are fine ..


1-40 of 61Next »