Zero crossing circuit with XOR

Thread Starter

Daniel Oliveira 3

Joined May 1, 2019
2
Deal all,

I'm trying to build a power factor measure with zero cross detection with LM 358 and a XOR gate but I'm lacking of electronic knowledge.
I already build the circuit as attached and stuck with some problems.

1) On the current side when the sine wave cross to the negative site it gives me an output on the Op-Amp, so I decided to put a diode to filter this negative part (see attachment "Circuit without diode").
2) I used the first diode that the simulator gave me 1BH62. The signal is perfect at the XOR gate (see attachment "Circuit with diode") and I can calculate the time and then get the power factor but I want to use some commercial diode like 1N4149 and it gave me no result for the current (see attachment "Circuit with 1N4149.)
3) I tried to put a pararel resistor with the value of 1k and it gave me a signal like a Ripple effect and it gave some difference between the signals (see attachment "Circuit with 1N4149_Resistor")

That said I'm out of options for what should I do since my knowledge about electronics is not something high. I don't want to simulate it with any value that give me a result because I need to build a prototype of my simulation.

Kind Regards,
Daniel Oliveira Barbosa
 

Attachments

crutschow

Joined Mar 14, 2008
34,464
Exactly what output do you want from the current and voltage detection circuits?

Note that you are connected directly to the 220Vac mains for the voltage detection and that is a safety hazard no-no.
Further discussions on that will not likely be allowed here.
You need to add an isolation transformer or opto-coupler.
 

Thread Starter

Daniel Oliveira 3

Joined May 1, 2019
2
Exactly what output do you want from the current and voltage detection circuits?

Note that you are connected directly to the 220Vac mains for the voltage detection and that is a safety hazard no-no.
Further discussions on that will not likely be allowed here.
You need to add an isolation transformer or opto-coupler.
I need to obtain a square wave from the LM358. The voltage signal from opamp is working as well but at the current transformer is not. I need the same wave from current and tension that I obtained at the picture with the diode 1BH62 using the 1N4149.

The purpose is getting the zero cross from both voltage and current and insert it at a xor gate to get the time and then convert to power factor
 

crutschow

Joined Mar 14, 2008
34,464
Below is the LTspice of your circuit, slightly modified.
I added Schottky diodes to ground to clamp the negative swing. and added a small amount of hysteresis to minimize any oscillations at the zero crossing due to noise.
The output is shown for a 20° phase-shift.

upload_2019-5-1_16-23-35.png
 
Last edited:
Top