Author Topic: mic -> op-amp -> ADC connection: How to do it properly?  (Read 22817 times)

0 Members and 1 Guest are viewing this topic.

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
mic -> op-amp -> ADC connection: How to do it properly?
« on: October 19, 2015, 08:23:04 pm »
Good time of the day,

Brief intro:
I am exploring the STM32F303VC peripherals on the STM32F3-Discovery board and now I would like to utilize the ADC and DAC modules.
The idea is to capture sound (voice) with the microphone, digitize it via ADC, store result inside the MCU and play it back via DAC.

As a mic I've chose Electret Condenser Microphone (BCM-9754P pdf) as it is easy accessible in my area.
As a op-amplifier I've chose TI NE5532P (pdf). Because of its affordability and low-noise.
I plan to use 5V supply from a board for op-amp and 3.3V (in fact ~2.95V) supply for all other stuff.

And the question is - how to connect/wire this things together?

I've found alot schematics on the internet but I lack expirience and knowledge to understand them well. This is where I ask you for help.

First variant looks like this (taken from here):


While the purpose of all components is desribed in the suorce I don't understand why or for what purpose those voltage dividers (R1R2 and R6R7) are used /needed. How they infuence o nthe result and can I remove them?

Secend variant that I consider looks this way: (taken from AVR335: Digital Sound Recorder datasheet)



Here the voltage divider R2R3 is used  on non inverting input (why, what if not?)
Plus the inverting amplifier connection is used - why this is acceptable? Shouldn't this influence the ADC results?

Will be very greatfull for any help!
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #1 on: October 19, 2015, 08:36:47 pm »
Look at the power supply of the op amps, it is "single" rail, ie there is only a positive supply, but your audio is both positive and negative around ground. So that the op amp can have both positive and negative swings an artificial ground point is created by the potential dividers usually at 1/2 Vcc so that there is a virtual ground to reference to or rather a vitual negative rail.
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #2 on: October 19, 2015, 11:43:12 pm »
As a op-amplifier I've chose TI NE5532P (pdf). Because of its affordability and low-noise.
I plan to use 5V supply from a board for op-amp and 3.3V (in fact ~2.95V) supply for all other stuff.
Good choice for low-noise, but, the datasheet suggests that it won't get out of bed for anything less than 10V supply voltage (top of page three). If you do manage to wake it up, it probably will not perform well. Also, the input common-mode range and the output will "typically" only swing to within 2 volts of the power supplies - with a 5V supply that will leave you an operating window of 1V.

« Last Edit: October 19, 2015, 11:51:21 pm by Andy Watson »
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #3 on: October 20, 2015, 01:09:02 am »
Look at the power supply of the op amps, it is "single" rail, ie there is only a positive supply, but your audio is both positive and negative around ground. So that the op amp can have both positive and negative swings an artificial ground point is created by the potential dividers usually at 1/2 Vcc so that there is a virtual ground to reference to or rather a vitual negative rail.

This is how I see it with case#2 (inverting configuration) from AVR example where virtual ground and mic output are on different op-amp inputs:
Relatively to the virtual GND op-amp is able to provide both positive and negative swings, wich are at the same time positive relatively to the 'real' GND.
And as ADC, in this example, operates on the same voltage and use the same Vcc and GND as op-amp. From ADCs point of view those swings lie within his operation range and are also positive. Is this correct?

Then I have another question - as this is 'inverting configuration' the silence (0V output from the mic) will be inverted by op-amp to Vcc (or to a top value avaliable for cpecific op-amp ). ADC will also deal with this as with a Vcc (or close) value. How this should become again 'silence' after playback? What I am missing...?

 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #4 on: October 20, 2015, 01:13:30 am »
Andy Watson, you are right. In this case I'll consider what is preferable in my case, to increase power supply of op-amp or choose another model. Thank you.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #5 on: October 20, 2015, 01:16:35 am »
Then I have another question - as this is 'inverting configuration' the silence (0V output from the mic) will be inverted by op-amp to Vcc...

