1
\$\begingroup\$

I am using a µC running DDS algorithm to synthesize certain waveforms (in fact I made 3 channel music generator with portamento&ampltude modulation effects, commands for changing waveforms etc. but that is not relevant to the question). The output from µC is 15686.27 Hz (8e6/510) PWM signal with variable duty-cycle. I am updating duty-cycle from a lookup table to generate the desired waveform at desired frequency and then the signal goes to the low-pass RC filter.

The output from RC filter has +2.5V DC offset and 2.5V amplitude (absolute peak values are 0 and +5 V). I've connected that signal to 50k trimmer acting as voltage divider to reduce the signal to +1.5V offset and 1.5V amplitude so I can use LM324 in voltage follower configuration to drive the load. I reduced the voltage because LM324 with 5V single supply can't go above about 3.7 V. This is the signal going to LM324:

Input signal

The settings are: DC coupling, 1V/DIV, 2ms/DIV. Sine wave frequency is 329.6 Hz (tone E4).

Waveform at the output of the voltage follower (LM324 output shorted with the inverting input) of course looks exactly the same (with or without resistive load).

The problem occurs upon inserting the AC-coupling capacitor to remove the DC offset, this is the waveform at the output of the op amp with 100 Ohm load AC-coupled with 470 µF capacitor:

Waveform after inserting the AC-coupling capacitor

And here is the waveform after the capacitor:

Output after the capaciotor

The DC bias is now removed.

Now, I am aware why this clipping would occur with single transistor emitter follower (common collector configuration). Here is the detailed explanation whay clipping happens when using AC with single transistor voltage follower. The explanation is unfortunately too long to insert the text into the question but this is well known fact - the problem is transistor cannot sink current during the negative half of the waveform.

However, since LM324 can reach 0V using 5V single supply I thought there wouldn't be clipping but there is.

By increasing the load resistance the clipping decreases, here is the waveform with 10k load:

Waveform with 10k load

And even better result with 15k load:

Waveform with 15k load

However, I need undistorted signal with 100 - 200 Ohm load (4 Ohm speaker + resistor) and the question is if there is a way to get rid of the clipping without using a high input impedance amplifier.

I might put another op amp behind the capacitor to prevent clipping (because the input impedance would be very large) but then I'd have to use dual supply because of already removed DC bias. Is there a simple way to avoid the negative clipping in such configuration?

EDIT:
The schematic:

schematic

simulate this circuit – Schematic created using CircuitLab

UPDATE:
Output from TL084 in place of LM324:

enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ Post your schematic. \$\endgroup\$ – JRE Mar 5 '17 at 20:04
  • \$\begingroup\$ Here you are the schematic. \$\endgroup\$ – Chupo_cro Mar 5 '17 at 20:28
  • \$\begingroup\$ Have you tried a TL084 ? \$\endgroup\$ – skvery Mar 5 '17 at 20:37
  • \$\begingroup\$ Looks like the LM324 is just a bad match for your task. \$\endgroup\$ – JRE Mar 5 '17 at 20:43
  • 1
    \$\begingroup\$ If you have a look at LM324 datasheet, you will notice output sinking current is much lower than output sourcing current. This is why it clips on the negative side. Also, your 100R load is way too low for this opamp to work. \$\endgroup\$ – peufeu Mar 6 '17 at 9:03
3
\$\begingroup\$

You'll never get am LM324 to do what you want so why not bite the bullet and use an LM386. It's minimum supply is 4 volts and at 5 volts can produce 4 volts peak to peak. It's intended for audio applications as well and can drive a 4 ohm load (or greater): -

enter image description here

Read the data sheet if you want more details and other application circuits.

\$\endgroup\$
  • \$\begingroup\$ Yes, thank you, I am aware of using LM386 as dedicated low power audio amplifier but I was curious if there is a way of dealing with negative clipping when using this very specific configuration (op amp as voltage follower). There is another wonderful low power audio amp IC, LTK8002D. It is class AB audio amplifier with supply range from 2 to 5V giving 3W of power at 5V and 4 Ohm. Unfortunately seems it is hard to find, I desoldered one from a cheap BT speaker. \$\endgroup\$ – Chupo_cro Mar 6 '17 at 11:22
  • \$\begingroup\$ @Chupo_cro unfortunately you won't get the LM324 to perform as you want with such a low overall load impedance and adding a buffer transistor will lose 0.7 volts in the peak-to-peak amplitude. The LTK device is a bridge amplifier and doesn't produce a ground referenced output so I suspect you wouldn't be able to use it anyway. \$\endgroup\$ – Andy aka Mar 6 '17 at 12:04
  • \$\begingroup\$ Horses and water Andy, horses and water. \$\endgroup\$ – JIm Dearden Mar 6 '17 at 12:31
  • \$\begingroup\$ Yes, you can not make a horse drink :-) I did not say I will not use LM386, in fact I probably will. And if in a few days someone doesn't find a solution by modifiying the LM324 voltage follower circuit (which probably will not be the case) then I will mark this answer as accepted. \$\endgroup\$ – Chupo_cro Mar 6 '17 at 17:01
  • \$\begingroup\$ LM386 with 5V supply and 4 Ohm load can produce only about 2.4 V peak-to-peak (according to the datasheet and confirmed with an oscilloscope). \$\endgroup\$ – Chupo_cro Mar 22 '17 at 21:35
0
\$\begingroup\$

The problem is your LM234 may be able to drive 0 volts when it doesn't have to supply any current but it can't get down to zero while sinking current.

What you need to do is use a BIAS point that does not result in the op-amp output going to zero. Rather than working with a 1.5V amplitude and a 1.5V bias try working with a 1.5V amplitude and a 2.5V bias. You can do this by connecting the bottom of your "signal level control" pot to a mid-rail voltage divider rather than connecting it to the ground rail.

You may also need to use a different (higher current drive and/or able to get closer to the rails) op-amp.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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