Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 14 of 14

Thread: very noisy differential amp setup

  1. #1

    very noisy differential amp setup

    Hi everyone,

    I am trying to build a Line-Out from my Teensy Synth. Since I am using a MAX98357A module for audio output, I can't use that to connect it to an external amp or line-in on a pc.
    I bought a couple of MCP6002 and tried to create a single ended output using this circuit:

    Click image for larger version. 

Name:	schematic.PNG 
Views:	36 
Size:	15.9 KB 
ID:	23321

    I get sound out but it is VERY noisy. The noise seems to be as loud as the sound itself. The audio output also seems to be overdriving the amplifier unless it is on a setting like 10% or something. I measured the output of the MAX98357A to be around 300mV AC with 2.6V DC.
    Since I don't have an oscilloscope the only way I can analyze the signal is by using my line in on the computer. Here I can see this image:
    Click image for larger version. 

Name:	pic.jpg 
Views:	28 
Size:	113.9 KB 
ID:	23322
    As you can see the waveform is anything but a sine, which it should be.

    Is there anything wrong with my circuit, did I pick the wrong parts?

  2. #2
    That 8 Ohm load on your output can't be making that opamp happy.

    If all you want to do is reduce the amplitude to drive a low level input then all you need are some resistors. But make sure that you don't have a common ground (via the AC safety ground usually) between the two systems.

    Also make sure that you have a load that the audio amp is happy with.

  3. #3
    Senior Member
    Join Date
    Jul 2020
    Posts
    927
    The MCP6002 won't do audio, far too slow(*). Its an ultra low power opamp, so the bandwidth and slew-rate are woeful.

    Your virtual ground reference network, the two 47k resistors, lacks decoupling, so there'll be loads of noise pickup,
    and some Johnson noise at their junction, which is being buffered by the bias opamp.

    Use two 10k resistors, and a few microfarads of decoupling to true ground.

    Most opamps are only rated to drive 2k or higher load impedances, some good ones can handle 500 ohms, but
    no low-power opamp will be that!

    If you are limited to 5V supply, then a good rail-to-rail audio opamp is needed, I've had success with the AD8656
    which has pretty good specs all round.

    Be sure to decouple the analog supply rails to the opamps well, if possible do not share with any digital circuitry,
    that's often audible.

    BTW what is the signal source? Its normally a poor choice to load a source down with low impedance to ground like
    that circuit. Thinking about this its a DAC output? 1k is a heavy load for most DACs.

    (*) Think 30MHz bandwidth, 4mA quiescent current per amp, 0.001% distortion at 1kHz, and if possible around 5nV/√Hz
    noise spec. Without good bandwidth low distortion isn't achieved...

  4. #4
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    847
    You might be better off just ordering this:

    https://www.pjrc.com/store/audio_ground_isolator.html

  5. #5
    Ok, so my main two objectives with this are:

    1. convert the differential MAX98357A output to single ended, to drive either headphones, or an external amplifier by AUX.
    2. boost the low frequencies a bit

    I searched for good 5V amps for audio and came up with this one, but I'll try to order the AD8656 if that's the better choice. Thanks for the pointers on what to look for in a good audio amp.
    About the 8 ohm load, that should only try to approximate my headphones. I have some LM386 lying around, which worked for headphone output, that's why I thought this amp would be fine as well.

    The output of the class d amp should be ok with 1k load. It powers my little speaker and that gets REALLY loud hooked up to it.

    I'll try to decouple. I only have the USB 5V available to power: Teensy, MAX98357A, my amp setup. So there is bound to be a lot of noise. I hope this is possible to decouple somehow.

  6. #6
    The above hints already helped a lot!
    I altered the schematic this way for the first stage:
    Click image for larger version. 

Name:	schematic2.PNG 
Views:	23 
Size:	22.6 KB 
ID:	23327

    The noise has gotten less and as long as the input amplitude is attenuated enough there is no distortion. I will make the switch to the AD8656 for the first stage. This is only there, to change the differential signal to single ended. Any more pointers on how to improve this part?

  7. #7
    Senior Member
    Join Date
    Jul 2020
    Posts
    927
    Ah, xyproblem again.

    You can't process the output of a class D amplifier in the analog domain as its a digital signal.

    First you need to low-pass filter the signal.

  8. #8
    Quote Originally Posted by MarkT View Post
    Ah, xyproblem again.

    You can't process the output of a class D amplifier in the analog domain as its a digital signal.

    First you need to low-pass filter the signal.
    I was hoping that would take care of itself with the opamps relatively low BW.

  9. #9
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    847
    "the AD8656 can drive capacitive loads up to 500 pF ..."

    So if you are planning to us it there, think twice about that 33uF.

  10. #10
    Senior Member
    Join Date
    Jul 2020
    Posts
    927
    Quote Originally Posted by jonr View Post
    "the AD8656 can drive capacitive loads up to 500 pF ..."

    So if you are planning to us it there, think twice about that 33uF.
    That 33uF on the output of the buffer should definitely not be there! Opamps don't drive capacitive loads!

  11. #11
    Senior Member
    Join Date
    Jul 2020
    Posts
    927
    Quote Originally Posted by i2sflew View Post
    I was hoping that would take care of itself with the opamps relatively low BW.
    Absolutely not, you'll be driving them into slew-rating limiting which is massively distorting (the feedback loop
    completely loses lock). Also the step change in input may destroy the front-end of an audio opamp, which often
    have back-to-back diode protection across the inputs.

    If you want line out, using a DAC is the normal approach. So for speaker + line-out its natural to have a DAC driving an
    amp chip (class D or linear).

  12. #12
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    847
    i2sflew: I highly recommend that you get used to typing your circuits into LTSpice. You can even add noise to the power supply or input. Not perfect, but you will learn a lot.

  13. #13
    Quote Originally Posted by MarkT View Post
    Absolutely not, you'll be driving them into slew-rating limiting which is massively distorting (the feedback loop
    completely loses lock). Also the step change in input may destroy the front-end of an audio opamp, which often
    have back-to-back diode protection across the inputs.

    If you want line out, using a DAC is the normal approach. So for speaker + line-out its natural to have a DAC driving an
    amp chip (class D or linear).
    In that case I might be better and cheaper off to order the audio shield. I wanted to save some money by using the class D I already have and maybe learn something about audio op amps on the way.

    Quote Originally Posted by jonr View Post
    i2sflew: I highly recommend that you get used to typing your circuits into LTSpice. You can even add noise to the power supply or input. Not perfect, but you will learn a lot.
    I used PSpice before, but thought this was easy enough with a quick and dirty simulator. Seems I need to install the real thing again.

  14. #14
    Senior Member
    Join Date
    Jul 2020
    Posts
    927
    I think you'll need to do some low-pass filtering then. Try an RCRC to start with, that might have enough roll-off and
    is very simple. For differential RC filter you have two resistors and one capacitor per stage, symmetrically, and the capacitor
    value should be half what the formula for a single ended value would give.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •