I am working on a zero crossing detector circuit. Can anyone please explain the function of highlighted circuit?

schematic diagram

  • 4
    \$\begingroup\$ Please edit your question to include a credit to the author of the circuit you have posted. This is site policy. \$\endgroup\$
    – Transistor
    Jul 23, 2020 at 8:48
  • 2
    \$\begingroup\$ Hi! If you're new to circuits, this might be impossible to explain without giving you a complete introduction to electronics, linear and nonlinear electrical networks. That would render this question into something that takes a year from university students! Can you try to narrow it down? \$\endgroup\$ Jul 23, 2020 at 8:50
  • 1
    \$\begingroup\$ A very warm welcome to the site. As you can appreciate, it's not a free design house or on-line technical encyclopedia, copied out to people on demand. People will help you take the next step once they understand that you've got as far as you possibly could on your own. Please edit your question and add text explaining your situation, why this problem exists and your own work and own findings so far in considerable detail. The better the quality of question, the better the quality of the answers you will attract. Again, welcome. \$\endgroup\$
    – TonyM
    Jul 23, 2020 at 10:11
  • \$\begingroup\$ and please also explain the working of diode connected between emitter and base? \$\endgroup\$ Jul 23, 2020 at 10:23
  • \$\begingroup\$ In short, the circuit pulses the LED at zero crossing. What part of the circuit you need help with? \$\endgroup\$
    – Justme
    Jul 23, 2020 at 10:37

3 Answers 3


Q1 and D5 act as a pair of anti-parallel diodes allowing current to flow both ways through C1

when C1 is charging the current flows through D1, when discharging through Q1s base to it emitter.

This discharging turns on Q1 lighting the LED

The claim that this is a precision zero crossing detector seems dubious.


D1-D4 form a bridge rectifier that will charge C1 up to about 1/20th of the peak voltage of the incoming AC power. (R1 + R2 are 440K, R3 is 22k 440/22 = 1/20).

During this time that C1 is charging the current will flow through C1 and through D5. This will reverse bias the base emitter junction of Q1 so it will not pass any current.

For a short period at the the end of each 1/2 cycle of the incoming AC the voltage will will drop to a low value and C1 will start discharging into R3 via the base emitter junction of Q1. (The emitter will be negative with respect to the base). This in turn will cause a pulse of current to flow in the collector of Q1 through the optocoupler LED from C1 (which is still charged at this time).

The pulse of current will cause the output transistor of the opto-coupler to draw current and cause the output voltage to pulse to ground for a short time (500us-1ms).

These pulses will be centred on the zero-crossings of the input signal.


Here's a simulatable version of the circuit:


simulate this circuit – Schematic created using CircuitLab

The key thing to note here is that the charging time constant (when Q1 is cut off) is controlled by R3, and at 220 ms, is much longer than the half-period of the line frequency. Therefore, C1 spends most of its time charging, and only discharges during the brief dips in Vrect around the zero-crossings. As Jasen notes, Q1 conducts and turns on the LED only when C1 is discharging. (R3 provides the base current for the transistor.)

The output current pulses are pretty much centered on the zero crossings, so I'm not sure about the "precision" part of the description. To me, a "precision" circuit would have either the leading or trailing edge of the output pulse precisely aligned with the actual zero crossing.


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.