0
\$\begingroup\$

I have a simple drawing of ZCD by using potential divider to stepdown the voltage feeding to the inverting and non-inverting input of LM358N. enter image description here

The simulation result as below enter image description here

In practical, I connect my AC cord to the transformer as below that stepdown 230VAC to 12VAC. The model of the transformer as below. The AC cord I connected to 230 and 0V at the transformer input while transformer output, I connected 12 and 0V to feed to the 6K ohm resistor as the 1st circuit diagram above. The opamp is power by a 5V adapeter. When the AC cord connected to transformer and adapter are power on, the measured output waveform as shown below. I cannot even get a slightest glimpse on what going on in the circuit and why it differ so much from my understanding. For my current understanding, imagine the output of the transformer at the pin 12V function like a sine wave with 12sinwt. When wt=0, the noninverting input and the zero reference ground is 0, hence output is 0. when wt>0, non-inverting is bigger then the inverting reading which have 0 reference hence the waveform should be positive. When wt=180 degree, the difference is again 0 with reference to ground. When wt>180, the non-inverting input is negative value as compare to inverting input with 0 ground reference at transformer according to formula $$V_o=A(V^+ - V^-)$$. Hence output is negative value, but since the supply source is 5V to 0V, the output should be clipped at 0V since not able to go to negative value but why practical result shown entirely different result. The Opamp output should be zero at the negative half cycle but oscilloscope shown it as positive value?

enter image description here enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ From the scope images I can see that the output hits less than 0.5V. It supposed to be something around 3-4V. Are you sure that you applied the 5V supply to the op amp correctly? \$\endgroup\$ Commented May 25, 2022 at 13:04
  • \$\begingroup\$ Good observation, I'm too focus on the shape of the waveform . I'll redo the same experiment and update the result tomorrow \$\endgroup\$
    – chuackt
    Commented May 25, 2022 at 13:22
  • \$\begingroup\$ Parallel R2 with a 1N5819 Schottky diode to keep the input from going too negative. \$\endgroup\$ Commented May 25, 2022 at 14:30
  • \$\begingroup\$ Sadly, simulators do not model all aspects of simple components, let alone complex sub-circuits such as an op-amp. The standard EE rules apply: study the device datasheet, do not trust a simulator, and leave no stone unturned (learn and understand every detail.) A good intro to op-amps might be this by Tony Kuphaldt. \$\endgroup\$
    – rdtsc
    Commented May 25, 2022 at 14:42
  • \$\begingroup\$ I carry out the same experiment and got the phase reversal waveform as above so what suggested by Andy is correct. In this post electronics.stackexchange.com/questions/280099/…, the OP also encounter phase reversal waveform when feeding the input with negative voltage that exceed the range of supply. \$\endgroup\$
    – chuackt
    Commented May 26, 2022 at 16:39

2 Answers 2

3
\$\begingroup\$

When the input goes negative you are exceeding the input common-mode voltage range (as specified in the data sheet) and strange things will happen: -

enter image description here

In other words, your input is going below 0 volts and, that is a no-no for this op-amp. So, one of those strange things is that you will get input signal inversion (or phase reversal). This is a common problem with a lot of op-amps especially older ones. I suspect this is what you are seeing here.

Op Amp Output Phase-Reversal and Input Over-Voltage Protection: -

enter image description here

\$\endgroup\$
2
\$\begingroup\$
  1. You need V- = Vee supply to detect below ground due to Vcm specs otherwise bias input to +xx mV. otherwise nonlinear or faulty output.
  2. You need frequency doubler, edge-detector , or full diode bridge to detect a ZCS (ZCD)

There are dozens of good ways to use low voltage AC and even high voltage DC

But let's start with some specs 1st:

Vin 12 Vrms = 17Vpk 50, 60 Hz (f)
Vout 5V 1% duty cycle 100, 120 Hz (2f)
AC LPF filter f=0.35/T: T=RC = 1 ms , otherwise false pulses from noise.
Vac threshold, Vth <100 mVmin Vac in max 5Vpk, Vac max
Pulse width Tpw 1% to 2% of 2f
Rise time, Tr < 1/(1000*f)
DC supply 3 to 5V, load < 10mA (optional, passive option possible)

enter image description here

simulation

Alternative method with offline Reg.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.