Author Topic: USB Soundcard  (Read 10235 times)

0 Members and 1 Guest are viewing this topic.

Offline KetturiTopic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: fi
    • Ketturi Electronics
USB Soundcard
« on: June 13, 2013, 02:18:03 pm »
Hello fellow enthusiast. I got couple of those cheap $2 usb soundcard things, which were absolutely crap, as I should have expect. So of course I can do better than that. I found this relatively cheap IC from TI,PCM2706 http://www.ti.com/lit/ds/symlink/pcm2707.pdf, which is well integrated USB audio interface & DAC & headphone amplifier. I brainstormed bit in local hacklab's IRC channel, and ended up with dongle, which have integrated USB cable (holes are for mounting like that
) and headphone jack at other end.
I quickly drew schematics and board for that, pretty much straight from appnote, which will probably work well enough.
But now I have some problems and questions about Eagle, PCB design and PCB fabrication.

First questionthing: I would want to use SMD headphone jack, but can't found one from Eagle, and there seems to be no ready CAD model for one I would want to use. http://www.rapidonline.com/cables-connectors/3-5mm-low-profile-surface-mount-stereo-jack-socket-silver-plated-400569/ Has anybody seen CAD files for this one, and for some reason not even Farnell or Digikey seems to have this or similar SMD jacks. Most are old trough hole versions or weak and not so good smd ones. So where I should look for good quality 3.5mm jack with good physical strength which have Eagle or convertible cad library. Or should I build my own eagle component for that, or just use plain SMD pads and put them in place using layout editor?

Second question: Am I doing that ground-plane thing right? If I understand correctly it would be good to separate digital and analog grounds, and tie them together only from couple points. And I can't get it to fill whole PCB area, It always leaves big margin to edges, is this necessary for manufacturing? Should I also make one ground for chassis, where USB shield and metal enclosure/shield is connected.

Third: I'm looking for smaller footprint crystal, which type I should use? It should be good quality, not those small Chinese cylinders, which have freq stability of ADHD patient. And it should be big enough to be hand soldered, so probably not those ones which have pads underside.

Fourth: What should I do for board that it would look good, I mean in eagle, I messed around and vias lost drillholes, and somehow it is not looking like many other boards I have seen. And how I should convert it to gerbers etc. stuff that manufacturer approves. I tried Seeeds Fusion PCB service design rules, and Eagle nagged about clearance between IC leads and tracks going under 0603's, which definitely should not be a problem. I do not know, it just somehow feels like I am doing something completely wrong.

And yeah, I would happily hear tips and helps and criticism about design and PCB making. I tough about using Seesd's PCB service, but then I need to shrink whole pcb to 50mm length. Is there other good and easy and cheap prototype board makers, which do small batches of boards.

And sorry about language, as well that I'm probably asking questions already answered. Not sure if this belongs to PCB/EDA/CAD Discussions or Projects? Well I'll leave it here. 

PS. https://dl.dropboxusercontent.com/u/59219269/USB%20Soundcard/Prototype.brd and https://dl.dropboxusercontent.com/u/59219269/USB%20Soundcard/Prototype.sch
« Last Edit: June 16, 2013, 09:00:33 am by Ketturi »
Ketturi electronics: http://ketturi.kapsi.fi
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: USB Soundcard
« Reply #1 on: June 13, 2013, 02:33:40 pm »
Since your components are nicely partitioned into digital and analog sections, I'd just put one contiguous ground plane. Usually that produces least amount of unexpected surprises.

Regards,
Janne
 

Offline KetturiTopic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: fi
    • Ketturi Electronics
Re: USB Soundcard
« Reply #2 on: June 15, 2013, 09:14:24 pm »
Well after more brainstorming, and wasting time using eagle, fourth version of board.

Changes:
  • Fits Seeeds cheapest 50mm x 50mm price class
  • Can be panelized, up to 3 boards on one 50mm x 50mm PCB
  • Uses only smd parts, bottom completely flat
  • More compact, but still hand-solderableish by experienced hobbyist
  • Only one point grounding, less ground current loops between AGND and DGND
  • Final strain relief in enclosure
  • Will be molded in clear acrylate(?)

Now I just need to get eagle files fixed so that they can be used for manufacturing. And that's the thing I don't know how.
I'm blind for my own mistakes as the case usually is, but I'm pretty sure there shouldn't be problems, anyway anything obvious.
Toughs about this design would still be appreciated. I have no money to do batch before late summer, aand Kickstarter style doesn't work very well with our laws, so this project will be delayed. I hope TI will not stop making PCM2706 before that :P
« Last Edit: June 16, 2013, 09:01:24 am by Ketturi »
Ketturi electronics: http://ketturi.kapsi.fi
 

