Author Topic: USB audio codec for a microphone  (Read 3469 times)

0 Members and 1 Guest are viewing this topic.

Offline werediverTopic starter

  • Contributor
  • Posts: 24
  • Country: nl
USB audio codec for a microphone
« on: March 25, 2021, 03:25:07 pm »
I'm thinking about building a microphone with a (semi-) decent ECM cartridge (maybe AOM-5024L-HD-R) and a preamp-compressor (probably SSM2166 or SSM2167) for use with a computer (a laptop).

Both the ECM and the preamp require power, and I'm not sure a typical computer TRRS socket is designed to supply enough current (the mentioned ECM operates at about 500 uA, while SSM2166 declares 7.5 mA [2.3 mA for SSM2167] consumption). A USB socket must be somewhere nearby, but using it for power only would yield an ugly device.

At this point I'm looking for a simple to use USB audio ADC / codec and virtually the only thing I found so far is TI PCM29xx family of products, most of which are 2 in / 2 out devices, which feels like an overkill.

My main question is:
  • Could you recommend a more minimalistic IC I can use for a single channel microphone?
I'm also a bit concerned about whether SSM2166/SSM2167 will output good quality sound. If you don't think it will and can recommend a better preamp-limiter IC or circuit, I'd appreciate that too.

Thank you for your time.
« Last Edit: March 27, 2021, 10:47:10 am by werediver »
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: USB audio codec for a microphone
« Reply #1 on: March 25, 2021, 05:19:08 pm »
more minimalistic than a PCM2912A is barely possible. It requires nearly no external components and offers reasonable good audio quality

p.s. the SSM2166/67 offer acceptable sound quality; I'm using them in both, hamradio and guitar circuits as compressor/limiter; as simple dynamic range reduction for a mic, I'd use the SSM2167 only
« Last Edit: March 25, 2021, 06:44:09 pm by HB9EVI »
 
The following users thanked this post: werediver

Offline werediverTopic starter

  • Contributor
  • Posts: 24
  • Country: nl
Re: USB audio codec for a microphone
« Reply #2 on: March 25, 2021, 06:30:55 pm »
more minimalistic than a PCM2912A is barely possible. It requires nearly no external components and offers reasonable good audio quality

Sure, I just thought maybe there are chips with only the CO- part of a CODEC :) ([en]coder, audio input without audio output), but I haven't found such and your reply suggests I probably won't :)
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1194
  • Country: ca
    • VE7XEN Blog
Re: USB audio codec for a microphone
« Reply #3 on: March 25, 2021, 08:01:45 pm »
The problem with PCM2912A is that the USB descriptors are fixed. So even if you don't connect the DACs to anything, it will present it to the bus, and the PC might try to use it for audio output. Other than that, it's about as simple as you'll get for this.

You may consider CM6327A which is just a mono USB ADC, exactly what you seek. Or CM118B (or one of their other chips, they have a bunch), which allows to put it into 'microphone mode' where it will only present the input channel to the PC. Audio performance of these ADCs is similar to the TI part (which is acceptable but not great). You might have a hard time getting your hands on them, though.
73 de VE7XEN
He/Him
 
The following users thanked this post: werediver

Offline werediverTopic starter

  • Contributor
  • Posts: 24
  • Country: nl
Re: USB audio codec for a microphone
« Reply #4 on: March 26, 2021, 09:26:14 am »
The problem with PCM2912A is that the USB descriptors are fixed. So even if you don't connect the DACs to anything, it will present it to the bus, and the PC might try to use it for audio output. Other than that, it's about as simple as you'll get for this.

This is nasty. I hoped audio output can be turned off on that chip. Thank you for mentioning this.

You may consider CM6327A which is just a mono USB ADC, exactly what you seek. Or CM118B (or one of their other chips, they have a bunch), which allows to put it into 'microphone mode' where it will only present the input channel to the PC. Audio performance of these ADCs is similar to the TI part (which is acceptable but not great). You might have a hard time getting your hands on them, though.

A mono USB ADC is indeed what I seek. CM6327A doesn't show up where I usually buy parts, but I can find it on AliExpress. I suppose, it's acceptable in my case.

CM6327A datasheet doesn't say a lot about the typical application (in terms of circuitry around the chip) and I can only find some photos of commercial product PCBs on the Internet. It seems, thought, that CM6327A can be used without uC control and even without EEPROM (with the default product string, PID, VID [sounds fine to me, also not planning to use more than one mic on the same machine]), and judging by those photos, the circuitry around the chip is not too complicated.

Would be nice to take a look at some example design around CM6327A, though. Have you seen any out there?
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7909
  • Country: nl
  • Current job: ATEX product design
Re: USB audio codec for a microphone
« Reply #5 on: March 26, 2021, 09:56:45 am »
PCM2902-12 is preatty much as barebones as it gets. They are on the market for more than a decade, and while there isn't anything exceptional about them, you don't actually need all that much for a basic audio device. USB 1.1 had this limitation. UAC2 never really happened, and nowadays everyone wants bluetooth and other interfaces.
There are better products but most of them will require some sort of programming or connecting more than one IC together.
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2420
  • Country: gb
Re: USB audio codec for a microphone
« Reply #6 on: March 26, 2021, 10:35:57 am »
@OP
Just in case you are considering going "full custom" route with a microcontroller, this is quite a nicely documented example:
https://andybrown.me.uk/2021/03/13/usb-microphone/
 
The following users thanked this post: werediver

