Electrical – ZCD with LM358 not working

zero crossing

I've made this circuit to detect de zero cross but in out pin (pin 7) the voltage are about 3,7V fix. I've already measured pins 5 and 6 and the delta voltage ( vin+ and vin-) are inverting. I had inverted pins 5 and 6 and in this case pin7 is fixed in 0V.

Circuit:

Oscilloscope measurement problem:

–First Situation

Probe1 connected only:
enter image description here

Scope img:
enter image description here

–Second

Probe1 and 2 connected:
enter image description here

Scope showing perfectly the signals:
enter image description here

I've already tried to measure with other Scope (TDS 2002B) add caps on various places in this circuit. I will try to put this signal on uC INT pin to see if is a osc problem or a circuit one.

Best Answer

The LM358 is powered from 5 volts and you are forcing an input signal from the bridge that is rectifying a 12 V AC voltage. This usually means the LM358 will never work again.

The operational input range for the LM358 powered from 5 V is 0V to 3.5 volts. Try adding a potential divider to keep the voltage range between 0V and 3 volts then it should work as a comparator (Vbias2 should be set accordingly also within this range).