USB Soundcard - Page 1
Forum section: electronics / projects

author: Ketturi
author_rank: Regular Contributor
timestamp: June 13, 2013, 02:18:03 pm
content: 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,PCM2706http://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.brdandhttps://dl.dropboxusercontent.com/u/59219269/USB%20Soundcard/Prototype.sch

author: jahonen
author_rank: Super Contributor
timestamp: June 13, 2013, 02:33:40 pm
content: 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

author: Ketturi
author_rank: Regular Contributor
timestamp: June 15, 2013, 09:14:24 pm
content: Well after more brainstorming, and wasting time using eagle, fourth version of board.Changes:Fits Seeeds cheapest 50mm x 50mm price classCan be panelized, up to 3 boards on one 50mm x 50mm PCBUses only smd parts, bottom completely flatMore compact, but still hand-solderableish by experienced hobbyistOnly one point grounding, less ground current loops between AGND and DGNDFinal strain relief in enclosureWill 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

author: kizzap
author_rank: Unknown
timestamp: June 16, 2013, 12:40:32 am
content: 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 outwww.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

author: Dajgoro
author_rank: Frequent Contributor
timestamp: June 16, 2013, 01:01:07 am
content: Nice chip.What kind of drivers are necessary to run it on a windows based PC?

author: FrankBuss
author_rank: Unknown
timestamp: June 16, 2013, 01:28:53 am
content: 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.

author: Ketturi
author_rank: Regular Contributor
timestamp: June 16, 2013, 08:41:44 am
content: Quote from: kizzap on June 16, 2013, 12:40:32 amWell 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.Quote from: kizzap on June 16, 2013, 12:40:32 amY's fixed, can I use excuse I did this very late night? Probably wasn't thinking much when I wired them x)Quote from: kizzap on June 16, 2013, 12:40:32 amNot 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.Quote from: kizzap on June 16, 2013, 12:40:32 amI 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 mineThanks for your comment, there was indeed flaws I may have not noticedQuote from: Dajgoro on June 16, 2013, 01:01:07 amIt 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!Quote from: FrankBuss on June 16, 2013, 01:28:53 amMyself 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.brdhttps://dl.dropboxusercontent.com/u/59219269/USB%20Soundcard/Prototype4.sch

author: amyk
author_rank: Super Contributor
timestamp: June 16, 2013, 09:18:04 am
content: 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.

author: Ketturi
author_rank: Regular Contributor
timestamp: June 16, 2013, 10:19:27 am
content: Quote from: amyk on June 16, 2013, 09:18:04 amWell 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.

author: FrankBuss
author_rank: Unknown
timestamp: June 16, 2013, 11:41:39 am
content: 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-/130902323468Doesn'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 inShouldn'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.

author: Ketturi
author_rank: Regular Contributor
timestamp: June 16, 2013, 12:33:49 pm
content: Quote from: FrankBuss on June 16, 2013, 11:41:39 amI'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 >.<

author: peter.mitchell
author_rank: Super Contributor
timestamp: June 16, 2013, 01:37:08 pm
content: could stick a small boost converter on there and build a cmoy headphone amp onto it?

author: FrankBuss
author_rank: Unknown
timestamp: June 16, 2013, 01:51:02 pm
content: Quote from: Ketturi on June 16, 2013, 12:33:49 pmYou 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.

author: toli
author_rank: Frequent Contributor
timestamp: June 16, 2013, 07:06:26 pm
content: 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.

author: Ketturi
author_rank: Regular Contributor
timestamp: June 17, 2013, 02:24:35 pm
content: Quote from: FrankBuss on June 16, 2013, 01:51:02 pmI 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.Quote from: toli on June 16, 2013, 07:06:26 pmI 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)

author: ve7xen
author_rank: Super Contributor
timestamp: June 17, 2013, 08:10:13 pm
content: Quote from: amyk on June 16, 2013, 09:18:04 amThese 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.QuoteI 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.

author: Dajgoro
author_rank: Frequent Contributor
timestamp: June 18, 2013, 02:10:05 am
content: Thanks Ketturi for the topic. I decided that I will try to build a similar contraption myself!

author: PA3BNX
author_rank: Regular Contributor
timestamp: June 19, 2013, 05:28:21 pm
content: Hello EveryBody,I am thinking also so do something with USB soundcard chips and PCBI 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 usesstandard window drivers etc.Then I could integrate all the switcher hardwareon 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 theon main PC mother board soundcard.I am also not good in drawing PCB boards.

author: Ketturi
author_rank: Regular Contributor
timestamp: June 19, 2013, 08:38:45 pm
content: 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.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)