AC Zero-Crossing Detector Circuit Design Using Red Pitaya

by Sanyam_Arora in Circuits > Electronics

1473 Views, 0 Favorites, 0 Comments

AC Zero-Crossing Detector Circuit Design Using Red Pitaya

IMG_20220206_000848.jpg

AC zero-crossing detector

In alternating current, the zero-crossing is the instantaneous point at which there is no voltage present. In a sine wave or other simple waveform, this normally occurs twice during each cycle. It is a device for detecting the point where the voltage crosses zero in either direction.

There are two common methods used for zero crossing detection i.e. by using an Op-Amp or using Optocoupler.

Usually, an op-amp-based zero-crossing detector is used to detect zero-crossing of the applied ac signal in the circuit which hence increases the cost of BOM in the circuit, an Optocoupler based zero-crossing detection is an alternative to the solution providing isolation between ac mains and circuit without using a transformer thus decreasing the cost up to an extent.

Zero cross detector has wide application in the electronic world especially for switching, phase lock loop also in frequency counters and phase meters.

Here I am presenting a non-isolated zero-crossing detector testing using red pitaya. That would be very useful for commercial applications, as it is very cheaper compared to other methods.

*As this is a non-isolated method, proper safety measures are used when testing this. It is only useful when the appliance is using a non-isolated supply.*

Use of Red Pitaya 125-10 in the Application

F6UONC8KW6E9QD6.jpg
F6I53UJKV3TE24A.jpg

Red Pitaya Stemlab 125-10 is an effective replacement of big machinery with a wide application in academic, industries, research, and HAM radio fields. One can not only use it as an instrument but also as a versatile development board and powerful tool.

The board involves strong performance such as remote accessibility with a WEB app user interface accessible through Ethernet or Wi-Fi. The mass storage device for the operating system is a micro-SD card.

With some additional accessories like oscilloscope probes, logic analyzer probes, BNC-SMA connectors, wireless dongle, the device is completely ready to have our hands-on.

Red pitaya's function generator and oscilloscope feature made it possible for designing this without any costly instruments. Thanks to team Redpitaya for helping students like me by providing there devices at discounted prices.

​Working of OP-AMP Based Zero Crossing Detector

Zero-Crossing-Detector-Circuit-Diagram-using-Op-Amp.png
Output-Waveform-of-Zero-Crossing-Detector-Circuit.png

For every crossing, there is a saturation level of the output signal that changes from one to another. The op-amp comparator compares the reference voltage level with the peak level of the applied signal when a positive half of the sinusoidal signal appears at the input.

Vo = Vref - Vi ;

(Where the reference level is zero) hence

Vo = - Vsat.............(1)

Now, in case the circuit is dealing with the negative half of the sine wave we have;

Vo = + Vsat..............(2)

That is how the zero-crossing detector is able to detect the level of the applied signal.

The attached images provide the waveform and the circuit diagram using the provided schematics and components.

Red Pitaya is very useful for testing this circuit. We can directly check the output waveform using red pitaya oscilloscope feature, and can also trigger other circuits using Red Pitaya GPIO.

Working of Optocoupler Based Zero Crossing Detector

Zero-Crossing-Detector-Circuit-Diagram-using-Opto-coupler.png
Output-Waveform-of-Zero-Crossing-Detector-Circuit-using-Opto-coupler.png

An isolated Zerocrossing detector can also be made using a simple Optocoupler after a full bridge rectifier. Or by using special optocouplers available in the market which minimizes the cost of the full-bridge rectifier as they have LED in bidirectional inside it, like IL755 . This Optocoupler-based zero crossing detector is really useful when working with an isolated system. as it minimizes the cost of the transformer as well as reduces the size and BOM of the design.

But for a non-isolated system, it is not much use as it increases the cost without providing any useful feature.

Non Isolated Zero Crossing Circuit Detection and Testing.

circuit.png
Screenshot 2022-02-06 003500.png

A non-isolated zero crossing detector is a cheaper solution for detecting zero crossing in a circuit. It could be very useful for commercial appliances having a non-isolated power supply. As it reduces the BOM and cost of designing the circuit.

But designing a non-isolated circuit is very dangerous it can damage the testing equipments and can even electrocute the designer. So proper measures to be taken when working on circuits in direct contact with AC mains.

Here, Red Pitaya is very useful, with which I can mimic the AC mains using Red pitaya's function generator and can check the output of the circuit with its oscilloscope feature. Red Pitaya can also trigger GPIO using the input zero-crossing signal for testing and controlling other circuits.

For the zero-crossing detection, I used a common NPN transistor and feed it to the transistor using a resistor voltage divider with 200k and 4.7k in a common emitter configuration. The output was fine in the positive half cycle but didn't work properly in the negative half cycle.

So I attached a diode in reverse bias to bypass the negative cycle which gave me a good result.

Thanks

If you have any question, please comment it down below.