Could anyone give me advice on this zero cross detection circuit I'm working on to allow for phase angle detection?
Just to add I'm only a student so I'm very much still learning. My background is electrical by nature, electronics is relatively new.
I've built the circuit and have included pictures of the output waveforms, yellow is voltage, current is blue. The AC ground 0 V and DC ground 0 V are separated in the physical build, that's why the ground references are different in the schematic.
When the circuit is connected as per the circuit diagram, the output square waves are as the output 1 picture. The voltage wave form is as expected but the current waveform is constant regardless of the current transformer output. It always has that pulse near the falling edge of the voltage waveform regardless of the load sensed through the current transformer/sensor.
When I invert the current transformer inputs to the comparator, the waveform is as the output 2 picture. It seems to work right, but I think that I might have just inverted the waveform by 180° by putting the larger input into the inverting pin of the comparator.
The only difference in the circuit diagram and the physical circuit is the current transformer in the physical circuit isn't grounded to a specific 0 V like it shows in the circuit diagram. I'm not sure what to do with that, if it should be connected to the same 0 V as the voltage transformer or not.