# Circuit to detect only one zero crossing when a sine wave changes from negative to positive half cycle

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.

• What about a divide by 2 like this? Also, harmonics causing extra crossings may goof you up. How about half-wave bridge instead of full? Commented Jun 8, 2021 at 2:43
• circuitdigest.com/electronic-circuits/… Commented Jun 8, 2021 at 3:08

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.

• 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. Commented Jun 8, 2021 at 17:54
• 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". Commented Jun 8, 2021 at 18:20
• 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. Commented Jun 8, 2021 at 18:24