Maker Pro
Maker Pro

How do I implement firing of triac using microcontroller?

arisu1love

Oct 26, 2010
10
Joined
Oct 26, 2010
Messages
10
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?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Software? To create a pulse you turn on an output and then turn it off again.

Hardware is more difficult. Google MOC3021
 

arisu1love

Oct 26, 2010
10
Joined
Oct 26, 2010
Messages
10
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?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
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?
 

arisu1love

Oct 26, 2010
10
Joined
Oct 26, 2010
Messages
10
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.
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
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.
 
Top