Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Best Microcontroller + Codec Chip for Audio

Status
Not open for further replies.

Dark_Neo

New Member
I'm looking for the best microcontroller and codec chip for capturing CD quality audio (8-bit, 44.1khz sample rate). The microcontroller would preferably have internal support for USB and a memory card format.
At the moment though I'm starting simple since this is my first foray into audio devices (and I'm not all that experienced with embedded devices anyway), my first milestone will be converting to digital audio and then converting straight back for output.

I know Maxim do a couple of good codec chips, but I'm not sure where to buy them in a package good for prototyping (or already mounted to a PCB with pin headers available).
 
Hi,

Texas instruments, as well as analog devices are good manufacturers of audio codecs. Most are fairly straight forward doing the job by themselves requiring only a microcontroller to configure registers via SPI, or I2C. There are so many including the ever faithful AC'97 codec (nabbed one from a soundcard a few years ago).

Packaging can be an issue as they are not available in DIP...as least I've yet to see one. However, there are plenty of SMD -> DIP adapters around (ebay, digikey, farnell, RS etc..). If would mean soldering the chip yourself, but it is not that difficult...tape the chip in place, plenty of flux, THIN solder...just flood all the pins along one side then use a desoldering tool (or copper solder braid) to take off the excess.

As for a micro, check out https://www.sparkfun.com Or https://www.olimex.com/dev/index.html

both have nice cheap dev boards for many micro's, some of which have built in USB and SD card sockets. They also provide example code for you (as well as a wicked forum).

It is quite a big project to take on, however, since most of the work is done automatically by the codec chip, I'm sure once you get going it should be fairly straight-forward. it is just a question of programming the micro for various task (USB, SDcard reading/writing etc..).

Also note that '44.1Khz' is pretty old now. Although CD's still use that sample rate, generally (for crystal selection purposes) it is 48kHz or 96kHz also many codecs are 20-24bit. You 'may' be able to get some discontinued codec chips from ebay, but these will still be surface mount, just with the old 16-bit 44.1kHz.

Failing that...you could always buy a cheap soundcard, as they go for about 9USD now days, and solder wires to parts of the board to give you access to the codec. It will have all the necessary analogue on board for line inputs and output, and you could bypass the PCI connection.

Blueteeth
 
Perhaps you should be aware that CD is 16 bit, not 8 bit.

Oops! I was reading through some Atmel docs at the time, got 8 bit stuck in my head.

Thanks for the advice Blueteeth, it is a big project, but I tend to learn best when I take a big project and break it down into separate parts. Plus I have several books I'm reading through before I actually pick up the soldering iron.

I was looking for CD quality mainly because it seemed the most likely to have DIP packages available, and I've heard mixed reports on how much better the higher rates are. I've got an old soundcard I believe is based on the AC'97 codec, so I'll look into how practical it would be to seperate the codec chip and mount it on an adapter.
 
Dark_Neo said:
Oops! I was reading through some Atmel docs at the time, got 8 bit stuck in my head.

Thanks for the advice Blueteeth, it is a big project, but I tend to learn best when I take a big project and break it down into separate parts. Plus I have several books I'm reading through before I actually pick up the soldering iron.

I was looking for CD quality mainly because it seemed the most likely to have DIP packages available, and I've heard mixed reports on how much better the higher rates are. I've got an old soundcard I believe is based on the AC'97 codec, so I'll look into how practical it would be to seperate the codec chip and mount it on an adapter.


Agreed, anything over '16-bit' isn't necessary for audio, its mainly for advertising hype, 'audiophiles' and to make up for the fact that many soundcards/hifi's have crap analogue, which means the 2 MSB's are just noise anyway. 32-bit cards are pointless :D Same with sample rate as well...96kHz....44.1 doesn't leave much room for a low pass filter to attenuate <20Khz, so 48 I guess 'may' sound better in cheaper systems.

I'm the same with 'big projects'. Takes forever, but I'm stubborn and I generally learn a hell of a lot if I take on something overly ambitious, never give up.

By all means keep searching for a DIP codec...I'm sure there has to be some about somewhere. Failing that, at least SOIC isn't too bad. I think Texas instruments have quite a few available in SOIC. Just avoid TSSOP, TQFN etc.. as the pin pitch is ridiculous. Can be hand soldered, but it does get silly.

'Desoldering' a SMT chip off a board is another issue. Before, I meant to leave it on the board, and solder wires to traces/other compoonents, to use it 'in system'. It would save you a lot of hassle (and grey hairs) to get a new one and use an adapter. Its just too easy to destroy components whilst desoldering unless you're careful/experienced.

Sorry, I'm ranting. Good luck to you sir. Bout time there were some more 'digital audio' projects about. The net is just full of overly hyped 'headphone amps'.

Blueteeth
 
I did consider using the codec in place, but I think that would complicate debugging, since I'd have to check I'm not leaking power into the rest of the card, etc.

Where would you recommend buying new SMD AC97 codecs? I usually use Rapid for components, but they don't tend to stock specialized IC components.

I find aiming high in projects makes you learn more in a shorter amount of time, since even if you fail, you'll still have achieved more than taking the more academic route. I've never known anyone good with computers that's just stuck to learning theory, never getting their hands dirty. At my college a lot of the class left with distinctions, even though one of these people actually put this sentence in their coursework: "MP3 compression improves the quality of CD audio" :p

My eventual aim is to have a USB recording-only soundcard, that has an LCD panel and a memory card for offline recording. Depending on how getting to that point goes I may even include a DSP. I'll happily post schematics and code on here once I'm done.

Dark_Neo
 
Good call on the debugging thing...it would be a night mare to completely isolate the codec (and its supporting componnents) from the rest of the board.

I too use Rapid, wonderful company, but they don't do the high end stuff...for that I use Farnell - who do pretty much everything. Theres a minimum order or 20 quid I think, but they are pretty good.

Oh you're a computer guy huh? grrr I'm electronics, hardware, although in this day and age its all going towards high end software...I'd much rather solder something up than write C#. Lol 'mp3 improves..' tsk tsk.

It seems we are doing similar projects, as I wish to build a USB soundcard for recording...as almost all <£150 soundcards are pretty noisy on the analogue side, so external is the answer. I would buy one but I like to customise things for my applications. Texas instruments (I'm not being paid by them, honest) do some USB1.1 codecs which appear to be easy to use. They include a USB interface, with drivers, the ADC's/DAC's and other on-chip goodies like headphone amps and EQ. Sounds like a nice one chip solution to me...and you could use the microcontroller to configure it and drive an LCD. As well as get the audio data and dump it in an SD card for 'offline' stuff.

PCM2900 - PCM2912. These are old, 16 bit, and only use USB1.1. Only available in SSOP (super tiny). Also...
**broken link removed**

They may be agood starting point for you. Farnell have a great search function, so you can just view 'all codecs' and eliminate the ones with features you don't want/need.

After that you could think about seperating the USB part, and designing/coding that from scratch. Few USB trasncievers work at the full 480Mb/s, but I tihnk 12Mb/s is enough for at least 2 channels.

Good luck, I'm sure many manufacturers include USB codecs, but there are some very small specialist chip companies out there.

Blueteeth
 
Blueteeth said:
It seems we are doing similar projects, as I wish to build a USB soundcard for recording...as almost all <£150 soundcards are pretty noisy on the analogue side, so external is the answer.

Have you considered just buying one?, such as this:


At £25 you can't really go wrong, and you can build your own external analogue bits for it (or buy a Behringer mixer to go with it).
 
Blueteeth said:
Same with sample rate as well...96kHz....44.1 doesn't leave much room for a low pass filter to attenuate <20Khz, so 48 I guess 'may' sound better in cheaper systems.
There's not much point in sample rates above 48kHz which allows ample room for an anti-aliasing filter to work.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top