Offline kizzap

  • Supporter
  • ****
  • Posts: 477
  • Country: au
Re: USB Soundcard
« Reply #3 on: June 16, 2013, 12:40:32 am »
Don't take what I say for gospel in any way but I can see a few issues.

Im going to make the assumption that all the green dots are vias, and that your AGND and DGND are connected on the back.

So first question is, why join them on the back at only one spot? Star grounding is Good when there is only one path to ground to avoid loops, but the way you have it atm has everything heaped together on analogue and everything heaped together on digital which is connected at one point.

Secondly, on the analogue side, I spy two vias that are USELESS. more drills = more fab time = higher cost. If you are worried about the blank board space, put another polygon in there and  just have it not connected to anything.

Third, I spy 5 vias on the analogue side that are electrically connected by copper on the top side. Then looking at the Digital side there are 10!

Fourth, I don't really know, but I'm pretty sure this is frowned upon, I can see 3 "Y" connections on traces that have an angle of 45 degrees on them. IIRC, this can cause acid traps, which are bad  :(. The good news is that all of them can be fixed by going through the pad of the component they are placed near.

Finally is there a particular reason that you are not using a microUSB connector (Im assuming cost?)

As an added bonus, go check out www.oshpark.com. Great manufacturing option, cheap, and the great thing I find with it, is that if you look under "Design Rules" there is a .DRU file there,  which you can load into eagle, and it will check your entire board for manufacturing errors that his service is not capable of doing. Oh, and oshpark will allow you to use the original eagle file for the upload, so no having to worry about gerbers.

-kizzap
« Last Edit: June 16, 2013, 12:42:52 am by kizzap »
<MatCat> The thing with aircraft is murphy loves to hang out with them
<Baljem> hey, you're the one who apparently pronounces FPGA 'fuhpugger'
 

Offline Dajgoro

  • Frequent Contributor
  • **
  • Posts: 322
  • Country: hr
    • hackaday.io
Re: USB Soundcard
« Reply #4 on: June 16, 2013, 01:01:07 am »
Nice chip.
What kind of drivers are necessary to run it on a windows based PC?
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: USB Soundcard
« Reply #5 on: June 16, 2013, 01:28:53 am »
It's only 16 bit, so I guess not much better than some of the cheap Chinese USB soundcards. But could be an interesting project.

If you want to buy it with a nice case, already working, search for "PCM2706" at eBay and you'll get some devices from $32 to $100.

I wonder if it would be cheaper and better quality to use a 3 chip solution: a microcontroller for the USB bus and I2S output, a cheap 24 bit stereo DAC like UDA1334ATS and an opamp for the output driver.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline KetturiTopic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: fi
    • Ketturi Electronics
Re: USB Soundcard
« Reply #6 on: June 16, 2013, 08:41:44 am »
Secondly, on the analogue side, I spy two vias that are USELESS. more drills = more fab time = higher cost. If you are worried about the blank board space, put another polygon in there and  just have it not connected to anything.

Third, I spy 5 vias on the analogue side that are electrically connected by copper on the top side. Then looking at the Digital side there are 10!
Well yeah, I may got bit too excited when placing vias,  I just tough it would be better if layers are tied togheter, there is many thin traces which would carry whole ground current but yeah, 100mA so probably just one via and thin track would do fine. And I tough as well it would be good to get shielding under that jack and capacitors, but it isn't necessary as this is only audio device. I'll remove most of them.
Fourth, I don't really know, but I'm pretty sure this is frowned upon, I can see 3 "Y" connections on traces that have an angle of 45 degrees on them. IIRC, this can cause acid traps, which are bad  :(. The good news is that all of them can be fixed by going through the pad of the component they are placed near.
Y's fixed, can I use excuse I did this very late night? Probably wasn't thinking much when I wired them x)
Finally is there a particular reason that you are not using a microUSB connector (Im assuming cost?)
Not cost reason, but micro usb is weak point. 2 connectors which bot aren't most rigid is not good. And usb cables are easily lost, I can never find one when I need. Integrated cable would be always with device, and would also be much more durable.
As an added bonus, go check out www.oshpark.com. Great manufacturing option, cheap, and the great thing I find with it, is that if you look under "Design Rules" there is a .DRU file there,  which you can load into eagle, and it will check your entire board for manufacturing errors that his service is not capable of doing. Oh, and oshpark will allow you to use the original eagle file for the upload, so no having to worry about gerbers.

-kizzap
I heard about that from the AmpHour! It seems interesting place and tough about trying it out, but not sure how shipping to Finland works, and I must admit that purple isn't favorite color of mine :P
Thanks for your comment, there was indeed flaws I may have not noticed :)

