Measuring audio with an ADC

Discussion in 'Embedded Systems and Microcontrollers' started by arenwi, Dec 29, 2014.

  1. arenwi

    Thread Starter Member

    Dec 29, 2014
    37
    0
    Hi to every body,

    I´m trying to take measurements of audio with a microphone conected to a microcontroller with DSP.

    Untill now I think that the audio measurements use to made in AC voltage, measuring peak to peak on Veff voltage. But in mi project mi ADC are measuring in direc voltage and ofcourse only the positive part of the signal.

    Any ideas about the tipe of conditioning of the signal??
    Many thanks
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,418
    3,355
    What are you planning on doing with the measurements?

    Do you just want the average signal amplitude or do you want to faithfully digitize the whole audio signal from 20Hz to 20kHz?
     
  3. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    Hello,

    Did you not get information on centering the signal in your other thread?

    Amplifier for an electret microphone


    There it has been told that the electret needs a bias and for the amplifier a PDF is given.

    Bertus
     
  4. arenwi

    Thread Starter Member

    Dec 29, 2014
    37
    0
    Hi many thanks for your fast help.

    Hi Mr chips, the idea is to digitalize this signal and use fft on it to know the componets of each frcuency. But I don´t know how must be the signal before adc

    Bertus, Yes I ask about haow to center the the signal in other thread. But is this the way to take measuremnts of ac with the adc but this is mi opinion and I don´t know if is the best way.

    Thanks for your help
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,418
    3,355
    First you amplify the signal from your electret microphone.
    To do this, you need to do these three things:

    1) Apply a DC bias to the electret microphone via a resistor.

    2) Then you need to amplify the AC component of the audio signal by coupling the signal to the input of the amplifier via a DC blocking capacitor.

    3) Then you bias the AC signal to match the range of the amplifier with a DC voltage using two resistors configured as a voltage divider.

    Now, to connect the signal to the input of the ADC, you need to do these three things:

    1) Filter the signal with an anti-aliasing filter to limit the signals to half of the sampling rate. That is, if you are sampling at 44.1ksps, you need a low-pass filter with a cut-off frequency of 20kHz.

    2) AC couple the signal to the input of the ADC via an AC coupling capacitor (same thing as a DC blocking capacitor).

    3) Bias the AC signal with DC voltage to match the range of the ADC input voltage.
     
  6. arenwi

    Thread Starter Member

    Dec 29, 2014
    37
    0
    Thank you very much for yor coments Mr.Chip are very rihgt and concised. Many thanks.

    I was working so many hours in the amplifier. And I have some problems:

    I would like to work with single supply power. I´m using a non inverter configuration with normal ground to 0 volts, and it works like a "half wave amplifier" but is not perfect.
    Somebody know any single supply configuration for a full wave rectifier with single supply.
    I found a lot of circuits but for double supply, like this:
    Captura de pantalla 2015-01-05 a la(s) 01.52.01.png
    I had asembled it but with single supply don´t works.
    If I could combine the out of one inverter and non inverter op or something like this.

    Any ideas for a stable full wave configuration for single supply op amps ??? tested?? : )

    Many thanks
     
  7. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998

    You probably did something wrong. What do you mean by "don't work?"
     
  8. arenwi

    Thread Starter Member

    Dec 29, 2014
    37
    0
    I was testing those circuit and the output Is a line on 0 volts, nothing hapen, the same with imput and witout it.

    In the first stage this inverter configuration is tipical for dual supply amplifiers (I think).
    In the single suply inverter configuration(first stage) I use to fix a some voltage in in the + in of the op amp (this voltage is the offset of the out). Without this voltage the single supply configuration did´nt work for me. And in this case I need an single suply full wave rectifier with no offset.
     
  9. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    I don't see any reason this wouldn't work. The circuit you posted is shown with a single rail supply and that's what the circuit was designed for. Do you have any simulation software (for example, ltspice) You could quickly simulate the circuit and see if it works. I believe it should and so I think you're connecting something incorrectly, maybe you have the diode reversed or something.

    The way this is supposed to work is when the input goes negative, the 1st stage outputs a positive level which propagates through the diode. During the negative half-cycle, the 1st stage is cut off, but the input voltage propagates through the normal feedback network, thus the circuit performs full wave rectification.
     
  10. arenwi

    Thread Starter Member

    Dec 29, 2014
    37
    0
    many thanks brownout. I will test again this circuit.

    Manuy thanks

    Any more ideas??
     
  11. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    I realized I wrote negative half cycle (2nd paragraph, 2nd sentence) in my post above, and I should have written "positive half-cycle"
     
Loading...