TRIAC

Hey Guys - So I got some excellent advice for my project from these lovely folks: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1266251470

Quick recap - I need to switch 120v and about 5A from an Arduino. The load is 4 incandescent lights per "switching unit". The answer I got was solid-state relays. That was great, but those are quite expensive - running $15-20 a piece, and I need 10. The link in the above post had a cheaper source, but they're sold out.

So I did some more looking, and happened upon the TRIAC.

From reading the description, this looks perfect. Lord knows I'm no electrical engineer - the reason I'm using the Arduino is it gives me a computer interface to circuitry - but if I understand this component properly, I can simply get one rated to switch 120v/5a or better, and switch it on and off with the Arduino. It looks like I'll even be able to get a good bit of control over the brightness of these lights - if I turn on the triac at the local maxima of the voltage curve, I should be at effective half brightness.

(Please tell me if I'm dead wrong about any of the above, by the way).

So I went to my component supplier over at Newark.com and found their TRIAC page. But I'm intimidated by all the options they offer. I'm not concerned about the characteristics of the load - an incandescent won't add power back into the system like a fan would - so much as the specification. I'm a little suspicious of all these transistor-looking things and more than a bit unsure that they'll be able to handle 5A.

Am I way off the mark here, or is this something I'll be able to use?

Hey Guys - So I got some excellent advice for my project from these lovely folks: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1266251470

Quick recap - I need to switch 120v and about 5A from an Arduino. The load is 4 incandescent lights per "switching unit". The answer I got was solid-state relays. That was great, but those are quite expensive - running $15-20 a piece, and I need 10. The link in the above post had a cheaper source, but they're sold out.

Here you may find some cheaper options for SSRs:

http://www.herbach.com/Merchant2/merchant.mv?Screen=PROD&Store_Code=HAR&Product_Code=TM03RLY4706&Category_Code=RLY

http://www.mpja.com/products.asp?dept=133
http://www.electronicsurplus.com/leftnav/relays/solidstate.cat

So I did some more looking, and happened upon the TRIAC.

From reading the description, this looks perfect. Lord knows I'm no electrical engineer - the reason I'm using the Arduino is it gives me a computer interface to circuitry - but if I understand this component properly, I can simply get one rated to switch 120v/5a or better, and switch it on and off with the Arduino. It looks like I'll even be able to get a good bit of control over the brightness of these lights - if I turn on the triac at the local maxima of the voltage curve, I should be at effective half brightness.

Yes, but to get that amperage rating, you will likely need to attach it to an appropriately sized heat sink. Also, I would use an opto-coupler to control this; I wouldn't switch it directly with the Arduino. As far as being able to control dimming: Yes, you can do this, but you need a method to detect the zero-crossing (so you can time off of that and only turn on when you need to); I believe there are special opto-couplers for this, as well as other methods (I've only read about this stuff; I've never used them - so take this all with a grain of salt - you are not talking with a hands-on TRIAC expert here).

(Please tell me if I'm dead wrong about any of the above, by the way).

So I went to my component supplier over at Newark.com and found their TRIAC page. But I'm intimidated by all the options they offer. I'm not concerned about the characteristics of the load - an incandescent won't add power back into the system like a fan would - so much as the specification. I'm a little suspicious of all these transistor-looking things and more than a bit unsure that they'll be able to handle 5A.

Provided you have them heat sinked properly, you should be OK (I would look into TRIAC circuits as well - look for something incorporating a 555 timer to blink a lamp using a TRIAC; that will get you far enough (if you understand the schematic) to hook a TRIAC to the Arduino (once again, thru an optocoupler - like a 4N25 or 4N26).

Am I way off the mark here, or is this something I'll be able to use?

Well, I think if you take care, and don't do anything "stupid", its worth a shot to try; just do your research carefully before you hook anything up, and make sure you put the proper heat sinks on them. Isolate the Arduino from the TRIAC using optocouplers; it would be wise to keep the AC control side of things as isolated as possible from the Arduino side of things - do so by including an "air gap" between the Arduino and the optocouplers via a small length of ribbon cable; the optocouplers should be on their own board, connected to the TRIACs control lines, with the load lines of the TRIAC connected to two separate screw contact bus strips (use proper gauge wire, or if etching a PCB, proper thickness traces - for connections).

Put it all in a metal box, with nylon standoffs, ground the metal box properly, etc; when you test it, you may think about using an isolation transformer (oh, make sure you have proper fusing and/or on-board circuit breakers installed on the AC side of things).

Keep a fire extinguisher handy, too...good luck!

:slight_smile:

"IF" you are not in a big hurry those folks have a decent price on TRIACs. They have a 25 amp for 90 cents - datasheet: http://www.st.com/stonline/products/literature/ds/7470/bta25.pdf
I will let other more expert folks comment on the TRIAC, but I do think it will do exactly what you wish. The zero crossing issue is the same with most SSR also - is it not?

Good luck and keep us posted.

Ken H>

A person on IRC, who seemed knowledgeable enough, told me that a SSR was a triac, heatsink, optocoupler, and snubber, all rolled into one. Wikipedia seems to support this... though I don't know enough to be sure.

Thanks for those links. I'll look through them tomorrow when I'm less tired.

I know enough about AC to be plenty cautious of it. AC doesn't terrify me - I've done handyman-esque house wiring before - but I certainly know what it's capable of (arcing, etc). I'll be insulating the hell out of the AC side of this thing (heatshrink and electrical tape) when it's all working. I like the protective box idea as well.

I don't intend on making this into a circuit board. I'll lay out the appropriate bits (not the AC) on a breadboard, and solder it up when it works. Then insulate everything.

And yes, I will be keeping a fire extinguisher handy. I don't expect to need it.

I'll post more when I've had more time to think about it. But now I know that I'm at least not crazy.

[a] SSR was a triac, heatsink, optocoupler, and snubber, all rolled into one.

Yep; close enough. Also frequently packaging and heat sink as needed for reasonably safe isolation of the AC side from the control side, which is not to discounted!

Also add into the mix a DIAC

These are bidirectional diodes that break down at a fixed voltage. They are used to delay between the zero crossing and the switch on time. With a simple R(pot), C and DIAC you can make a triac dimming circuit. You can then replace the function of the pot with an opto isolator for control through a DC voltage level from the arduino.

Awwww Come Richard - it's not that bad. Remember, No Guts, No Glory!!! (hey, I just might have a life insurance policy on the guy :slight_smile: )

From reading the guy's post it seems like he knows enough to make it work - and he is asking questions rather than plowing ahead... and this is only 120VAC not really HV like 13.8KV - now that stuff will jump out and get you!

seriously, do take care and use some good old common sense.

Ken H.

The part of this I'm new to isn't the AC part - it's the DC part. As I mentioned, I've been doing simple to not-so-simple household wiring for years with no trouble.

I don't screw around with AC. You turn it off, or unplug it, until everything is well insulated or otherwise rendered safe.

Having said that, I think you've all made the case for spending a bit more and getting some proper solid-state relays. I'm not concerned about my ability to handle the voltages involved, but there's something to be said for just having a few screw terminals. That turns the AC side of this into essentially wiring a light switch - just grab some Romex and go - and lets me worry about the DC side.

This project, by the way, isn't something for your kitchen - it's an art installation. Aside from setup and tear down (where it'll be unplugged), the backside won't be accessible. Not to say I won't 'be covering every shiny bit with electrical tape, but people aren't exactly going to be sucking on the wires either.

And to be frank, if I didn't fully appreciate the dangers of AC, I wouldn't be here asking about it.

Hello everyone,
In the blog "Txapuzas Electrónicas" there are two available circuits
http://txapuzas.blogspot.com/p/indice-de-txapuzas-electronicas.html

Relay output card

and

Power control with triac (8 levels of regulation)

The blog is in Spanish, but well documented.

Regards

Robert M:

Go back and carefully read reply #6. There's no way you are going to build your own reliable and safe triac controller for the price of a solid state relay.

See if you can find a 'hamfest' in your local area. These are basically electronics flea markets. You should be able to find reasonably priced soild state relays by the dozens. Don't be afraid to purchase 'takeouts' - devices removed from equipment. I bought some 240v/20A ones for my home heating system about 30 years ago and they are still working perfectly.

Don