Recent changes
Slingshot user guide
tag Guide, user
NFCLamp user guide
tag Guide, user
Homepage
MPL115A2
Compiler Error 42
From the mbed microcontroller Cookbook.  

HQ Audio

The idea is to build a high quality audio module together with libraries and example projects, using the external DAC (TLV320AIC23B - http://focus.ti.com/docs/prod/folders/print/tlv320aic23b.html) from Texas Instruments. The chip is designed for audio applications with an internal 30mW per channel headphone amplifier (driving 32Ohm speakers).

Here are the DACs features borrowed from the datasheet:

  1. 90-dB SNR Multibit Sigma-Delta ADC (A-weighted at 48 kHz)
  2. 100-dB SNR Multibit Sigma-Delta DAC (A-weighted at 48 kHz)
  3. 1.42 V – 3.6 V Core Digital Supply: Compatible With TI C54x DSP Core Voltages
  4. 2.7 V – 3.6 V Buffer and Analog Supply: Compatible Both TI C54x DSP Buffer Voltages
  5. 8-kHz – 96-kHz Sampling-Frequency Support
  1. 2-wire-Compatible and SPI-Compatible Serial-Port Protocols
  2. Glueless Interface to TI McBSPs
  1. I2S-Compatible Interface Requiring Only One McBSP for both ADC and DAC
  2. Standard I2S, MSB, or LSB Justified-Data Transfers
  3. 16/20/24/32-Bit Word Lengths MicroStar Junior is a trademark of Texas Instruments.1−2
  4. Audio Master/Slave Timing Capability Optimized for TI DSPs (250/272 fs ), USB mode
  5. Industry-Standard Master/Slave Support Provided Also (256/384 fs ), Normal mode
  6. Glueless Interface to TI McBSPs
  1. Low-Noise MICBIAS pin at 3/4 AVDD for Biasing of Electret Capsules
  2. Integrated Buffer Amplifier With Tunable Fixed Gain of 1 to 5
  3. Additional Control-Register Selectable Buffer Gain of 0 dB or 20 dB
  1. Integrated Programmable Gain Amplifier
  2. Analog Bypass Path of Codec
  1. Analog Stereo Mixer for DAC and Analog Bypass Path
  1. 30 mW into 32 Ω From a 3.3-V Analog Supply Voltage
  1. 23-mW Power Consumption During Playback Mode
  2. Standby Power Consumption <150 µW
  3. Power-Down Power Consumption <15 µW
  1. 25 mm2 Total Board Area
  2. 28-Pin TSSOP Also Is Available (62 mm2 Total Board Area)

We are going to use the SOIC package for our experiments (the DAC is also available in QFN and BGA packages), mainly because is it a solder friendly package and the exposed pins will help us at the debugging process (easier to probe the exposed pins compared to no leaded packages like the QFNs).

/media/uploads/Lykos1986/_scaled_post_tlv.jpg

The chip uses two communication protocols. The I2S protocol (http://www.nxp.com/acrobat_download2/various/I2SBUS.pdf) for the audio data and the I2C for control of the internal DAC registers (the alternative is the SPI but we don’t have feedback after every command so it is not the preferred way).

Now it is time to move from the datasheets and the free schematic drawings to something more professional. The design of the schematic and PCB with an appropriate editor. I know that one of the preferred choices here is the Eagle and I know that we have already published a few projects and libraries using this tool. But it was time to try and something new! The Design Spark PCB from RS (http://www.designspark.com/).

It takes only a few hours to get used to this program even if you don’t have lot of experience with acronyms and tool chain processes of PCB creation and PCB software’s in general. It is simple but without the loss of the functionality needed to build professionally circuits. Of course you can import really easily your already made libraries and projects from Eagle (link). But if you want to create a new library then you should defiantly try the footprint wizard! It works perfect and it is one of my favourites out there!

So, after the library creations (audio in/out sockets and DAC) and the connection of a few lines the schematic is ready. It looks simple and it is! Just the DAC together with his basic peripheral components (100nF ceramic capacitors) and an external clock source.

/media/uploads/Lykos1986/_scaled_post_schematic.jpg

After the design of the schematic it was time to move to the PCB. From the menu bar of the Design Spark we select “Tools” and then “Translate to PCB”. The software will automatically load the layout editor with all of our components and the associated connections between those (the net-list in other words).

And the final result looks like this:

/media/uploads/Lykos1986/_scaled_post_pcb.jpg

For the first experiments we’ve used the etch method. For those of you that haven’t try this method of PCB fabrication then it is time to try it. It is simple and creates good results. The only drawback is that you have to deal with chemicals and precise timings (depending on how concentrate are your fluids). After a few tries and errors you will have results defiantly better that the next one!

/media/uploads/Lykos1986/_scaled_post_pcb_2.jpg

I will blame the aggressive chemicals for this one and possibly the old photo resist board! As the board is only one layer, we solder the audio in and out sockets upside down and then we wire everything for our first test board...

/media/uploads/Lykos1986/_scaled_post_pcb_3.jpg

Next, the first code tests...




calendar Page history
Last modified 04 Aug 2011, by   user Daniel Worrall   tag No tags | 5 comments  

5 comments on HQ Audio:

09 Aug 2011

Hello Daniel,

great to see the community expanding the Mbed platform more and more. I am planning on doing a project with the same audio codec myself. I already aquired one of these chips and am ready for some software development. If needed I am willing to assist in testing and debugging of the library and example project. I have done quite a lot of projects with the mbed. I wrote a couple of libraries, an I am planning on releasing them to the public soon. In everyday life I am working as a electronics hardware engineer.

regards,

Laurens

12 Aug 2011

Hi Daniel,

I was wondering which crystal you used cause in de datasheet the are like five different frequencies. And could you enlarge your schematic so it is readable or give me a link to the original?

best regards,

Wytse

18 Aug 2011

user Wytse Miedema wrote:

I was wondering which crystal you used cause in de datasheet the are like five different frequencies. And could you enlarge your schematic so it is readable or give me a link to the original?

Page 1.1 of the datasheet of the TLV320AIC23B states:

Quote:

The TLV320AIC23B features an internal oscillator that, when connected to a 12-MHz external crystal, provides a system clock to the DSP and other peripherals at either 12 MHz or 6 MHz, using an internal clock buffer and selectable divider. Audio sample rates of 48 kHz and compact-disc (CD) standard 44.1 kHz are supported directly from a 12-MHz master clock with 250 fs and 272 fs oversampling rates.

So 12 Mhz. A larger version of the schematic would be nice, although this chip isn't hard to connect. Just check out the pin definitions in the playback example, and you should be able to figure out how to connect two-wire and I2S connections. Power supply schema is pretty straight forward, connect all *VDD-pins to 3V3 (VOUT of Mbed), *GND pins to GND, and make sure you put like 100nF to ground at each VDD pin. Also the VMID-connection, which should be decoupled with 10u and 100n. Make sure not to forget pull-ups on the two-wire interface, these are not provided on the Mbed board.

If you run into further trouble I might help, you can send me a pm (in Dutch, if that makes it easyier :-)).

10 Dec 2011

Any suggestions for where I can get an evaluation board for a TLV320 (or other i2s DAC) ? I don't trust my soldering enough to roll me own.

10 Dec 2011

Hi Jonathon,

I think RS/DesignSpark were in the process of making a breakout based on this design. Not sure where they are on that, but you could maybe see if you could contact them on their DesignSpark site.

Simon

Please login to post comments.