6
\$\begingroup\$

I am trying to generate a sinusoidal PWM signal using analog circuits. I want to compare my sine wave and triangular wave using an operational amplifier (LM741) which has a rise time of 0.3 µs and slew rate 0.5 V/µs, which will good at 5 kHz theoretically. But I am not getting a good PWM output.

So I first tried to compare the sine wave with a reference voltage (2.2 volt). Sine wave amplitude = 2.5 volt (5 V peak to peak) and frequency 100 Hz and 5 kHz.

Enter image description here

  • At low frequency (say 100 Hz), the output is good
  • At high frequency (say 5 kHz), the output is too bad.

Enter image description here

Enter image description here

What will be the problem...

If the response is the problem of the comparator, but the slew rate is 0.5 V/µs.

Calculation of slew rate for a sinusoidal signal...

Slew rate= Vm * 2pi * Frequency

     = 5 V * 2pi* 5000 Hz

     = 1570796 volt per second or 0.15 V/µs

Theoretically the slew rate of 0.5 V/µs will be OK for a sinusoidal signal of 5 kHz and 5 volt peak to peak. But in my case the signal is distorted.

Where am I wrong?

\$\endgroup\$
8
  • \$\begingroup\$ It looks like there's a significant lag/delay in the output's response w.r.t. the input signal (~30µs?). What may be causing this? What's connected to the output? 'Scope probe only? \$\endgroup\$
    – JimmyB
    Apr 5, 2019 at 11:00
  • 5
    \$\begingroup\$ Why you shouldn't use the 741. \$\endgroup\$
    – JRE
    Apr 5, 2019 at 11:16
  • \$\begingroup\$ For 5Khz i thought 741 will be ok, for what i calculated .Orelse sure i will change the opp amp which having high slew rate and i will update it.......@JRE \$\endgroup\$
    – Bud
    Apr 5, 2019 at 11:26
  • 1
    \$\begingroup\$ You're latching up. \$\endgroup\$ Apr 5, 2019 at 12:34
  • 2
    \$\begingroup\$ Note that this question is about the theory behind the calculations. Telling OP to change his OP-amp does nothing to answer the question. It just solves the problem without OP knowing why. \$\endgroup\$
    – pipe
    Apr 5, 2019 at 19:58

5 Answers 5

11
\$\begingroup\$

The recommendations for you are very simple.

  1. Use a comparator for this application instead of an opamp.

  2. Select a newer part that operates with orders of magnitude faster response time.

It would be the very best thing if the 741 could be eradicated from face of the earth.

Here is what can be achieved with the venerable LM393 at 5kHz. The shown circuit will work even up to about 50kHz before the delay of the LM393 starts to distort the PWM duty cycle.

enter image description here

enter image description here

\$\endgroup\$
13
  • \$\begingroup\$ Sure friend i will change the opp amp or by using comparator, i will update the data soon. \$\endgroup\$
    – Bud
    Apr 5, 2019 at 11:33
  • 1
    \$\begingroup\$ @Nihal - If you show some new results in the question do not delete your original material, Instead add it as an update at the end. The reason for this is that hopefully this question can be a reference to future readers that are looking for information as being discussed here. If you delete the original material the answers here would no longer make much sense to a future reader. \$\endgroup\$ Apr 5, 2019 at 11:47
  • 1
    \$\begingroup\$ "It would be the very best thing if the 741 could be eradicated from face of the earth." ok - I'll bite. what's your reasons? \$\endgroup\$
    – UKMonkey
    Apr 5, 2019 at 15:35
  • 2
    \$\begingroup\$ @UKMonkey the 741 was first released in 1968. And while it was a fantastic IC at the time, there are vastly superior op-amps available with lower input offset voltage, higher bandwidth, higher input impedance, etc. Most people lean the "ideal op-amp" first, and then immediately jump to one of the most non-ideal op-amps in practice, and wonder why their design doesn't work. \$\endgroup\$
    – CurtisHx
    Apr 5, 2019 at 16:10
  • \$\begingroup\$ LM741 might still be in the textbooks... \$\endgroup\$ Apr 5, 2019 at 16:19
4
\$\begingroup\$

Opamps work slowly with low power supply voltages. In addition they are designed to work in linear region. As saturated, like in your application, the response has an unpredictable dead time. before the internal saturation is vanished.

I can only repeat what's already said: Get a comparator. 741 was a remarkable step forward half a century ago, but things have developed better since those days.

\$\endgroup\$
3
  • \$\begingroup\$ Thank you for your response friend, i will update it after changing the opp amp. \$\endgroup\$
    – Bud
    Apr 5, 2019 at 11:29
  • 2
    \$\begingroup\$ @Nihal Comparators have other precautions. They are high speed circuits like logic parts. You must have acceptably short wires and coupling capacitors between supply voltage inputs. Making the circuit with 0,5 meter long wires onto a breadboard without coupling caps (I have seen those attempts) will be useless. \$\endgroup\$
    – user136077
    Apr 5, 2019 at 11:39
  • \$\begingroup\$ Ok friend I will even buy a comparator and I will check with it. \$\endgroup\$
    – Bud
    Apr 5, 2019 at 18:34
1
\$\begingroup\$

Op-amps are susceptible to latch-up. Recovering from saturation at the rails is not an automatic thing. The ratings you are reading a for the op amp working in a feedback mode, not an open loop mode. You would need to find an op amp designed to minimize latch-up, or better yet, when you need a comparator, buy a comparator.

\$\endgroup\$
1
1
\$\begingroup\$

[modified to run on +9/-6 volt rails] You may try this, if you want a discrete solution. The delay, without input protection resistor, should be about 20 nanoseconds.

schematic

simulate this circuit – Schematic created using CircuitLab

The speed will be limited by Rin (10Kohm) and a minimal Miller Effect Cin (20pF?), thus propagation delay will be about 0.2 us (200 nanosecond).

\$\endgroup\$
2
  • \$\begingroup\$ What is it? A Schmitt trigger? \$\endgroup\$ Apr 5, 2019 at 16:21
  • \$\begingroup\$ The differential pair is biased at VDD/2. R8 does provide 1% positive feedback, to reduce the risk of oscillation during the linear region. Notice I included over-voltage protection. \$\endgroup\$ Apr 6, 2019 at 3:28
0
\$\begingroup\$

Most garden variety op-amps have internal compensation in the form of a chip capacitor.

This makes them very slow, but more stable in analog circuits.

Why not use a cheap comparator like LM393?

\$\endgroup\$
1
  • \$\begingroup\$ Thank you friend it works good while using comparator LM339. \$\endgroup\$
    – Bud
    Apr 8, 2019 at 6:45

Your Answer

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

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