Continue to Site

# Zero crossing detector

Status
Not open for further replies.

#### akalii

##### New Member
Hi,
I want to use a zero crossing detector on my projet, i need help about the value of R1,R2 so i cant dammage the bridge (2W04G) and the optocoupleur(4n25).Im new to electronics so i have some issues on reading datasheet.

1) Go to the optocoupler's data sheet and read the LED's maximum continuous current.
2) Calculate the peak sinewave voltage Vpk = Vrms * 1.414
3) Use Ohm's law to calculate R from the above values. Use the next highest available value.
4) Calculate the resistors power rating. P= V^2/R Give yourself some margin and choose the highest resistor rating.
5) You did a safe thing in dividing R into two components R1, R2. Both which are R/2

Vrms is it 220 v ?

The peak value of the input sinewave sets the peak current through the LED. This is the most important thing to control for long-term reliability. Read the datasheet, run some numbers, and tell us your conclusions and how you got them.

Note: the higher the LED peak current, the narrower the output pulse centered about the true zero-crossing. BUT - also, the higher the operating current, the higher the power dissipation in the two resistors. It is a trade-off.

ak

Note: the higher the LED peak current, the narrower the output pulse centered about the true zero-crossing. BUT - also, the higher the operating current, the higher the power dissipation in the two resistors. It is a trade-off.

I'm curious why a higher peak current would result in a narrower pulse. Higher current means lower value resistors, which should allow the LED to turn on earlier in the sine wave cycle.

I'd also add a moderately high value resistor across the LED itself to discharge any residual voltage, eg. something that takes around 5% of the total LED drive current.

That should give a cleaner and more reliable zero pulse.

Note that if you need to synchronise to the AC polarity, you can use two optos (or a dual one) with the LEDs connected in opposite directions, eliminating the bridge rec.

I'm curious why a higher peak current would result in a narrower pulse. Higher current means lower value resistors, which should allow the LED to turn on earlier in the sine wave cycle.

Which is exactly what you want - the pulse is generated when the LED is OFF, so you want it ON as quick as possible.

Oh yeah. Zero-crossing. D'oh.

Oh yeah. Zero-crossing. D'oh.

It's sort of like thinking upside down

I want to use it for dimming a halogen lamp (220v ac)"