0
\$\begingroup\$

enter image description here

I have this zero crossing detection circuit, and it does detect the zero crossing. The problem is that the output signal is a bit sinusoidal than expected, and voltages around 2 V where it's neither logic high/low would sometime cause my microcontroller to read falsely, reading HIGH at an earlier state during the rising up.

Is there any way I could sharpen the rise or fall time of the signal? Hopefully only using basic components (resistor, capacitor, transistor)? If possible, I don't want to order and wait for new components to arrive.

The bridge rectifier is KBL608 and the optocoupler is PC817C

enter image description here

It would seems that the optocoupler is not "fully opening"

\$\endgroup\$
1
  • \$\begingroup\$ fully opening ... what does that mean? ... conducting or non-conducting? ... please do not use vague terms \$\endgroup\$
    – jsotola
    Commented Aug 3 at 15:27

3 Answers 3

2
\$\begingroup\$
  1. Allow enough LED current through the optocoupler. 1MΩ series resistor is too large, I think. Decrease it to a few tens of kΩ (e.g. 100k).
  2. Load resistance (transistor-side of the optocoupler) interacts with the output capacitance and they together determine the rise and fall times. Check the datasheet for rise and fall times and the measurement conditions of these parameters.
\$\endgroup\$
3
  • \$\begingroup\$ datasheet say it has a rise/fall response time of 18useconds at worst. will try lowering the 1M ohm though \$\endgroup\$
    – DrakeJest
    Commented Aug 3 at 6:43
  • \$\begingroup\$ Okay lowering it to 100k Ohms definitly may it veery sharp compared to the previous one. \$\endgroup\$
    – DrakeJest
    Commented Aug 3 at 7:03
  • \$\begingroup\$ @DrakeJest yes, 18µs at what current? What current (and load resistor) are you using here? Given the timing figure in the datasheet, is there reason to doubt the 18µs figure applies to this situation? \$\endgroup\$ Commented Aug 3 at 9:49
2
\$\begingroup\$

There are many ways to do zero-crossing detection. The choice of method will depend on many factors including: ac voltage range, safety, sensitivity, response time, current budget available, etc.

One method to improve sensitivity & speed is to increase the foward current in the LED. This can be done without incurring a high power loss by using a capacitor rather than a resistor (R5 on your schematic).

This is one of the best resources on this topic:

https://sound-au.com/appnotes/an005.htm

\$\endgroup\$
2
  • \$\begingroup\$ To the down-voter: why? I cannot offer firm advice since the OP does now allow me to ascertain which design parameters are higher priority. A solution is non-trivial, as the link I provided will explain. \$\endgroup\$ Commented Aug 3 at 7:02
  • 1
    \$\begingroup\$ Indeed, I covered much more detail on the previous question, electronics.stackexchange.com/questions/721225/… including some range of design parameters, but none were offered in the question or comment; so too here. \$\endgroup\$ Commented Aug 3 at 9:47
2
\$\begingroup\$

For fixing ideas, take a look at this optocoupler.

It introduces a delay of some 500 us.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.