Wrong. Assuming the supply voltage is 5V, the voltage at pin 3 of U1A will be 2.5V because of the divider. According to virtual earth principle, the voltage at pin 2 will be 2.5V as well. In the case where there is silence, there will be no current flowing through C1, since the input signal is a flat 0V. This means there's no current flowing through R9 either, and no current flowing through R1. So the output from the op-amp is 2.5V (not Vcc as you've asserted), which is exactly perfect because the value should be dead in the middle of the 0 to Vcc range so that it's free to increase and decrease as AC sound waves arrive.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #6 on: October 20, 2015, 06:01:20 am »
think of it as -gain x input
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #7 on: October 21, 2015, 08:20:38 pm »
Would like to thank you for the help! It allows me to locate my knowladge gaps precisly.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #8 on: October 22, 2015, 02:31:52 pm »
.
« Last Edit: October 22, 2015, 02:34:45 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #9 on: November 01, 2015, 12:52:59 am »
Good evening guys,

I've ended up with this circuit :



And have difficulties with ADC readings. The 8bit ADC results in "silent" situation gives value of ~110.
And when I rub the microphone/ talk it swings from ~96 to ~124.
I've tryed different vaulues for R5 from 15k? <-> 330k? to adjust gain but the result is almost the same.
I was expecting swings from 0 to 256 (in 8 bit ADC mode), what I could do wrong here?
C3 is electrolytic capacitor, all other are ceramic, op-amp is LM324(pdf)

Will be grateful for your advices!
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #10 on: November 01, 2015, 01:22:05 am »
The gain of the amplifier will be (approx) R5 / (R2 + Xc2). The value of C2 gives high value of impedance (Xc2) at audio frequencies. What is the lowest frequency of interest? Use this value to calculate the value of C2 to realise an impedance equal to R2.

Edit: As it stands, C2=4700pF, will give the amplifier a low-frequency roll-off starting at 34kHz. Assuming you want to cover the audio frequency range, C2 needs to be approximately 1000 times larger.
« Last Edit: November 01, 2015, 01:26:09 am by Andy Watson »
 

Offline Habropoda

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #11 on: November 01, 2015, 03:10:32 am »
Not an expert, but it looks like your op amp will also start rolling of frequencies higher than about 1-2khz at that gain.  You would need to cascade a couple of those with lower gain on each to get decent bandwidth.

David's EEVBLOG #572 addresses this issue.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #12 on: November 01, 2015, 11:20:06 am »
Why on earth did you decide to use the LM324? It's possibly the worst choice for audio. It suffers from horrible crossover distortion and is far too slow to produce treble accurately.

The NE5532 and TL072  are much better! I notice you've gone for an 8V supply so why not use the NE5532 or TL072 which should work off 8V (I know it's not specified to but I know it will). If in doubt use the NE5534 which similar and is specified down to 6V.

 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
The easiest person to fool is yourself. -- Richard Feynman
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #14 on: November 01, 2015, 05:39:58 pm »
Take a look at how SparkFun does it.
https://www.sparkfun.com/datasheets/BreakoutBoards/Amplified-Mic-Electret-v14.pdf
I wonder why they went for the OPA344. The gain will drop below 100 at just 10kHz and it's more noisy than other amplifiers around. The OPA345 variant would've been a better choice. The gain doesn't drop below 100 until 30kHz so will perform well at the high end of the audio band.

Personally I would've chosen the TLV2460 which is lower noise.

As far as the original poster is concerned. He hasn't said what gain he requires. The schematics he's posted have a gains ranging from 10 to 330.

Here's a circuit which should be reasonably low noise and have a gain of  331.



Notes:
The non-polarised capacitors should be anything but ceramic which is microphonic and can cause problems in audio circuits.

The polarised capacitors can be aluminium.

U1 = NE5534 or if that's not good enough, the OP37.

As mentioned above R3 & R4 bias the op-amp at half the supply voltage.

C3 is added to improve the supply rejection.

R5 sets the input impedance to 27k at audio frequencies and roughly balance the DC resistance seen at both of the op-amp's inputs.

If this is being run of a battery. C3 and R5 may be unnecessary. If you want to remove them, by all means do but increase R3 and R4 to 68k to keep the DC resistance seen at the op-amp's inputs matched.

R6 and C5 will filter out RF noise and terminate the cable with 100R, at RF which should be close to the characteristic impedance of the cable.
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #15 on: November 01, 2015, 08:52:43 pm »
I appreciate all recommendations and suggestions.