Offline werediverTopic starter

  • Contributor
  • Posts: 24
  • Country: nl
Re: USB audio codec for a microphone
« Reply #7 on: March 26, 2021, 10:48:03 am »
@OP
Just in case you are considering going "full custom" route with a microcontroller, this is quite a nicely documented example:
https://andybrown.me.uk/2021/03/13/usb-microphone/

Hey, it's a very interesting and pretty detailed article! Thank you for mentioning it.

The hardware design isn't even that complicated, but clearly it pushes some complexity towards software (firmware). I have nothing bad to say about this approach, and the project is cool 8), but I'd prefer a more analog design. Well, maybe because I have enough software development during work hours :)
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1194
  • Country: ca
    • VE7XEN Blog
Re: USB audio codec for a microphone
« Reply #8 on: March 26, 2021, 06:56:30 pm »
CM6327A datasheet doesn't say a lot about the typical application (in terms of circuitry around the chip) and I can only find some photos of commercial product PCBs on the Internet. It seems, thought, that CM6327A can be used without uC control and even without EEPROM (with the default product string, PID, VID [sounds fine to me, also not planning to use more than one mic on the same machine]), and judging by those photos, the circuitry around the chip is not too complicated.

Would be nice to take a look at some example design around CM6327A, though. Have you seen any out there?

They seem mostly interested in low-cost, high-volume consumer product manufacturers, so there's not great public documentation, especially for such a niche chip. We're lucky they publish datasheets. The critical thing missing here seems to be the default EEPROM settings, it's possible it just boots up muted and without an EEPROM. How to use the GPIO is also missing, and some PWRSEL pins are referenced but not defined. You could try e-mailing them, can't hurt. On the bright side, these chips are designed for absolute lowest cost in a typical application, which means a minimum of external components is likely required, so the EEPROM is almost certainly optional for a typical design.

I haven't seen any designs well documented; my own interest is on the high end side, so I've spent some time trawling CMedia for useful chips, but only actually used the CM6631A (USB UAC2 -> I2S) (and then just on a devboard, I decided to implement this function myself in the end since this requires 'firmware' that is not trivial).

Quote
Hey, it's a very interesting and pretty detailed article! Thank you for mentioning it.

The hardware design isn't even that complicated, but clearly it pushes some complexity towards software (firmware). I have nothing bad to say about this approach, and the project is cool 8), but I'd prefer a more analog design. Well, maybe because I have enough software development during work hours

With a digital mic, there's practically no analog at all! Intermediate option might be using a separate I2S ADC and a similar software design, but you're unpacking the microphone part more than the microcontroller part which would be largely the same.

The 'struggle' here so to speak is that low end, value solutions will be completely integrated with a fixed configuration (as you are finding that you generally get either just a DAC or a DAC+ADC, but not often just an ADC) like the CM6327A, but once you move away from that, there's too much configuration required for a fixed solution, and if you're going to need a micro anyway, you may as well implement the USB there too. There are still a couple products out there that bridge that gap (handle USB<->I2S but require an external micro for configuration), but not many. See CP2615/CP2114 (now NRND), or maybe SA9227 that is even less well documented than CM6327A.

You will find USB UAC1 app notes for most USB microcontrollers that contain an I2S peripheral, though.

I've done a fair bit of digging around this area, and if you don't want to use a firmware-based implementation, you don't have many options. Most integrated chips include DACs as well, and most USB-I2S bridges, which are few and far between anyway, aren't configurable enough for this.
73 de VE7XEN
He/Him
 
The following users thanked this post: werediver

Offline werediverTopic starter

  • Contributor
  • Posts: 24
  • Country: nl
Re: USB audio codec for a microphone
« Reply #9 on: March 27, 2021, 04:23:14 pm »
At this point I'm starting to digress towards the idea of using a µC to implement the USB audio interface. The trade-offs of the integrated solutions discussed above just make me sad; you know, it's a hobby project and I want it to be right (or, well, as close as possible to what I imagine). Having unused audio outputs (with PCM29xx) or lacking documentation (CM6327A) seems just wrong.

I'd be happy to try out the SAMD21 board (XIAO) I already have, but there seem to be so much more information about USB audio on STM32—even the above mentioned Andy Brown's USB mic project—that I may just go straight for STM32 to shorten the route.

I still want an analog mic+preamp-compressor part (as an exercise for myself, if nothing else), hence a dedicated ADC (16-bit at least).
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2420
  • Country: gb
Re: USB audio codec for a microphone
« Reply #10 on: January 01, 2022, 03:35:29 pm »
Just adding something to this sleeping beauty...
Spotted another interesting USB microphone setup using an I2S microphone and RP2040 microcontroller running TinyUSB:
https://electronut.in/mico/
https://github.com/mkvenkit/mico
 
The following users thanked this post: werediver

Offline werediverTopic starter

  • Contributor
  • Posts: 24
  • Country: nl
Re: USB audio codec for a microphone
« Reply #11 on: January 22, 2022, 03:39:37 pm »
Quote
Spotted another interesting USB microphone setup using an I2S microphone and RP2040 microcontroller running TinyUSB:
https://electronut.in/mico/
https://github.com/mkvenkit/mico

A couple of boards that may be suitable / interesting for a similar uptake:

- Seeeduino XIAO RP2040 (tiny; would need an equally tiny daughter-board with a mic)
- Seeeduino XIAO BLE Sense (nRF52840 with MSM261D3526H1CPM mic)

The latter one is, basically, only lacking a firmware to become a USB microphone.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf