Selecting Proper Triacs, Etc. for Project in Devel

Hi! New Arduino user here. Just ordered a kit that I hope to receive in a week or two.

I’m no electronics expert, though I have some experience with soldering and general tinkering, and can figure out most things by reading and following tutorials. I do, however, have some questions I’m hoping the real experts here can help me out with.

My project, which is entirely aesthetic, involves a series of light bulbs that will animate in different patterns. The bulbs will be wired in 5 “channels,” with a certain number of bulbs in each channel, allowing me to make them chase, flash in sequence, etc.

The controls for the project will be as follows:

  1. A momentary button that, when pressed, will sequence through a number of animated patterns.
  2. A pot that will control the speed of the animation.
  3. A pot that will control the brightness of the bulbs.

I understand that I’ll need to use triacs to switch the bulbs, with opto-isolators to protect the circuit board. I also understand that brightness can be controlled through something called pulse-width modulation (PWM), though I don’t totally comprehend it yet.

I’m confident that I can program the animated patterns, but how I’ll integrate the dimming just yet, I’m not sure.

Now, I’m not asking for all this to be explained right now, or for anyone to design the circuit for me. I’ll work things out as I go and ask questions when I get stuck. However, keeping all of the above in mind, I need someone to help me make sure I purchase the proper components before I start trying to put them together.

To begin, I’m not sure what specs to look at when selecting triacs. As there will be upwards of 100 watts per channel at 120v (about .8A), with one triac for each channel, what triac should I be looking to purchase? Please keep in mind that I’ll want to control the brightness with some degree of reliability, and I’m sure one or more of the specs will affect that.

Also, what opto-isolator would be appropriate for said triac, and what kind of pots would be appropriate for 2 and 3 above?

If there’s anything else you think I should keep in mind, please let me know.

Thanks for the help!

In order to dim AC-powered lamps, you can't just PWM a triac. You'll need to detect the AC zero crossing, wait a period of time (the longer you wait, the less on time) and then fire the triac, which will conduct for the remainder of the half-cycle. Do the same thing at the next zero crossing ad infinitum, and now you're dimming! There are numerous microcontroller-based dimmer projects out there that should help you get started. If you want to start a bit simpler, you can use DC-powered lamps and PWM a transistor.

and what kind of pots would be appropriate for 2 and 3 above?

You should use 10K pots wired directly into the analogue input (wiper) with the two ends connected to +5V and ground.

You would be better off looking an a solid state relay with a dimming option for control of the AC lights. Building your own is not recommended for beginners as you have very un forgiving mains voltages flying about.

Great, excellent information! Now I'm getting somewhere.

From what I understand, though, SSRs are considerably more expensive than triacs and I need to keep the cost down. Plus, I'll be working with limited space. Besides, while I'm a beginner with Arduino and PICs, I do have a bit of experience with electrical wiring and working with mains voltage, and am very safety-conscious when it comes to these sorts of things, so I'm perfectly confident working with such.

I've been skimming some discussions on dimming AC current, and from what I gather, you can use the opto-isolator to detect the zero crossing; is this correct?

However, I'm still a little confused by the specs listed for triacs and OIs. It would be a tremendous help if someone could recommend a couple of part numbers for me that will handle what I'm looking to do; that way I won't discover I've got the wrong components in the middle of developing the project.

SSRs are considerably more expensive than triacs and I need to keep the cost down

You swap expense for safety and convenience.

you can use the opto-isolator to detect the zero crossing; is this correct?

You see asking questions like that makes me question if it is really a suitable project for your level of experience.

With phase angle modulation of a triac you have to delay a little after the zero crossing before you fire the triac. While you can do this with software reading a zero point into a micro you are far better off using a simple RC network and a DIAC to generate the trigger. You can then use the opto coupler to in effect pre charge the capacitor and reduce the time constant under software control.

The other problem is that when the triac switches there is a sudden inrush of current that can cause RFI (radio frequency interference) that can cause the circuit and other close by to malfunction. So you need suitable snubber circuits to prevent this from happening.

Again look around for some circuits there are plenty around on the net.

As to triac type they are much of a much ness, especially if you are only dealing with 120V. Remember this is 120V RMS and voltage ratings are in peak volts, so convert to peak first and then give at least 50% extra margin. The same applies to current ratings, in fact I would go with closer to 75% de rating on the current.

You swap expense for safety and convenience.

Yes, I get that. But I can't dismiss expense that easily. Multiply the number of SSRs I'll be needing (not just 5 as suggested above, but 5 times several units) and the cost quickly skyrockets.

The only SSRs available at Digi-Key, which I believe match my needs, are $12.20 apiece (CC1159-ND). This is an impossible cost. However, it's entirely possible I was not looking at the right ones. Do you have a better suggestion?

If I can't cut that cost down, I'll have to go the triac route.

You see asking questions like that makes me question if it is really a suitable project for your level of experience.

And I'll probably ask a lot more that you'll consider naive. However, this is the project I have before me; I don't have a choice. And I've learned that I can do just about anything I set my mind to, as long as someone is willing to help point me in the right direction. Besides, I thought your concern was over my working with high voltage and not the complexity of the project. The former, as I've said, should not be a concern. As for the latter, I don't let complexity act as an obstacle to my goals.

I am more than willing to read plenty of tutorials and discussions, and to review circuits to determine how to put things together. What I'm asking for right now is help in purchasing the right components (at the lowest cost, incidentally) to eventually get where I'm going. That way, I don't run into trouble down the road all because I bought the wrong thing.

Here is an application note that will be helpful to you: http://www.fairchildsemi.com/an/AN/AN-3006.pdf