Nice chip.
What kind of drivers are necessary to run it on a windows based PC?
It uses HID interface, so it will work probably every system which supports USB without any external drivers. If it works even with mobile phone or tablet (my n900 finds usb audio device), there should be no problems with windows. Just Plug 'n Pray!

It's only 16 bit, so I guess not much better than some of the cheap Chinese USB soundcards. But could be an interesting project.

If you want to buy it with a nice case, already working, search for "PCM2706" at eBay and you'll get some devices from $32 to $100.

I wonder if it would be cheaper and better quality to use a 3 chip solution: a microcontroller for the USB bus and I2S output, a cheap 24 bit stereo DAC like UDA1334ATS and an opamp for the output driver.
Myself I can't hear difference between 16bit and 24bit well, and neither between 48khz and 192khz, I just want well integrated soundcard that just works, and comes in nice formfactor, those soundcards in ebay usually plug straight to USB port blocking other ports, and are plasticy and nasty. And I want create relatively cheap card, sub $30, but more than $10.

What comes to design with external DAC and opamp, I have no needed know how, how to do analog side eventhough I would want, and it wouldn't be much cheaper, as DACs and quality opamps are expensive stuff. I though using atmel xmega to programmable USB-I2S bridge, but that is too hard, I can't get even simple USB devices work! And creating all needed volume and audio controls etc... just forget it, I know my limits. Why not create whole embedded ARM computer for sound output right away! xD (well you could always use Android phone/RasbPI to stream music wirelessly and output it from professional USB soundcard and I am now completely sidetracked from original topic)


EDIT: Fixed board little bit:
https://dl.dropboxusercontent.com/u/59219269/USB%20Soundcard/Prototype4.brd https://dl.dropboxusercontent.com/u/59219269/USB%20Soundcard/Prototype4.sch
« Last Edit: June 16, 2013, 09:05:18 am by Ketturi »
Ketturi electronics: http://ketturi.kapsi.fi
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8270
Re: USB Soundcard
« Reply #7 on: June 16, 2013, 09:18:04 am »
I doubt you're going to get much better sound quality than those $2 dongles, the trick is all in filtering the noise and it looks like you haven't done much more than what the cheap ones have.
 

Offline KetturiTopic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: fi
    • Ketturi Electronics
Re: USB Soundcard
« Reply #8 on: June 16, 2013, 10:19:27 am »
I doubt you're going to get much better sound quality than those $2 dongles, the trick is all in filtering the noise and it looks like you haven't done much more than what the cheap ones have.

Well could you help me how to do it? As said, I don't know how to deal with analog design, filters are black magic for me. I used same filtering what appnote shows, I don't know if it is sufficient. But there is exactly 2 Electrolytic capacitor, 2 ceramic capacitors and 4 resistors more filtering, than in those $2 usb things I have seen.
Ketturi electronics: http://ketturi.kapsi.fi
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: USB Soundcard
« Reply #9 on: June 16, 2013, 11:41:39 am »
You can't produce a sound card with a nice case for $10, unless you produce 10 thousands of it. This one for $32 doesn't look like it blocks other USB ports and uses the same chip as your version, but an additional 24 bit DAC:

http://www.ebay.com/itm/HiFimeDIY-Sabre-Tiny-USB-DAC-Digital-to-Audio-Converter-ES9023-PCM2706-/130902323468

Doesn't make much sense for me, because the PCM2706 receives only 16 bit, but maybe they choose the additional 24 bit ES9023 DAC because it has lower noise. Looks like the PCM2706 has a digital output, which is fed into the ES9023. I still think a microcontroller would be much better and even cheaper, then using the ES9023 as the output chip, so a 2 chip solution, with no need for any complicated analog opamp circuit, which I'm also not an expert in :)

Shouldn't be too difficult to implement it in a microcontroller. Do you know the LUFA USB library? It has already an example for an USB sound card. You would need just to implement the I2S output side.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline KetturiTopic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: fi
    • Ketturi Electronics
Re: USB Soundcard
« Reply #10 on: June 16, 2013, 12:33:49 pm »
You can't produce a sound card with a nice case for $10, unless you produce 10 thousands of it. This one for $32 doesn't look like it blocks other USB ports and uses the same chip as your version, but an additional 24 bit DAC:

