I have built the circuit shown below.

The problem is that the circuit only works when I connect oscilloscope probes between node-A and the ground.

If I remove or decouple the probe-ground from the circuit ground then circuit does not work. I have ensured that all grounds are intact.

IC U5 is a TL082 op-amp being used as a differential amplifier. U6 is LM393 op-amp comparator circuit being used as a zero crossing detector.

Do I need to use a decoupling capacitor? I think I do not need a decoupling capacitor because the circuit starts working as it should the moment I connect the probe-ground wire to the circuit ground.

Any clue what mistake I am making?

enter image description here

After the first 5 comments, I am updating the circuit as follows. The components in red show my understanding after comments.

enter image description here

  • 1
    \$\begingroup\$ Can you please explain, what the function of R10, R11, D1 and Q1 is? I assume, the circuit will work if you remove them all and directly connect the ATmega input to R9/U6. \$\endgroup\$
    – Jens
    Commented Jun 25 at 18:09
  • \$\begingroup\$ R10, R11, D1 and Q1 are making the zero-crossing detector that invert as needed. D1 is bakers clamp (just to speed up) \$\endgroup\$
    – UTs
    Commented Jun 25 at 18:15
  • 1
    \$\begingroup\$ There's not a single supply bypass capacitor in the circuit. Also is the output of a TTL 74LS14 compatible with AVR CMOS input? \$\endgroup\$
    – Justme
    Commented Jun 25 at 20:10
  • 1
    \$\begingroup\$ Component values would be rather helpful. \$\endgroup\$
    – Finbarr
    Commented Jun 25 at 20:26
  • 2
    \$\begingroup\$ What does "does not work" mean? How does it behave exactly? \$\endgroup\$ Commented Jun 25 at 20:58


Your Answer

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