Instructables
Picture of Small Triac Switch
ssr-206-circuit.JPG
triacswitch.jpg
ssr-206top2.jpg
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.

The PCB
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.

Connecting
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.


mashiurmmr1 month ago

Hi,

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.

Mashiur

diy_bloke (author)  mashiurmmr1 month ago

Mahiurmmr
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?

mashiurmmr2 months ago

Hi,

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)  mashiurmmr2 months 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

Hi,

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.

Mashiur

Switching circuit.jpg
diy_bloke (author)  mashiurmmr2 months ago

Mashiur
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!5 months ago

Hi

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.

Cheers!!!

Rituparna

photo_2014-04-25_19-00-18.jpg

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)  rmatkar4 months ago

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

rmatkar diy_bloke4 months ago
thanks

Nice Work. Looks awesome.

Regards,

Abhishek.

XenonHK3 months 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)  XenonHK3 months ago

XenonHK
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:

https://www.google.nl/search?client=ubuntu&channel...

Also this article describes exactly what you are experiencing:

http://www.nxp.com/documents/application_note/AN10803.pdf

XenonHK diy_bloke3 months ago

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

Xenon

egrabhishek4 months ago

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)  egrabhishek4 months 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

x09004 months 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)  x09004 months 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

egrabhishek5 months ago

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.

Thanks,

Abhishek.

diy_bloke (author)  egrabhishek5 months 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:

http://images.elektroda.net/0_1257514629.jpg

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_bloke5 months 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

behaviour.

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)  egrabhishek5 months 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:

http://images.elektroda.net/0_1257514629.jpg

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)  egrabhishek5 months 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)  egrabhishek5 months 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:

http://electronics.stackexchange.com/questions/876...

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.

Regards,

Abhishek

Hi,

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 ..

Thanks.

Thanks for your inputs buddy and it actually made a difference. I tried with 10nF cap with various resistances. It solved my problem by 80%. It solved the issue of false trigerring to an extent. It still happens but frequency is much less now. But still there is a strange behavior. My circuit leaks some voltage via the snubber and my bulb glows with the minimum possible intensity. I tried connecting a wire-extender. The red indicator Led in that glows with very low intensity. However, when I switch it ON via MOC3041 things work well.

Ok now I am gonna break my issues into more comments to make you understand it better.

rmatkar7 months ago

Thanks for the post. So I have implemented a similar circuit with 470ohm resistor and BT136 triad The resistors that i have used are of 1 watt. Correct me if I am wrong but, the wattage of the resistor does not matter where the 470 ohm resistor is placed! and how much current can this circuit handle as in ...can I use this circuit to control may be an AC or a refrigerator?

Hi,

I am seriously in need of some help. I have made the same circuit with BT136 and i am facing the problem of false trigering. Did you faced something similar ? I am using 470 ohms and 330 ohms resistors as suggested in the post.

Any help would be highly appreciated.

Regards,

Abhishek.

Hi Abhishek,

I would suggest changing the BT136 to a snubber-less BT like BTA16. I did not face any issues worked fine. How are u firing the triac. just double check the output pins. I am not from a electrical background so cant help you much.

Thanks

Rituparna

Hi,

Thanks for the quick response. I also found that snubber circuits have a small leakage current 7.5 mA for 0.1 uF and 100 ohm resistance.

I also came across some snubber-less TRIACS BTA16-600. I am gonna give a try to that as well.

Sorry I am not trying to discourage you or find fault in your circuit but the issue must be there in your circuit as well. If you want you can try by activating your circuit. Keep the test load (say a pedestal fan) OFF and now if you have a ceiling fan then try turning it ON very slowly. Make the manual switch produce spark noise. And now you can see a momentary movement of the fan.

I am firing it using MOC3041 and it works perfectly. This issue is just a side issue where I am seeing a spike upsetting my switch for a moment.

