Connect with us

Choosing TRIAC and optocoupler

Discussion in 'Datasheets, Manuals and Component Identification' started by Yalp, Nov 27, 2015.

Scroll to continue with content
  1. Yalp


    Nov 27, 2015

    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?

  2. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    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.
    dorke and Tha fios agaibh like this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day