Shop OBEX P1 Docs P2 Docs Learn Events
Questions About Audio Signal Acquisition — Parallax Forums

Questions About Audio Signal Acquisition

WildManDanWildManDan Posts: 7
edited 2012-11-13 18:00 in Propeller 1
Greetings everyone,

This is my first post, so I guess I'll go ahead and jump right in. I've been using the Prop chip for a few months now, working on a project involving interleaving music and light. I feel that logical first step in doing this is to digitize music at the highest quality level that I can (without losing too much in the speed department). I was hoping to get some feedback on what I have done thus far and/or other ideas.

As of now, I have music (from a sound card or iPOD) being fed into a TLC2543 (12 bit resolution) ADC chip and these digitized values into the Propeller chip for processing (Hoping to add some filtering in the future). I have the Vref+ coming off of a potentiometer to vary my maximum voltage and my Vref- as ground. I find when watching the PST that many (>50%) of the values are recorded as zeros. Is this because the voltages coming for the music sources have both a positive and a negative flavor? The datasheet for the TLC2543 says that the Vref- cannot be more negative that ground, so is there some way to circumvent this if it is the problem, perhaps a DC offset? And more generally, if I am hoping to do musical analysis, is the hardware I'm making use of reasonable, or is there other ICs, etc. that I should switch to from the get go? Any words of advice on filtering, ADC, or amplification are welcome, although I understand that that is a broad statement.

Thanks so much for your input, and I look forward to hearing from everyone soon,
WMD

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-11-13 17:09
    WMD,

    Welcome to the Parallax forum!

    Try the following circuit to bias the zero level of your audio input to Vref / 2.

    attachment.php?attachmentid=96963&d=1352855328

    I just took a wag at the component values, so you will probably have to adjust them to get the performance you're looking for.

    -Phil
    260 x 213 - 1K
  • Mark_TMark_T Posts: 1,981
    edited 2012-11-13 18:00
    WildManDan wrote: »
    And more generally, if I am hoping to do musical analysis, is the hardware I'm making use of reasonable, or is there other ICs, etc. that I should switch to from the get go? Any words of advice on filtering, ADC, or amplification are welcome, although I understand that that is a broad statement.

    Well 12 bit isn't too bad, but it isn't music quality. The kind of ADCs and DACs that are both affordable and give you genuine hifi quality audio are specialised sigma-delta chips using the I2S bus (not I2C, note, but I2S). Typically you'd sample at 16 or 24 bits per sample per channel at 48kHz, 96kHz or even 192kHz. And some of these chips are really cheap - there are a whole batch from Wolfson Microelectronics at low cost such as WM8783 ADC and the WM8524 DAC. They are surface mount only though.

    Interfacing to the I2S bus takes PASM, but its a fairly natural match for the Propeller (some devices want 3 clock signals - 2 counters plus waitcnt makes this pretty painless).
    If you want to work at 48kHz etc then you'll need to overclock the Prop with a 6.144MHz crystal to run at 98.304MHz (divide by 1024 gives 96kHz)
Sign In or Register to comment.