Unfortunately I am also not from electronics background rather from software background and trying to make a home automation system. I have achieved most of the things and am just stuck at this point.

I am not sure if there are some rules about the forum, but it would be great if I could get the privilege to call you once or if you can do that. I am sharing my number here : 8884404704 (Bangalore).

For more info on what I am trying to do you can refer to my original query above.

Regards,

Abhishek.

diy_bloke (author)  rmatkar7 months ago

Tnx rmatkar. The wattage of the 470 ohm resistor ofcourse is important, but it doesn't need to be so high. :-) Unless you want to cater for worst case scenario's 1/4 w or 1/2 w is ok.
the BT136 can handle 4 ampere so as long as the current consumption of your ac or refrigerator stays within that it shld be ok. can advise though to add a heatsink to yr bt136 and to add the snubber network as I indicated

diy_bloke (author)  rmatkar7 months ago

Tnx rmatkar. The wattage of the 470 ohm resistor ofcourse is important, but it doesn't need to be so high. :-) Unless you want to cater for worst case scenario's 1/4 w or 1/2 w is ok.
the BT136 can handle 4 ampere so as long as the current consumption of your ac or refrigerator stays within that it shld be ok. can advise though to add a heatsink to yr bt136 and to add the snubber network as I indicated

egrabhishek5 months ago

http://www.omron.com/ecb/products/pdf/precautions_...

This clearly states that there is always a leakage current in snubber circuit.

samueltoast8 months ago

hi people! i have 1 question:

wich pin of the moc 3041 gives the zero-crossing signal to the arduino?

PS: im an italian student so excuse me for my english

diy_bloke (author)  samueltoast8 months ago

Hi Samuel. Nothing wrong with yr english.
It isn't specifically 1 pin that gives the zero crossing signal: the MOC3041's output is between pin 4 and 6. It doesn't give a zerocrossing signal, it connects between pin 4 and 6 if it gets an input signal on pin 1 and 2, but it makes that connection at zerocrossing. The MOC3041 therefore has a zero crossing detector, but doesnt give a zerocrossing signal

Thank you!!

eticzon7 months ago

can i use a stm32 instead of arduino to control the light ..??

diy_bloke (author)  eticzon7 months ago

Yes, ofcourse :-) The circuit is not depending on one specific kind of controller. Any uC that has a pin that can switch HIGH and LOW is useable

AnonCh4rl11 year ago
Great Simple stuff, Thanks for posting this.

But I don't understand one thing.. with the zero crossing MOC - when not being triggered externally by arduino is it totally off or does it still trigger the Triac a little every crossing of the zero line?

Is this the reason some Triacs can only regulate down to like 10-30%

Many thanks
diy_bloke (author)  AnonCh4rl11 year ago
Thanks for your kind words.
The zero crossing opto-coupler needs input to do its work. If no input, no action. The zero cross filter does not do any thing autonomously.

Therefore it also has nothing to do with Triacs only being able to regulate down to 10-30% only. In fact I am not even sure if that in itself is true :-)

Mind you though that this circuit is a switch, it is on or off. I am sure there may be some loss in the Triac, but not 10-30%

If you have any more questions dont hesitate to ask
zant761 year ago
How many watt can be load..
diy_bloke (author)  zant761 year ago
That largely depends on the used Triac. The Tic206 has an RMS load of 4 Ampere so it can load 880 Watt
Nice project, just a small (but serious) correction.Although the image specifies phase, neutral and earth in correct colors, the description in the end states brown as neutral and blue as live (phase). And i live in Europe!
(besides, its not the colors that matter but the essence of the circuit, that it controls the "live" line, not the neutral.
Other than that, great little project!
diy_bloke (author)  tkefalopoylos1 year ago
Thanks I made a mistake as I surely know blue is the 'safe' one. I will correct it. Thanks
chipper351 year ago
Simple, clear....perfect!!
diy_bloke (author)  chipper351 year ago
thanks :-)