http://www.ebay.com/itm/HiFimeDIY-Sabre-Tiny-USB-DAC-Digital-to-Audio-Converter-ES9023-PCM2706-/130902323468

Doesn't make much sense for me, because the PCM2706 receives only 16 bit, but maybe they choose the additional 24 bit ES9023 DAC because it has lower noise. Looks like the PCM2706 has a digital output, which is fed into the ES9023. I still think a microcontroller would be much better and even cheaper, then using the ES9023 as the output chip, so a 2 chip solution, with no need for any complicated analog opamp circuit, which I'm also not an expert in :)

Shouldn't be too difficult to implement it in a microcontroller. Do you know the LUFA USB library? It has already an example for an USB sound card. You would need just to implement the I2S output side.

I'm not sure, it that is suitable for headphone output, as PCM2706 can't change digital output gain/volume, and I don't know if they even use ES9023 to change output level. Seems indeed bit odd design, wouldn't buy that one. Headphone driver and volume control is reason for whole project, as those china dongles I ordered are unusable for headphones, and poor for external speakers.

Yes I know the LUFA USB, but I have no clue how to use it on xmega, let alone how to do I2S and other controls, my software skills are minimal. It starts to look like I should just ditch whole project and stick to making blinking leds wit arduino and breadboards >.<
Ketturi electronics: http://ketturi.kapsi.fi
 

Offline peter.mitchell

  • Super Contributor
  • ***
  • Posts: 1567
  • Country: au
Re: USB Soundcard
« Reply #11 on: June 16, 2013, 01:37:08 pm »
could stick a small boost converter on there and build a cmoy headphone amp onto it?
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: USB Soundcard
« Reply #12 on: June 16, 2013, 01:51:02 pm »
Yes I know the LUFA USB, but I have no clue how to use it on xmega, let alone how to do I2S and other controls, my software skills are minimal. It starts to look like I should just ditch whole project and stick to making blinking leds wit arduino and breadboards >.<

You should try your soundcard, could be a fun project. You can always learn from it and later using other concepts. And another nice application: maybe it is possible to use it as a signal generator, down to DC, if you bridge the output capacitors. Unlike other commercial soundscards you know the schematic and layout and you can play with it.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline toli

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: il
Re: USB Soundcard
« Reply #13 on: June 16, 2013, 07:06:26 pm »
what about the alienDAC? It uses the PCM2702 which is similar (I can't remember the exact difference right now, and I'm too lazy to check :)). Personally I don't like its sound, but it does work, and its cheap.
There's also the GrubDAC (PCM2706) which has an additional IC for the DAC (WM8524), and it sounds very nice. I'm very happy with it.
I'd say its about the same as the Asus U3 USB sound card (which I use for its DDL support) in terms of sound quality.
My DIY blog (mostly electronics/stereo related):
http://tolisdiy.com/
 

Offline KetturiTopic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: fi
    • Ketturi Electronics
Re: USB Soundcard
« Reply #14 on: June 17, 2013, 02:24:35 pm »
Yes I know the LUFA USB, but I have no clue how to use it on xmega, let alone how to do I2S and other controls, my software skills are minimal. It starts to look like I should just ditch whole project and stick to making blinking leds wit arduino and breadboards >.<

You should try your soundcard, could be a fun project. You can always learn from it and later using other concepts. And another nice application: maybe it is possible to use it as a signal generator, down to DC, if you bridge the output capacitors. Unlike other commercial soundscards you know the schematic and layout and you can play with it.
I remember doing that many years ago! I removed all caps from old SB16 inputs and outputs, and used it as function generator and oscilloscope. They were like Windows 3 programs. Thats one useful idea, eventhouth frequency range would be very limited and it would need better output amplifier to drive logic. I will do one batch of PCBs when I get money and will test, if PCM2706 is usable for anything.
what about the alienDAC? It uses the PCM2702 which is similar (I can't remember the exact difference right now, and I'm too lazy to check :)). Personally I don't like its sound, but it does work, and its cheap.
There's also the GrubDAC (PCM2706) which has an additional IC for the DAC (WM8524), and it sounds very nice. I'm very happy with it.
I'd say its about the same as the Asus U3 USB sound card (which I use for its DDL support) in terms of sound quality.
I don't want buy some ready made usb DACs, but try make one myself. I will take a look for couple DACs and see, if they would be better for project, and if their gain can be software controlled. But first versions will be without external dac, I want try if PCM2706 is usable, maybe not for HiFi sound, but for normal speech and example getting audio out from devices that doesn't have soundcard at all(like OpenWRT routter as internet radio)
Ketturi electronics: http://ketturi.kapsi.fi
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1193
  • Country: ca
    • VE7XEN Blog