Andy Watson, haven't realised that I need to take capacitive reactance into account.
My goal is, at least, pick up the speech and ideally full audio frequency range. Assume that, in this case, lowest frequency of interest should be 300Hz.
I swithed C2 for a 22µF. This means capacitive reactance to be close to 24Ohms at 300Hz. So impedance of my C2(22µF) is much less then the 1kOhms R2 resistor. Is it important to keep their impedance the same and why? Thank you.

Habropoda, got it. I reduced the gain to x16 by replacing R5 to 15.7kOhms resistor and will step upward.

Hero999, I trusted to "Microphone and Speaker Circuit Diagram" from AVR and they used LM324 in their circuit. The main idea was to start with a working setup as I was unfamiliar with ADC,op-amps, mics and audio processing in general when was starting this project. I was assuming that I am going to start sampling rate from 8kHz, will have 9V swing and was thinking that I'll be fine with 9V/125us=0.072V/us slew rate. Also had plans to try different op-amps and play with audio quality after get the basic variant working.
Concerning the requird gain and voltage supply - I don't know wich gain I need. Don't know how to calculate it. Was planning to choose it based on the ADC readings. I used 8V supply only beacause it was more stable then outup from ac/dc adpter I have. So it's not a limit. I am going to obtain linear voltage regulators for +12(+9/+3) and -12(-9/-3) respectivly to power op-amp rails and mic.

alsetalokin4017, thank you for the link.

I will try use different values for resistors and capacitors based on circuits you have offered. But for now, from my point of veiw, the mane difference seems that I am using different voltage suply for mic/op-amp and ADC when all offered circuits use one power supply. Maybe I'll simplify my case and will obtain rail-to-rail op-amp and make this hole thing to work from a single 3V supply (stm32F3-discovery board) to get rid of secend  voltage divider right before ADC input.
« Last Edit: November 01, 2015, 08:54:54 pm by AlStorm Prime »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #16 on: November 02, 2015, 09:38:15 pm »
It depends on what you're doing.

It isn't just the poor slew rate and bandwidth which makes the LM324 unsuitable for audio but also the crossover distortion, which creates glitches in the waveform when the output changes from sinking to sourcing current and vice versa.

See the video linked below which discusses the LM358 which is the same as the LM324 but contains two, rather than four op-amps.


As mentioned in the video, adding a resistor between the output and 0V will ensure it operates in class A so will remove the crossover distortion.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #17 on: November 02, 2015, 09:55:31 pm »
As mentioned in the video, adding a resistor between the output and 0V will ensure it operates in class A so will remove the crossover distortion.

In the OP's use case, that'd be a (physically) very large and very very hot resistor...

Edit: Whoops, I should not visit forums first thing in the morning. My brain thought I was reading the Linear motor drive thread. Sorry!
« Last Edit: November 02, 2015, 11:04:08 pm by rs20 »
 

Offline Delta

  • Super Contributor
  • ***
  • Posts: 1221
  • Country: gb
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #18 on: November 02, 2015, 10:41:07 pm »
As mentioned in the video, adding a resistor between the output and 0V will ensure it operates in class A so will remove the crossover distortion.

In the OP's use case, that'd be a (physically) very large and very very hot resistor...

Eh? I thought the use case was just to drive an MCU's ADC?
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #19 on: November 04, 2015, 04:47:11 pm »
Good evening,
Would like to thank you for the support.  :-+
I moved a few steps toward the goal of this project.
The current circuit is able to REC / PLAY for a 3 seconds duration as well as continuously broadcast from MIC to speaker.
Now I'll focus on software - SD card, FAT file system and differential pulse-code modulation encoding.
Perfecting the hardware part for a sound quality is going to be final part.
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #20 on: November 08, 2015, 10:52:22 pm »
Good evening!
Today I faced with the following problem - usage SD card, that is powered from the same source as the op-amp, cause strong distortion of recorded sound. My guess is - increased current drain, while in write cycle, results in voltage surges. Adding 1000uF capacitor (C4 on the schematic) close to op-amp +rail softens the distortion, but doesn't remove it entirly.

Will be grateful for any ideas on how to wire this properly or improve the project!

I'll attache the actual schematic, general photo and the view of soundwave.
Also, if anyone wants to listen this, the link on soundcloud
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #21 on: November 08, 2015, 11:02:58 pm »
R1 provides direct coupling between the +ve supply and the input to your amplifier. I would split R1 and add some (may be a lot of) decoupling capacitance at the split.

Also, make sure that the ground path for the audio input is solid from mic to amplifier to input of the ADC and that it does not serve anything else.
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #22 on: November 09, 2015, 11:12:06 pm »
R1 provides direct coupling between the +ve supply and the input to your amplifier. I would split R1 and add some (may be a lot of) decoupling capacitance at the split.

Also, make sure that the ground path for the audio input is solid from mic to amplifier to input of the ADC and that it does not serve anything else.

You mean that I should not connect SD card to the same ground as mic/amp/adc?
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #23 on: November 10, 2015, 02:09:52 am »
R1 provides direct coupling between the +ve supply and the input to your amplifier. I would split R1 and add some (may be a lot of) decoupling capacitance at the split.

Also, make sure that the ground path for the audio input is solid from mic to amplifier to input of the ADC and that it does not serve anything else.

You mean that I should not connect SD card to the same ground as mic/amp/adc?

Not quite. I think he means they should be connected, but at precisely one point. I.e., there should be a dedicated ground trace for the opamp, adc and mic (and associated resistors and decoupling) that is connected at only one single point to the rest of the grounds of the circuit.

Fwiw, I'm not sure that's really necessary until you see interference-related issues (haven't been following the thread).
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #24 on: November 11, 2015, 01:57:36 pm »
I had interference-related issues. Turned out that they where caused by SPIs SCL/MISO/MOSI lines. As they where to close to the analog part of the schematic.

Also, I found out that more then 90% of ADC(8bit mode) results lie between 120 <> 148 and audicity shows that recorded sound wave swings from 0v to 0.2V. Does this means that op-amp gain is to small in my case? I was expecting swings from top to bottom...
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #25 on: November 12, 2015, 12:19:28 am »
Was searching the source of noise and found out that op-amp circuit doesn't give any of it.
Connected speaker to the op-amp output, before ADC, and was surprised as it was clean and quiet.
I can also exclude output part of the schematic (afetr DAC) because the same noise present when I play recorded audio from the PC.

All noise I have appears after A/D conversion.
So I have two things that doesn't looks right for me - noise after A/D conversion and range of the ADC results.
As I mentioned earlier 90% of ADC results are from 120 to 148, instead of 0 to 255 for a 8 bit ADC resolution mode.

For now I assume that Quantization Error can be a reason of noise in my case as only 10% of ADC resolution is used for audio quantization.
My guess is that  one stage amplification is not enough.

Maybe I shoud add more stages or switch for the  "compandor"/"mic conditioner" and force ADC results to swing in full range?  :-//
« Last Edit: November 12, 2015, 12:21:00 am by AlStorm Prime »
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #26 on: November 12, 2015, 06:53:58 am »
Why exactly is there a capacitor across the electret microphone? ???

C3 also has no place there, it's just loading the output of the opamp, destabilizing it.
R6 is redundant.
« Last Edit: November 12, 2015, 06:58:37 am by Dave »
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #27 on: November 12, 2015, 08:13:32 am »
Why exactly is there a capacitor across the electret microphone? ???

C3 also has no place there, it's just loading the output of the opamp, destabilizing it.
R6 is redundant.

The plan was like this:
C1 was taken from here and was supposed to be "C3 is a power supply stabilization condenser"
C3 was taken from AVR335: Digital Sound Recorder datasheet page 7, and was supposed to be a part of "R5 and C8 form a simple first order low-pass filter.."
R6 is the way how I undestood Hero999s link on #215: Basics of crossover distortion | LM358 op amp example

I am not sure if all of this can be combined and supposed to be in this way, but when i connect speaker to the outup of op-amp I don't hear the noise like I do after the uC.
« Last Edit: November 12, 2015, 08:17:59 am by AlStorm Prime »
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #28 on: November 12, 2015, 07:47:56 pm »
Just so we are clear, we are still talking about this schematic, right?


C1 isn't a power supply stabilization capacitor, it's loading the microphone and severely degrading your signal. Remove it.
The author from your link is using it as a low-pass filter, but it's almost two orders of magnitude smaller than yours.

C3 isn't forming a low-pass filter, it's just loading the output of the opamp, forcing it into oscillation. You'd need a resistor in series to form a LPF. Remove it or add a resistor between the opamp's output and C3 (at least a couple of hundred ohms).

MCP602 doesn't suffer from crossover distortion like the awful LM358. R6 is not needed.

You might want to reduce the gain of your amplifier, because I have a feeling that after you remove C1, your signal is going to peak severely.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #29 on: November 12, 2015, 09:21:17 pm »
Something simple might work too.

Edit: Adding a capacitor in parallel with the resistor connected to the op amp's output will limit the high frequencies as needed (low-pass filtering).
« Last Edit: November 12, 2015, 09:36:00 pm by Kalvin »
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #30 on: November 13, 2015, 02:51:52 pm »
Dave, I completely agree with your arguments and removed redundunt parts from the schematic.
Kalvin, I am pretty sure this will work.
I see two reasons why things went to complicated in my case.
- it was done for a first time
- and I chased the noise source in a "wrong direction', was thinking that something is wrong with the mic-op.amp part and started to add filters (in a wrong way btw :) )

The last thing that I made is I've disconnected the mic-op.amp and second power supply completly.
The only things thet are left are STM32F3-discovery power by USB from a host PC and SD card with SPI interface.
Then I made the voltage divedire from discoverys 3V and GND supply, as I did for the virtual ground for the op.amp.
And measured this with ADC. The result was next:


And this sounds exactly as the noise I was chasing.

I have plans to do more research on this and run few more tests (try external power supply instead of USB, and to to separate in time proces of reading ADC results and proces of dumping it on SD card).

All I have to add for now is the part of internal schematic of STM32F3 discovery board where Vref is shown



Have strong intention to find the reason of such behavour of my ADC and will be greatfull for any ideas about this.

Have a nice friday guys!   :popcorn:
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #31 on: November 13, 2015, 11:03:07 pm »
The noise might be caused by the ADC itself. The resistive divider is providing a high-impedance input to the ADC, but the ADC requires a low-impedance input, because it needs the current spikes to charge the sampling capacitor.

Try doing an FFT on that noisy signal, let's if the noise somehow corresponds to the sampling frequency of the ADC.
Second thing you should try: Add an opamp as a buffer and put a RC LPF on the output composed of 100R resistor and 1nF cap. Try measuring the same thing again.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #32 on: November 14, 2015, 02:30:48 am »
original post
I had a 'bug' in the testing software wich has distorted the results of the few last testings. So I've deleted this post to not mislead.  :(
« Last Edit: November 14, 2015, 04:20:50 am by AlStorm Prime »
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #33 on: November 14, 2015, 01:29:13 pm »
The last thing that I made is I've disconnected the mic-op.amp and second power supply completly.
The only things thet are left are STM32F3-discovery power by USB from a host PC and SD card with SPI interface.
Then I made the voltage divedire from discoverys 3V and GND supply, as I did for the virtual ground for the op.amp.

And this sounds exactly as the noise I was chasing.

Did you connect the voltage divider to the filtered supply voltage or to the unfiltered and noisy supply voltage coming directly from the USB.
 

Offline AlStorm PrimeTopic starter

  • Contributor
  • Posts: 19
  • Country: ua
Re: mic -> op-amp -> ADC connection: How to do it properly?
« Reply #34 on: November 18, 2015, 01:18:09 am »
Kalvin, I was using 3.3V supply from the Discovery board, wich has a 'low-dropout regulator' on board, to drive all parts of schematic (plus a bunch of thing onboard of the Discovery), including the voltage divider for the op-amp. So it was defenetly not a 'filtered' voltage supply.

Actually, this was a reason of my troubles. Noise from the power supply line. It did take a long way for me to realise and fix this.
I want to thank everyone for the help, ideas and explanations. It was informative, useful and interesting.
And I still have a lot stuff to work on, play and test. have found a lot of 'supportive' audio ICs from different manufacturers. Like microphone conditioners, MEMS mics, codecs, filters, reference grounds and so on. Not counting the world of power supply part of the schematics.

For now I am looking on the SSM2167(pdf), but what confuses me is it's maximum gain, wich is 40dB (online converter says it's x100 for the Voltage).
I guess this will be not enough for me, as now I use two stage amplification ~ x34 each.
« Last Edit: November 18, 2015, 01:20:04 am by AlStorm Prime »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf