Op-amp compensation of cascade fudges audio signal oddly

Click For Summary

Discussion Overview

The discussion revolves around the design and performance of a pre-amplifier for an analogue MEMS microphone used in bioacoustic recording, particularly focusing on issues related to op-amp compensation and noise in the audio signal. Participants explore the effects of compensation on signal quality and seek advice on mitigating unwanted frequency bands in the output.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant describes their pre-amp design, including a cascade configuration with a differential first stage and an inverting second stage, and notes the need for compensation with the MAX40089 op-amp at higher gains.
  • Compensation is reported to eliminate banding in the audio signal but introduces a broad, seemingly-random band of noise that varies over time, raising questions about the necessity of compensation.
  • Another participant suggests that digital potentiometers may introduce noise and recommends using fixed resistors with analog switches for better performance in low-noise applications.
  • A later reply discusses the potential for interference from switching power supplies, particularly from modern lighting and low-cost power supplies, and encourages listening for the interfering signal at the amplifier output.
  • Participants express uncertainty about the source of the noise and the effectiveness of the compensation method, with one questioning whether the banding is indeed due to lack of compensation.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the necessity of compensation or the source of the noise. Multiple competing views on the effectiveness of digital potentiometers versus fixed resistors remain, and the discussion about the noise source is unresolved.

Contextual Notes

Participants note limitations in their testing setup, including the absence of an oscilloscope, which may affect their ability to diagnose the noise issues accurately. There are also references to varying performance based on different configurations and components used.

Who May Find This Useful

Individuals interested in audio electronics, particularly those working with op-amps, pre-amplifier design, and noise reduction techniques in bioacoustic applications may find this discussion relevant.

Callicious
Messages
2
Reaction score
0
TL;DR
Op-amp cascade as pre-amp for MEMS microphone decompensated has banding. With compensation, no banding- but a strange continuous random noise.
Links:
LTSpice Pre-amp schematic (resistor values/capacitor values different)
Gerber
Op-amp Datasheet

Hi all;

Presently designing pre-amp for my analogue MEMS microphone for bioacoustic recording (ultrasonic, especially.) Don't own an oscilloscope, so relying on spectrograms of audio for examining noise/etc in circuit.

See above links for the LTSpice, gerber for the PCB, and the op-amp datasheet (all the other schemas for the PCB and whatnot are in there too- just not the EasyEDA files for the PCB.)

The pre-amp consists of a cascade, with a differential first stage and inverting second, the first stage having set gain of 22 and the latter having variable gain (through an MCP4131 digital potentiometer- a gain of 20-30 works well.) The datasheet for the op-amp specifies that I should compensate the MAX40089 (my dual op-amp of choice) when dealing with gains of 10+, putting a capacitor in parallel with the inverting feedback resistor with gain multiplied by 10 pF. For compensation, I thus place 220 pF SMD film caps on the (-) feedback resistors on both the differential and inverting parts of the cascade.

With compensation, I get the leftmost part of the below image. Without compensation, the rightmost. Compensation eliminates the banding in the circuit (no clue why- I'm aware of RC/LRC/LR circuits mathematically but I've never seen an op-amp before this project) but it introduces a broad continuous seemingly-random band distributed somewhat normally in frequency. So, with all that in mind, I was wondering if anyone had any tips/tricks they could recommend to get rid of that fuzzy band on the leftmost portion of the below image- am I doing something wrong in my compensation method following the DS? ... More importantly, does anyone here think that I actually need compensation (I'm only interested in audio from 0 to ~240 kHz)...? Without compensation, is there any way to get rid of those bands, which almost certainly seem to be associated with the actual circuit design rather than external i.e. power/RF noise?

Note: the compensated band varies over time, too.


In the case I don't compensate- how would I go about removing that banding in the rightmost image- is the banding actually from the lack of compensation?... I've filtered the power line relentlessly with LC and RC filtering, and the ADC doesn't seem to have this banding if you run it without the mic assembly attached, so... :-;

Compensated (left) Without (right) Audio Spectrogram. Ignore the white peaks- those are just from Kaleidoscope.
example.PNG


LTSpice Schematic for my pre-amp (Note that parts will differ for the regulator + reference, and the OPs are MAX40089... close as I could get with LTSpice straight out the box. See the toplinked GitHub page for the download.
Circuit.png


Addendum/notes
I've also noticed that the frequency response at higher frequencies, when compensated, diminishes- without compensation LTSpice showed the circuit as working well up into the few 100'kHz before dB gain gets reduced- with 220 pF in parallel (I know it's not exactly the same parts, but aye) the gains at higher frequencies are much much lower. Running without compensation would be ideal- but those bands ruin the experience.

The fuzzy band, when compensated, changes in frequency domain over time- see below for example. Sometimes it shoots up, sometimes down, seemingly randomly. In some recordings it's near 150 kHz- in some, near 10-20 kHz.
alt freq.PNG


Those bands around 20-25 kHz seem to be some sort of wireless signal induced noise- similar to some sort of switching noise. When I dump the device inside a ball of grounded copper mesh, most of it vanishes (the actual enclosure is somewhat EMI shielded which will help with this- I'm just testing this in a plastic bag in the garden at the moment.)
 
Last edited:
Engineering news on Phys.org
Sorry, I don't have a lot of time to review this. But...

Does your SW also have a spectrum analyzer display mode (amplitude vs. frequency)? This is much more understandably to me than spectrographs.

One perhaps peripheral comment. Digital pots usually aren't great for low noise analog. There is usually poor isolation from digital buss and PS noise. There are also bandwidth and frequency response issues, usually in the form of extra capacitance. They aren't really resistors, they're a bunch of transistors that act like resistors. You might try replacing them with some fixed resistors for troubleshooting. In low noise PGA designs I did years ago, we needed real resistors that were switched with analog switches. The analog switches are designed with good analog specs, like low noise, wide bandwidth, and good isolation. Digital pots and DACs, less so.
 
  • Like
Likes   Reactions: Callicious, berkeman and dlgoff
DaveE said:
Sorry, I don't have a lot of time to review this. But...

Does your SW also have a spectrum analyzer display mode (amplitude vs. frequency)? This is much more understandably to me than spectrographs.

One perhaps peripheral comment. Digital pots usually aren't great for low noise analog. There is usually poor isolation from digital buss and PS noise. There are also bandwidth and frequency response issues, usually in the form of extra capacitance. They aren't really resistors, they're a bunch of transistors that act like resistors. You might try replacing them with some fixed resistors for troubleshooting. In low noise PGA designs I did years ago, we needed real resistors that were switched with analog switches. The analog switches are designed with good analog specs, like low noise, wide bandwidth, and good isolation. Digital pots and DACs, less so.
Thanks for your reply :)

I've attached the spectra via Imgur (Had to use Python to FFT the .wav files- I am very new to Kaleidoscope and can't see any obvious FFT method in the window.) I set the x-y lims arbitrarily (otherwise you cannae zoom too well for the peaks!)

Interesting to know- I assumed that the ICs just had a shed load of resistors in a row (the taps) and would iterate a wiper forward/backward mechanically somehow- didn't realize that it was all just one giant cake of a lie- a bunch of transistors in the proverbial trenchcoat... the actual datasheet seems to imply it is a "true" resistor network rather than the trenchcoat, but nonetheless your advice w.r.t noise/digital crosstalk/etc has been taken.

If I were to go down the route of dumping the digital potentiometer and opting for a configuration in which gain is selectable by logic alone using one of these analogue switches, would I be looking for something like this? Not necessarily that particular part- just something in that domain. Based on what I can understand, an analogue switch is just similar to a conventional load switch- a bunch of MOSFETs or something similar controlling the path of the signal by logic- in which case, it'll be quite easy for me to set up a discrete array of resistors for gain control (I only need 3-4 gain settings anyway.)

I'll get to setting up a system for switching the gain using a discrete set of resistors & an analogue switch IC as you've mentioned- and here I thought I was happy and content with this version of the PCB! :nb) Back to EasyEDA I go.

https://www.analog.com/media/en/reference-design-documentation/reference-designs/cn0146.pdf Ora! Analogue have something on it too!

https://www.mouser.co.uk/ProductDetail/Analog-Devices/ADG812YRUZ?qs=BpaRKvA4VqEDBeBBg%2BqxHg== Settled on this part- should perform well enough.


Click here for Spectra. Note: imgur link. Confirm if you don't trust moi! (Manual link below.)


Note that I took these spectra on different days. The compensated one has a little bit of squirrel chatter & birdsong- sorry ;-;
 
Last edited:
That spectrum looks suspiciously like there is a switching power supply being picked up by your circuit. Realize that modern light bulbs, both fluorescent and LED, often contain a such a supply, as do low-cost (cheap) line powered power supplies.

Since you don't have a 'scope, hopefully you can hear the interfering signal.
Try listening to the amplifier output. If that doesn't work, try a signal diode on the amp output and either listen or measure the DC output with a voltmeter. (Series Capacitor, followed by series Diode, followed by a 0.001uF to 0.01uF shunt capacitor.)

One way to track it down, besides shielding it, is see if the frequency changes when moving your hand very near the circuit... or even putting you finger on various points of the circuit. If the 25kHz signal stops or changes frequency then the circuit is likely oscillating.

If it is external interference, you may get lucky and be able to track down the interference source... or it may be easier to just shield everything.

Try removing all the external input wiring from U1 to see if the external wiring is picking up anything, either interference or contributing to oscillation.

A photo of your assembly could help us come up with other ideas, as could its intended use. From your schematic, the frequency range of your input signal seems rather large, especially since the stage coupling only goes down to 5Hz. (or maybe I misread your AC source definitions)

Cheers,
Tom
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 31 ·
2
Replies
31
Views
5K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 15 ·
Replies
15
Views
13K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
17K