In a Grid Tie Inverter design, I need a circuit which can detect only one zero crossing of the Grid signal, (when the signal will change from negative to positive half cycle). I have made a circuit, which detects both the zero crossings. So please guide me, that which circuit will perform this function? I have made the circuit attached herewith, but it detects both the zero crossings.

enter image description here


1 Answer 1


You could use any safe method of illuminating an LED directly from mains which only conducts on one of the half cycles.

Two common arrangements are:


simulate this circuit – Schematic created using CircuitLab

The LEDs represents the LED in the optocoupler.

The diodes are included to protect the LED from reverse voltage on the other half-cycle. You have to be careful in selecting the resistor value and the protection diode.

Target just a few milliamps -- perhaps even just 1 mA -- for the LED current. Also remember to do a power dissipation calculation for the resistor. You may need to go to a 1/2-watt resistor or use two resistors in series.

  • \$\begingroup\$ Thanks Mr. ErikR for your reply, but this circuit will not do that job, because the led will be on during the whole positive half cycle, so there would be a pulse equal to the duration of half cycle. I need a circuit which will generate an impulse, when the zero crossing before starting the positive half cycle appears. \$\endgroup\$
    – Kamranmu
    Commented Jun 8, 2021 at 17:54
  • \$\begingroup\$ Usually events are described by transitions from HI to LO or LO to HI. A microcontroller, for instance, can generate an interrupt when a certain transition occurs on an IO pin. To translate an edge transition to a pulse look up "monostable multivibrator", for instance here. There are a lot of other implementations -- they are also called "edge detectors". \$\endgroup\$
    – ErikR
    Commented Jun 8, 2021 at 18:20
  • \$\begingroup\$ In fact, the circuit does generate a pulse -- the pulse is about 1/100-th of second long (assuming 50 Hz). If you want a different pulse length look up monostable multivibrator / edge detector circuits. \$\endgroup\$
    – ErikR
    Commented Jun 8, 2021 at 18:24

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.