Author Topic: MCU for USB Audio out  (Read 3580 times)

0 Members and 1 Guest are viewing this topic.

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 1024
  • Country: ch
    • LinkedIn Profile
MCU for USB Audio out
« on: January 25, 2022, 02:50:30 pm »
Good afternoon (o;

Looking around for a cost-effective MCU solution to hook up directly to USB FS/HS and use it as a USB audio speaker/line out with separate I2S codec...
and no 24-bit and high sample rates are needed.

So far I looked at following families/MCUs:

- STM32F446 (old and over compliocated example prohject)
- PIC32Mx (probabla free license wouldn't even allow to compile such a project, despite I don't like Microchip ;o)
- XMOS, heavily over-priced eval boards
- ESMT AD62550A, hard to get, but combine everything, USB , though I never used their ModusToolbox IDEaudio and Class-D amplifier, perfect for USB speakers
- Cypress PSoC 6 family (has a github repo for an example)

There's a nice ST application note (AN4711) describing how a STM32F0x2 series could be used as a cheap USB audio receiver with RC oscillator trimmingin software...
but also here no code snippets and it is rather old....


Any other suggestions?


thanks in advance
richard
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2499
  • Country: us
  • Yes, I do this for a living
Re: MCU for USB Audio out
« Reply #1 on: January 25, 2022, 03:02:56 pm »
For production or for a hobby toy?
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 1024
  • Country: ch
    • LinkedIn Profile
Re: MCU for USB Audio out
« Reply #2 on: January 25, 2022, 03:11:05 pm »
Mass production is my hobby (o;

No seriously.....hobby of course.....

Just installed the PSoC 6 IDE...and after some fiddling (Modus Toolbox doesn't like that you install it where you want ;o) the sample project compiled out of the box....
but not sure I should put CY8CPROTO-062-4343Wkit on my shopping list....as PSoC devices mostly come in high pin count packages....

 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2499
  • Country: us
  • Yes, I do this for a living
Re: MCU for USB Audio out
« Reply #3 on: January 25, 2022, 03:20:30 pm »
Mass production is my hobby (o;

No seriously.....hobby of course.....

Then if you want it to work out of the box use the XMOS kit and be done with it.

Anything else and you'll spend ages trying to deal with chip vendor USB stacks and interfacing to the converters.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: MCU for USB Audio out
« Reply #4 on: January 25, 2022, 04:38:12 pm »
maybe I missed something, but why do you want use a mcu for this purpose??

just go with the PCM2704 and you get all you need

if it's not just turning about learning how to do it, it simply doesn't make any logic sense to go down the mcu route
 
The following users thanked this post: pardo-bsso

Offline darkspr1te

  • Frequent Contributor
  • **
  • Posts: 522
  • Country: zm
Re: MCU for USB Audio out
« Reply #5 on: January 25, 2022, 05:39:23 pm »
Mass production is my hobby (o;

No seriously.....hobby of course.....

Just installed the PSoC 6 IDE...and after some fiddling (Modus Toolbox doesn't like that you install it where you want ;o) the sample project compiled out of the box....
but not sure I should put CY8CPROTO-062-4343Wkit on my shopping list....as PSoC devices mostly come in high pin count packages....
I also got into the PSoC 6 pool but found it very much hammer to swat fly when i last did a usb-mcu-audio out project , i've since had to repeat that project and found pi-pico to offer the same but with a lot less setting up and i had better access to USB side of things so implementing dual USB was easier.
 
i have not dusted off my PSoC 5/6 devices since (also the massive ide/libs needed killed my bw )


darkspr1te
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17806
  • Country: fr
Re: MCU for USB Audio out
« Reply #6 on: January 25, 2022, 05:42:43 pm »
Ditto, first, figure out why you want to use a MCU for this, as there are a number of existing integrated solutions for this, either for USB FS or HS.

Now if you still want a MCU-based solution for the flexibility, you can have a look at the Teensy 4 boards. Very powerful MCU, cheap boards, and they are Aduino-"compatible", coming with a number of audio libraries which should allow you to not only implement an USB to I2S device relatively easily, but also add some serious processing along the way. I'm not a big fan of the Arduino environment myself, but for this use case, and unless you're very proficient with all this, I'd say it's a very good option.

https://www.pjrc.com/teensy/td_libs_Audio.html

You can of course directly use the NXP SDK (which I have done) with those boards, although it's of course more involved.
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 1024
  • Country: ch
    • LinkedIn Profile
Re: MCU for USB Audio out
« Reply #7 on: January 25, 2022, 05:55:28 pm »
Well the non-MCU approach is preferred ;-)

And I could order now a few AD62550A chips on aliexpress....as mentioned USB FS and stereo d-class amp.

The PCM2704 looks promising...but as with many audio eval boards from TI, they are rather overpriced to the chip costs....

Nevertheless I will take a parallel road going the STM32 way...can't hurt to learn something about USB audio ;-)
Maybe PSoC 6 as well as their audio in/out example from github compiled out of the box...
 

Offline neil555

  • Contributor
  • Posts: 49
  • Country: gb
Re: MCU for USB Audio out
« Reply #8 on: January 25, 2022, 05:57:54 pm »
You could always use the Raspberry PI Pico

There's a USB soundcard project here ...

https://github.com/raspberrypi/pico-playground/tree/master/apps/usb_sound_card

 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17806
  • Country: fr
Re: MCU for USB Audio out
« Reply #9 on: January 25, 2022, 06:21:14 pm »
Well the non-MCU approach is preferred ;-)
(...)
The PCM2704 looks promising...but as with many audio eval boards from TI, they are rather overpriced to the chip costs....

The "problem" with the dedicated ICs is that the pricing of the official "eval boards" will usually be much higher than your typical MCU dev board.

But you can find a number of third-party boards that are much cheaper. eBay and Aliexpress are full of those boards with a PCM2704, for instance. For a few dollars...
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 1024
  • Country: ch
    • LinkedIn Profile
Re: MCU for USB Audio out
« Reply #10 on: January 25, 2022, 06:23:52 pm »
Interesting project...especially as I have few of those boards hete....
 

Offline nudge

  • Contributor
  • Posts: 22
  • Country: nl
    • Pareidolic Labs
Re: MCU for USB Audio out
« Reply #11 on: January 26, 2022, 03:57:21 am »
NXP LPC551x or LPC552x (Cortex-M33) might fit the bill.

Cheap devboards and heres some app notes:

AN12939 Implementation of 5.1-channel Audio Solution on LPC55xx
https://www.nxp.com/docs/en/application-note/AN12939.pdf

AN13447 How To Implement Multiple USB Audio Formats On LPC5500
https://www.nxp.com/docs/en/application-note/AN13447.pdf
« Last Edit: January 26, 2022, 04:06:32 am by nudge »
An Aussie living in Amsterdam | nudge.id.au | GitHub
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->