Re: USB Soundcard
« Reply #15 on: June 17, 2013, 08:10:13 pm »
I doubt you're going to get much better sound quality than those $2 dongles, the trick is all in filtering the noise and it looks like you haven't done much more than what the cheap ones have.
These TI USB DACs do a pretty admirable job with few external components. They are much, much better than onboard audio. I'm not sure how bad those $2 eBay dongles are, but the TI chips do about as well as theoretically possible. Here's an RMAA analysis of a very similar design around PCM2702: http://www.diyforums.org/BantamDAC/BantamDACrmaa.php .

Quote
Yes I know the LUFA USB, but I have no clue how to use it on xmega, let alone how to do I2S and other controls, my software skills are minimal. It starts to look like I should just ditch whole project and stick to making blinking leds wit arduino and breadboards >.<
I would be shocked and impressed if an AVR can do I2S at 1.5mbit/s for 48khz/16/2 with external clock generation. If you want to, I'd go with STM32 Cortex-M3 (F105 I think, which has an I2S peripheral), their examples include a USB Audio Class 1.1 implementation which works. A little bit of modification and it works in slave clock mode with 24bit samples and 96KHz too.

There is also SDR-Widget / Audio-Widget which has a USB Audio Class 1.1/2.0 firmware for AVR32. Thanks to UAC2 that one can do 192khz/24bit. But drivers are a problem on anything but Linux, since the OS vendors don't seem to want to implement the much-improved UAC2. The AVR32 packages are pretty tricky to solder though, I have damaged a couple of pins (luckily not important ones!) building my SDR-widget. Performance of this design is excellent.
« Last Edit: June 17, 2013, 08:16:01 pm by ve7xen »
73 de VE7XEN
He/Him
 

Offline Dajgoro

  • Frequent Contributor
  • **
  • Posts: 322
  • Country: hr
    • hackaday.io
Re: USB Soundcard
« Reply #16 on: June 18, 2013, 02:10:05 am »
Thanks Ketturi for the topic. I decided that I will try to build a similar contraption myself!  :D
 

Offline PA3BNX

  • Regular Contributor
  • *
  • Posts: 166
  • Country: nl
  • Trying to learn better programming and designing !
Re: USB Soundcard
« Reply #17 on: June 19, 2013, 05:28:21 pm »
Hello EveryBody,

I am thinking also so do something with USB soundcard chips and PCB

I want to use it for my Radio Direction Finding project.

https://www.eevblog.com/forum/projects-designs-and-technical-stuff/radio-direction-finding/

But I want a cheap USB chip witch can record 2 channels and uses
standard window drivers etc.

Then I could integrate all the switcher hardware
on one cheap PCB and it reduces the wires to my hardware.

But many radio amateurs are lazy hi and use a USB soundcard just bought or the
on main PC mother board soundcard.

I am also not good in drawing PCB boards.


Greetings,

Lodewijk

Credo:

Home brew projects:
Build/Design  with minimum hardware
and maximal software.
 

Offline KetturiTopic starter

  • Regular Contributor
  • *
  • Posts: 68
  • Country: fi
    • Ketturi Electronics
Re: USB Soundcard
« Reply #18 on: June 19, 2013, 08:38:45 pm »
I got some tips from one buddy of mine. Because I am using ground-plane design, every ground pad should be tied to ground shortest way possible. If you draw shortest line from every pad to ground, it is clear that without vias it would go long loop and multiple currents would mix up more in on path. Single point grounding would not work in my design. I might need also connect analog and digital planes together and make one solid ground, as I have small board and breaking grounds to 2 part can cause more troubles and benefits. But probably first version will be made with 2 grounds just to test my design, I can always later scrape soldermask off and solder them together or put some conductive tape. And when using Seeed the amount of vias should not be problem, any descent pcb fab should not ask price per via :P .I was also advised to put ferrite bead between USB 5v and IC. Added smd pad for usb shield too.
Now I'm just trying to get holes for vias back, somehow I lost them...


And how to name the project, USB sound card is boring name, how about "Ketturi usb Sound System aka. KuSS" or "FoxDAC" x)
Ketturi electronics: http://ketturi.kapsi.fi
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf