Maker Pro
Maker Pro

Choosing TRIAC and optocoupler

Yalp

Nov 27, 2015
1
Joined
Nov 27, 2015
Messages
1
Hello,

I am busy with a project wich i need some help on. I want to dim a lightbulb connected to 230 VAC. I am creating the dim effect with an ATtiny13 using PWM. (the code is written is assembly).

Now i want to connect the output of the ATtiny13 to a optocoupler and than the optocoupler to a TRIAC. And then connect the TRIAC to the 230 VAC to the lightbulb.

Can anyone suggest the optocoupler and/or TRIAC i can use for this purpuse?

Thanx!
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Now i want to connect the output of the ATtiny13 to a optocoupler and than the optocoupler to a TRIAC. And then connect the TRIAC to the 230 VAC to the lightbulb.
This will not work. AC mains cannot simply be pwm modulated. You need to synchronize the control signal with mains. Here's an application by microchip. An Attiny can be used in the same manner.
Note that the controller here at mains potential, no optocoupler is required.

A circuit where the microcontroller is completely isolated from mains can be built, but you will need a zero crossing detector to synchronize the controller to the mains frequency and phase. You then dim the light by delaying the turn-on time of the triac according to the phase shift required, just as in a conventional dimmer.

Here's acircuit that uses a 555 for dimming. You could replace the 555 by your µcontroller and suitable software.

Note that in both circuits there are parts that are at mains potential!

The choice of triac depends on the load current Any 600V xxA type will do (xxA >= 2*max lamp current).
For optocoupler any component with suitable voltage rating will do.

Note: You're working with mains. This is potentially lethal. Take any necessary precautions, better yet have an experienced expert check your circuit "in situ" to minimize risk.
 
Top