The triac should be OK but if you imagine what happens when the triac is turned off, the full AC is applied across R6 and C1. If C1 breaks down because of the high voltage it puts the full AC across R6 and it dissipates about 6W of power. The capacitor must be able to withstand more than 125V and importantly, it must be rated for that voltage AC. Most capacitor ratings are for DC only. If you can find an X2 class capacitor it would be safest to use.
The triac should be OK but if you imagine what happens when the triac is turned off, the full AC is applied across R6 and C1. If C1 breaks down because of the high voltage it puts the full AC across R6 and it dissipates about 6W of power. The capacitor must be able to withstand more than 125V and importantly, it must be rated for that voltage AC. Most capacitor ratings are for DC only. If you can find an X2 class capacitor it would be safest to use.
That worked.. You are right.... I replaced it with 2Kv cap.. and now it works..R2 doesnt burn now..
But i am missing something else now.
i am using following circuit for ZCD, When i use an opto coupler like SFH615 is it neccessary to use bridge rectifier ?.
Not necessarily. There are two considerations:
1. Its LED side can only withstand at most 6V in the reverse direction. It des not conduct in that polarity until it breaks down (damaged!) so the voltage has to be kept low.
2. In conducting polarity, the current has to be sufficient to operate the LED but not exceed it's maximum rating.
As shown, R1 limits the current and D1 conducts and clamps more than about 0.6V of reverse polarity so the LED only lights on one half of the AC cycle. That is OK as long as your MCU uses the rising and falling edges of the signal to know when that half cycle starts and finishes.
I would caution you that the values you are using are not well chosen. Consider that the brightness of the LED inside the SFH615 depends on the current flowing through it. If it isn't bright enough, the transistor will not conduct and nothing is detected. The AC waveform passes through zero and as the voltage rises, more current fllows and the LED gets brighter up to the peak of the voltage then to starts to dim again. The SFH615 is characterized to work best at 10mA LED current but even at the peak of the AC voltage the most current R1 will allow is (120 * 1.414)/220K = 0.77mA and it will of course be less at other times. I suspect your zero crossing detection may not occur until well after AC zero if at all. You also need to take into account the effect of C2 which will charge and discharge as the SFH615 stops and starts conducting, the PIC detects logic levels so the timing will be slightly delayed while C2 voltage rises to logic high and drops to logic low.
You can use a bridge rectifier but the method of detecting the zero crossing is quite different. With a bridge the LED lights on both half cycles so the only time it isn't conducting is when the AC voltage is too low to operate the LED sufficiently. You get pulses rather than the square wave of the circuit shown. There is no problem with that as long as the software knows which method is being used as the SFH615 output will be quite different. The same problem with current and rise/fall time will still exist though.