Connect with us

How do I implement firing of triac using microcontroller?

Discussion in 'Microcontrollers, Programming and IoT' started by arisu1love, Nov 13, 2010.

  1. arisu1love

    arisu1love

    10
    0
    Oct 26, 2010
    I am doing a project where I am using a microcontroller in order to send a pulse to fire a triac. The MCU I am using is from the freescale HCS12 microcontroller family. I would like to know, what software method can I use to send a gate current pulse signal from the microcontroller to the triac?
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,214
    2,695
    Jan 21, 2010
    Software? To create a pulse you turn on an output and then turn it off again.

    Hardware is more difficult. Google MOC3021
     
  3. arisu1love

    arisu1love

    10
    0
    Oct 26, 2010
    actually I plan to use the HCS12 microcontroller to fire the triac. however i am stuck in terms of how to program the microcontroller to output a gate pulse during each ac half cycle. Do I use pulse-width-modulation to obtain the gate pulses?
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,214
    2,695
    Jan 21, 2010
    The easiest way is to detect zero crossings and then use a timer to determine when you want the pulse to start.

    It may be useful to look at the timing between subsequent zero crossings so that you can determine if you're operating with 50 or 60Hz mains (if that is an issue).

    I still think you should look at the MOC3021 or similar. Or is your entire circuit going to be at mains potential?
     
  5. arisu1love

    arisu1love

    10
    0
    Oct 26, 2010
    yes....the entire circuit is going to be at mains potential...I am still worried about connecting the input to detect zero crossing to the microcontroller though...The power supply to the microcontroller can be via an external DC source although I would prefer for it to be tapped from the mains

    Not sure if it is safe for the microcontroller pin to be connected to the mains line...although via resistors.
     
  6. Bluejets

    Bluejets

    3,542
    718
    Oct 5, 2014
    Look up circuit using a diac.
    No need for uC.
     
  7. Minder

    Minder

    2,876
    596
    Apr 24, 2015
    There is also Fairchild AN3006 for a 555 circuit,
    You can also use the same principle for a micro, see Triac app notes on Microchip site..
    And Fairchild AN3003.
    M.
     
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

-