im looking to control some 120v ac circuits with my arduino and i was looking in to the ssr and triacs, from my understanding a ssr is a opto isolator and a triac in one package right? is the opto isolator nessesary or can the arduino drive a triac directly. this will be just for on/off, no dimming
I'd absolutely use opto-isolation, either as a discrete component or as part of an SSR. Many SSRs are opto-isolated, but not all. SSRs come in AC and DC versions, the latter often employing MOSFETs. If I went with an SSR, I'd be paying close attention to the datasheets. An isolator similar to something from the MOC30xx family and a discrete TRIAC is also perfectly reasonable.
Get an SSR specified for controlling AC, with a current rating high enough for the job. If the load is inductive (e.g. a motor), make sure the SSR is specified as suitable for inductive loads. Coupling an opto isolator to a triac yourself isn't easy because you need a power supply for the triac gate drive.
You absolutely must use isolation between the Arduino and a triac, otherwise there is the danger that the Arduino will become live.
dc42:
Coupling an opto isolator to a triac yourself isn't easy because you need a power supply for the triac gate drive.
???
OK, I was thinking about ordinary opto isolators, I didn't realise that opto triacs were inexpensive and readily available. Thanks!
Yep, they're handy critters. That particular datasheet is for the random-phase variety, there are also types with zero-crossing detectors built in.
There are many ways to skin a cat, morover loads of cats to be skinned....
If you scrap box only has SCR's insert a bridge rectifier in the load circuit with AC terminals emulating MT1 and MT2 of the triac example, and place the SCR across the DC side Anode to Bridge + and Cathode to Bridge -. A diac used for the gate trigger can be fashioned out od 2 transistors, a 2N3904 and a 2N3906
SCR.pdf (13.2 KB)
And before anyone gets the urge to say the transistors are in backwards, they are not! The circuit is using the VRBEB which is typically 7 VDC to emulate a diac. The transistors have a hfe of around 5 when using the E-B junction to serve as C-B junction. A 2N3904 or 2N3906 makes a good 1/4 watt zener in a pinch when you can accomodate for a variation in zener voltage.