Audio DAC output Low Pass Filter. - Page 1
Forum section: electronics / beginners

author: paulca
author_rank: Super Contributor
timestamp: March 12, 2018, 09:11:39 pm
content: So I want to build up a quick PCB with a TI PCM USB DAC on it.The actual schematic doesn't look all that bad. But I'm a little confused about the output LPF.ThePCM2904 datasheetsays:QuoteBut the typical application circuit on page 26 shows the output going to LPF+Amp.I looked up low pass filters and while I get the basic jist of using 1, 2 or more RC blocks (orders) to get a sharp cut off above 20Khz, I keep finding stuff like this:http://www.ti.com/lit/an/sloa150a/sloa150a.pdfAnd back to maths fest.So this is one of my, without learning the totally in depth mathematical version from the TI design guides, what is the minimum I need to get the DAC working in a sensible way - posts? Do I just trust that it does indeed include an acceptable LPF and send the output straight to an output amp (or just straight out a jack)?

author: paulca
author_rank: Super Contributor
timestamp: March 12, 2018, 09:17:06 pm
content: The datasheet also states the output voltage is 0.6Vpp which is pretty much fine without an output amp, if driving a line input.It mentions the LPF I assume it means:-3db @ 250kHz and -0.03db at 20kHzDoes that sound fine?

author: josip
author_rank: Regular Contributor
timestamp: March 13, 2018, 08:21:31 am
content: Quote from: paulca on March 12, 2018, 09:11:39 pmIf there is any special reason for using PCM2904? Because, there are similar parts from TI, but with I2S output, that can be used as standalone audio DAC or as interface to another (maybe better) DAC chip.I used PCM2707 as interface to AD1865 and some Philips TDA devices, long time ago.

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2018, 09:34:17 am
content: Quote from: josip on March 13, 2018, 08:21:31 amI figured it was simple, easy, small, convenient. It's only for audio. It will be my first, so I thought I would start simple.I might start laying out the board tonight, assuming for now it's "included" LPF is enough.If my signal gen would arrive from china I could start playing with overlaying HF noise/signals on audio band signals and removing it with filters. Until then making LPFs will be a bit hit and miss or calculate and get the values right first time. Then again my scope's spectrum analysis is a bit rubbish.

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2018, 03:00:32 pm
content: Quote from: josip on March 13, 2018, 08:21:31 amI've been pondering this. So I went looking and sure enough the 2707 also has I2S output.... but it has a normal analouge output too.So I have to ask... why would you do this? Why would you use one DAC to interface with USB and output serial so a second DAC can read it and produce analogue?I can only think of a few reasons:1. You want to isolate the Analogue side from USB side and I2S is opti-isolatable?2. You want to use an audiophool DAC which high bitrates or higher than 16bit (or you want to use it for things other than audio).3. You want to use a high end DAC and don't want to limit yourself to one that has USB built in.The only one that actually appeals to me would be 1.When searching for DACs on RS Components it's not easy to find them for each purpose as the parameter search is a bit pants.In my current use case a simple, all-in-one chip is fine.

author: Wimberleytech
author_rank: Super Contributor
timestamp: March 13, 2018, 03:34:22 pm
content: Quote from: paulca on March 12, 2018, 09:17:06 pmNot familiar with that part, but my read of the datasheet agrees with yours. With the maximum sample rate of 48kHz, the on-chip filter may not be enough of a smoothing filter for your application (whatever that may be). If you wanted to keep it simple, just leave an option on your board for an additional simple RC filter.The 2nd order filter in the app note seems easy enough to implement...not sure why you would not go for it.

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2018, 03:51:49 pm
content: Quote from: Wimberleytech on March 13, 2018, 03:34:22 pmDo you mean the one on page 2 of this:http://www.ti.com/lit/an/sloa150a/sloa150a.pdfwith values from page 4?

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2018, 05:51:00 pm
content: Quote from: blueskull on March 13, 2018, 04:27:44 pmCan you explain what you mean?I have a PCM2707 here that sounds just as good as my sound card in my PC.When you say "reference design" what do you mean? Can you give me an example?

author: Buriedcode
author_rank: Super Contributor
timestamp: March 13, 2018, 06:32:25 pm
content: Quote from: paulca on March 13, 2018, 05:51:00 pmHere's the evaluation board for it:http://www.ti.com/tool/PCM2704EVM-Uhttp://www.ti.com/lit/ug/sleu114/sleu114.pdf- user guideThe user guide contains its schem - although I didn't see an LPF on the output, as it was designed for both 2704 and 2705 - the latter of which I believe has a headphone amp built in.Whilst not the best site, this one has a schematic with an LPF:http://www.electronics-lab.com/project/usb-sound-card-with-pcm2702/but that's the 2702. Same principle though.I wouldn't worry about "quality". Unless you're planning on listening to it with some expensive equipment, at very high volume I doubt you will hear the difference between that and a 2707, or one with an external "boutique" DAC. Whilst there are better specs out there, some of the distortion from USB DACs comes from jitter in the PLL anyway which is just the nature of isochronous USB audio, and I very much doubt anyone can actually "hear" that.Its a cool project especially as its something that is useful!

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2018, 06:38:22 pm
content: Quote from: blueskull on March 13, 2018, 06:04:21 pmGood enough for basic desktop audio playback, headphones, desktop speakers.I searched TIs website. If I want USB audio the only options are a $100 DSP/DAC dev/demo board which only has Windows GUI/driver software and a whole shed ton of features I don't want or need or... the PCM2xxx range of USB Audio codecs.The PCM2xxx range varies by age and features. I don't want or need SPDIF, mic input, signal processing, I2S or any of that. Thus the 2904 is the latest with the features I need.Of course if I split it into USB DAC + Analogue DAC I can get more options, but I don't see the need for this project and it's a nightmare to search for these DACs. Or I could implement a separate USB to serial adapater and a serial DAC and make a whole song and dance of a simple first attempt project. Chances are this won't work out of the box with Windows and Linux and I'll get into driver non-sense which I don't want. One reason I like the PCM range is I know they work in all my OSes out of the box without fannying around.Maybe next time.

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2018, 06:44:01 pm
content: Quote from: Buriedcode on March 13, 2018, 06:32:25 pmThanks. I believe the PCM29xx has clock reconstruction to prevent jitter. Though I'm not sure I fully understand the problem of if that is a solution.Audio is always annoying with people on forums. People will throw money into something and believe it's worth it when really if you put them into a test room and played 8 DACs at them they wouldn't be able to tell the difference. There are other audiophool threads.There are just reasons for high end DACs, but listening to music on a Friday night on Headphone or desktop speakers is not one of them.I have a 2707 here and it sounds fine to me. It does appear to have the amp built in, which I don't need.This is a first iteration. I am seriously considering splitting the DAC and opto isolating it to get rid of USB power noise, but not this time round.

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2018, 06:53:53 pm
content: The PCM2912 just looks like a 2904 with more features that I don't want. It's in a TQFP package, but the schematic looks very close, except the extra stuff for mic input etc. and the optional filter tap off pins. The headphone output looks useless. It's quite low power and designed for 16Ohm headphones. I only need line out to go to a separate headphone amp.One separate question. The 12Mhz resonator. When I search for these as SMD I get 3 pin devices, but the schematics only show two pins. Even the datasheet for the resonators I looked at where confusing and didn't actually include a coherent pin out.

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2018, 07:12:47 pm
content: Quote from: blueskull on March 13, 2018, 06:56:53 pmIt has the filter pins in use with the 2904 doesn't have. The only thing that looks like a LPF on the outputs is RCR with 3.3k, 100uF, 3.3k which doesn't look right.I was going to go with the active one from that app note earlier. I means another IC, the line driver, but that might not be a bad thing. Downside is the minimum order at RS is 10 of them. So I can have 10 of them for £10 or 1 of them from ebay for £5.QuoteI'm almost more confused now. Quoting the datasheet:QuoteBut nobody makes "Crystal resonators"!RS Components: We couldn't find any results for 'crystal resonator'They make "Crystals oscilators" and they make "Ceramic Resonators"I assume the IC is making it's own clock with a PLL and it wants a resonator to stablise it?If I choose a crystal does the 1 meg resistor across it still apply?When they say "generated by an external clock", does a Crystal count?

author: Buriedcode
author_rank: Super Contributor
timestamp: March 13, 2018, 07:58:48 pm
content: I believe they mean crystal as opposed to resonator (technically they are resonators). Like microcontrollers is has an on-board crystal oscillator (which is the driver part, without the crystal itself) and as such requires just the crystal and caps. Check out the evaluation board schem linked.So, just to reiterate: Yes you need a 12MHz crystal. I don't know about the parallel 1Meg resistor. It is sometimes used with such drivers, and I guess it won't hurt add a foot print for a 0805 res on the PCB, you don't have to populate it if it works without it. I don't think adding it will stop it oscillating.As for the choice about the PCM2704. I wont' comment on quality (as you mentioned, people do get rather "picky" with audio topics) but the fact it is "not recommended for new designs" generally means it can be expensive. But if there aren't any cheaper newer versions that have the features you want, then it doesn't matter. The fact its "old" doesn't make it bad, just means you *may* be paying more than you need to. I am unaware of newerand cheaperUSB DAC chips.

author: langwadt
author_rank: Super Contributor
timestamp: March 13, 2018, 08:11:50 pm
content: Quote from: paulca on March 13, 2018, 07:12:47 pmI'd assume with "crystal resonator" they meant "a crystal" a 1meg resistor parallel with the crystal it to bias the internal amplifier (oscillator)with external clock they mean a clock signal from somewhere else like a crystal oscillator, a usually 4 pin part that needs power and ground and then spits out a cmos clock signal

author: paulca
author_rank: Super Contributor
timestamp: March 13, 2018, 08:59:32 pm
content: Okay, I think I've got it.No board layout tonight, spent the evening programming rainbows. Yes, actually programming rainbow patterns for a MCU LED lamp I'm making for my daughter, it's quite pretty really.Anyway, I'll use a 12Mhz crystal and at least add the 1meg foot print, then I have options.I was starting to think the older chips might be cheaper too. A 2904 is like £9 a 2704 is only £5. Which only really makes a difference if I want to buy the traditional two or three. I have solder cooked at least one chip before.The frequency charts look a lot different though. The 2704 is a lot more random looking. (I know... call it a newbie technical term). The 2904 seems more consistent and designed rather than "happened".Different pin out also, so not drop-in replacements.For the etc. £4 I think I'll go with the 2904.I'm sure I'll mess this up at least the first time. Especially if I don't breadboard it, but just trust the published schematic!

author: josip
author_rank: Regular Contributor
timestamp: March 13, 2018, 09:04:04 pm
content: Quote from: paulca on March 13, 2018, 03:00:32 pmToday is different, with plenty of hi-res asynchronous USB audio (chip/device) products. Even multichannel open source projects.At that time (around 15 years ago), there was almost nothing related to USB audio, so I used PCM2707 as USB / I2S interface to old R2R chips, like AD1865, used in non-os, or TDA154X.You already have PCM2707, and you can try it (if you want) also with I2S connected, for example to 1$ TDA1543 in non-os, that can be pushed up around 8V, and with passive I/V can produce decent sound. Google will give you tons of related pages.

author: BrianHG
author_rank: Super Contributor
timestamp: March 14, 2018, 02:53:33 am
content: He can still use my 4 channel high speed opto-isolator for I2S isolation I posted in his pre-amp thread with a high end 2$-4$ dac which have built in oversampling to 384KHz and built in audio filtering with a 4.2v output. Building his pre-amp the way I suggested with a separate PCB for the USB audio sound card, if at any time he feels like it, he can upgrade just that part to get 192K 24bit audio from the USB without changing his main pre-amp PCB, just purchase one of those 25$ high definition USB to I2S boards which has I2S out.

author: Bassman59
author_rank: Super Contributor
timestamp: March 14, 2018, 03:05:01 am
content: Quote from: blueskull on March 13, 2018, 06:47:06 pmYou can't do 24/192 with USB Audio Class 1.0. That sample rate/word length requires more bandwidth than is available with Full Speed USB, which means you need High Speed USB. But, in order to use High Speed transactions, you need to use USB Audio Class 2.0.The PCM27xx part Paul is using generates the converter modulator clock (12.288 MHz or 11.2896 MHz) with a PLL which uses the USB start-of-frame as a reference. Is that clock good enough for the intended application? Sure. Is it the best thing you can do? No. What is generally used now is asynchronous isochronous transfers, where the data source and sink clocking is unrelated to the USB clocking. To manage the clock domain crossing, FIFOs are used, and to ensure that there are no FIFO overruns/underruns, USB has a rate-feedback mechanism which basically tells the host controller to hold off on packet requests. The local clocking is done with a high-quality oscillator at the modulator clock frequency. This also drives the converter clock.

author: Bassman59
author_rank: Super Contributor
timestamp: March 14, 2018, 03:27:51 am
content: Quote from: paulca on March 13, 2018, 06:44:01 pmIt has "clock reconstruction" because the converters require a modulator clock (at 12.288 MHz for 48 kHz sampling rate, 11.2892 MHz for 44.1 kHz sampling). Since the chip doesn't have dedicated oscillators for those frequencies, it synthesizes them using a PLL. The issue is whether the jitter in the synthesized clock is "acceptable." I put that in quotes because "acceptable" depends on the application.QuoteThat isolation isn't necessary. Careful PCB layout (you will need four layers) is important. And you will want to clean up the bus power. A buncha years ago, I did a USB audio design based on the now-obsolete TAS1020B. It had to be bus powered. I prototyped two power supplies that took in the bus +5V (which can be as low as 4.25 V, I think, and up to 5.25 V) and generated a "clean" +5 V for the op-amps and the CODEC. One of the supplies was based on an LT1613 switcher in SEPIC mode, and the other was based on a TI TPS60111 charge pump. Both worked well enough, meaning the noise from the supply wasn't affecting performance, and since the 60111 solution was cheaper, that's what was used. Oh, yeah, the 60111 has a clock input, so I took the I2S BCLK, divided it using 74HCT161 down to a frequency in the 60111's acceptable range, and used that to drive the charge pump. The micro needed 3.3V which was driven by an LDO hanging on the USB VBUS.

author: BrianHG
author_rank: Super Contributor
timestamp: March 14, 2018, 04:38:24 am
content: Quote from: Bassman59 on March 14, 2018, 03:27:51 amI know paulca said he wants to 'get rid of USB power noise', this is easily filtered enough, especially since he will have his own power supply on hand in his pre-amp. However, since he will be connecting that same device to other analog audio equipment, like an audio amplifier, blue-tooth audio receiver, separating his all analog pre-amp's GND from the PC/Laptop's switching supply which has an X cap to the GND of the AC wall outlet, leaking that current buzz on the GDN, this is where he can gain isolation/GND loop noise immunity degree of quality. Especially since he went through the trouble of using an isolated analog linear transformer supply for the pre-amp itself. If he is using exclusively headphones and not having any other analog devices attached to his preamp, I would say don't waste your time with isolation, or even a separate power-supply. Filtering the USB power is just too much easier and cheaper a solution.

author: paulca
author_rank: Super Contributor
timestamp: March 14, 2018, 07:57:00 am
content: As BrianHG points out this little module is a pre-cursor prototype towards a larger project with multiple audio sources and pre-amps, mixer and headphone amp. It's just that when I started to lay that schematic out I realised it was a fairly large undertaking with over 100 components embedded PSU and 4 layer board. I haven't even got to the bluetooth yet, although as that includes RF I will be sticking to a daughter card there.One miss understanding though is the pre-amp/mixer board will be using an embedded +-15V switching supply, which I am still trying to filter the spikes and ringing off. The ripple isn't that bad, but the ringing spikes are. Oddly it's not signal noise on the amps, they are not amplifying it, but it is present on the output of the amps due to it being present on the power rails. I have stuff for building RC and LC filters to try and clean that supply up.So, in short I am dividing and conquering through making prototypes of each module to gain experience and find the problems in smaller circuits before I try and build them all into one. With PCBs being so cheap to make these days and I find them fun, why not.This prototype will be dual layer and USB powered, however the PCM2904 has the option of powering from 3.3V (actually 3.6 to 3.8 something), so I be using a linear regulator to filter the USB power some. My USB is incredible noisy. We are talking about 500mVpp HF noise at times. This is due to it being a gaming PC with a huge graphics card and 650W switching PSU that pre-dates the energy efficiency initiatives. It is most definitely not a pro-audio PC!For this prototype I will start with an all-in-one TI PCM USB chip. If it sounds grand, I'll probably keep it that way.I might prototype a 2 stereo channel mixer PCB as well, interconnect them with jack leads, possible prototype the bluetooth audio board. Continue trying to filter the switch mode power supply.Eventually I'll build it all together into one board/case.Note I need the switch mode power supply as the intended upstream power source will be a 9-14V DC supply from a solar power battery. I could use a virtual ground, but I have come to hate them, not least because when I connect a USB device into the mix the Earth referenced ground kills the amplifier output.

author: BrianHG
author_rank: Super Contributor
timestamp: March 14, 2018, 09:49:11 am
content: Have you tried a boost converter for the USB which will take in 3-5v, output 6v, then use a linear LDO at that output to give you a clean 5v or 3.3v. Also, there exist DC-DC converters which will give you +/-5v and isolated ones. However, the isolated ones get expensive and big.

author: paulca
author_rank: Super Contributor
timestamp: March 14, 2018, 11:59:58 am
content: Turns out this will be an expensive little soundcard.BOM is up to £50. Granted that is enough to build about 5 or 10 boards, except the PCM2904 as I'm only getting one of them. Most of the other stuff comes only in 5s, 10s, or 100s. Of course I need to order a whole bunch of SMD passives in 50s or 100s.MicroUSB plug will have to come from Ebay as RS Components only sell them in 100s.So if I manage to order 10 boards for printing for £15, it would probably work out around £15 a device.Good job I'm not selling them. I only expect to make 2. It not about cheapness, if it was I would just buy another 2707 board from china for £2.50.

author: Buriedcode
author_rank: Super Contributor
timestamp: March 14, 2018, 01:59:45 pm
content: As you're in the UK, for connectors, low volume passives and discrete semiconductors, Rapid are hard to beat:http://www.rapidonline.comFarnell have a huge selection with less emphasis on volume than RS - although they charge £5 for shipping if the order is <£20.RS is great but as you've noticed they have lots of minimum order quantity on stock, this is to counter the fact they have abandoned shipping charges - that's right, you can order anything and get it delivered for free.In fact the above is the order in which I search for parts. Rapid don't have much in the way of semiconductors, but that's when I use Farnell. If they are out of stock, RS is back up. But often for "standard" stuff like passives, headers, wiring, connectors, proto boards, consumables etc.. my rapid orders are a good 20-30% cheaper than the equivalent Farnell order. They have sent me wrong parts a couple of times (but so have mouser, Farnell, and RS, it does happen) and just like the larger companies, handled it well by immediately posting replacements.I am not affiliated with any of the above, just saying, for hobbyists in the UK, rapid will get you 90% of what you need for low volume quantity. Farnell has pretty much 97% of what you need. Add mouser for specialist devices, and *ahem* ebay for Arduino clones/cheap dupont cables/cheap "modules" and that covers everything. Great time to have electronics as a hobby.

author: BrianHG
author_rank: Super Contributor
timestamp: March 15, 2018, 03:55:21 am
content: You mean something like this:https://www.aliexpress.com/item/PCM2704-USB-DAC-USB-Power-fiber-optic-coaxial-analog-output-Raspberry-Pi-Raspbian-RaspBMC-Windows-7/32715299458.html?spm=2114.10010108.1000014.4.7b844beeJaAfi8&traffic_analysisId=recommend_3035_null_null_null&scm=1007.13338.98539.000000000000000&pvid=c19462a3-d6f4-4e1b-90b9-8119ed0ea62d&tpp=1I2S out versionhttps://www.aliexpress.com/item/PCM2706-Digital-audio-USB-Daughter-Card-Support-I2S-DAC-decoder-Italy-Amanero-same-size/32810819623.html?spm=2114.search0104.3.16.4f41c0847VyXnT&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10151_10065_10344_10068_10130_10342_10547_10343_10340_10548_10341_10084_10083_10618_10139_10307_5711215_10313_10059_10534_100031_10103_10627_10626_10624_10623_10622_5711315_10621_10620_5722415,searchweb201603_12,ppcSwitch_5&algo_expid=3bead4c3-4593-4830-8a03-db48bc295106-2&algo_pvid=3bead4c3-4593-4830-8a03-db48bc295106&priceBeautifyAB=0If you are making your own from scratch, it would actually cost you less to use a PCM2706CPJT @ 6$ (Buying 1 brand new IC), use the PCM I2S out, you choose whether to optoisolate, feeding a PCM5101A dac @ 2.70$ (buying 1 brand new IC) (106db snr), or PCM5102A @ 4.72$ (112db snr) which have built in re-clocking, oversampling with digital filtering to solve all your analog reconstruction filter issues. Output is nothing more than a 470ohm resistor and a 2.2nf cap to GND. 2.1v output, no op-amps needed. Even with the missing parts, and even with a cheap 4 channel 150MHz optoisolator, you still come nowhere near 50$ for this and roast the PCM2904 10.75$ (buying 1 brand new IC) burr-brown USB-DAC's SNR & no need for reconstruction filters with this $2.70 dac since digitally upsamples 48KHz to 384KHz with optional FIR or IIR filtering.Actually, going this route makes this topic 'Audio DAC output Low Pass Filter.' obsolete, it's done digitally inside the DAC...And if you use a separate PCB for the PCM2706, at any time in the future, you can upgrade to HighDef usb audio 2.0 since it is the same I2S interface, just use a different jumper configuration on the PCM5101A/2A dacs.Example high definition USB audio board with PCM I2S out:https://www.aliexpress.com/item/CM6631-IIS-digital-interface-compatible-with-Italy-Amanero-USB-192K-32BIT/32810113692.html?spm=2114.10010108.1000013.10.4c3a48b5HzHmOi&traffic_analysisId=recommend_2088_5_90158_iswistore&scm=1007.13339.90158.0&pvid=89b16683-d7d6-4563-af3c-968bae4b24d4&tpp=1

author: paulca
author_rank: Super Contributor
timestamp: March 15, 2018, 08:05:58 am
content: It's not the chips that are the full problem. The 2904 is only £8. It's the fact I have no SMD passives. So I need:6 different types of resistor5 different types of capacitor3.5mm jacksMicro USB socketsadjustable linear voltage regulatorCrystalLow Vf Diodeetc. etc.If I swap the £9 chip for two which cost £4 or £5 it really won't help, plus it will move me into the realms where "plug and play" is threatened and I'll need to start fannying around with drivers. It also makes the board more complex and easier to screw up.Also, unless I'm mistaken you can't filter the "image frequencies" digitally. Any and all DACs need analogue LPFs to remove the octave harmonics produced by the digital to analogue process. This I got from a blog article on the TI website where this question was asked of one of their audio techs. That and way back when I did sampling theorem at uni although those days are very foggy.This project will remain simple and I'll maybe explore more complex I2S options after that.

author: paulca
author_rank: Super Contributor
timestamp: March 15, 2018, 04:07:44 pm
content: So, back to the original question about low pass filters.I found this:http://sim.okawa-denshi.jp/en/CRtool.phpIf I put in the values68R and a 100nF cap. I get a cut off frequency of 23kHz. However the drop off is quite slow and it creates a phase shift in higher frequencies, though I don't think I'd care.If I was to add 2 or 3 of these in series to create a 2nd or 3rd order will this sharpen the cut off above 23kHz?Also, I gather the capacitor value has the most effect on the frequency, but I'm struggling to understand the role the resistor plays in this and how to pick it's value. As I don't want to impede the output too much I was aiming for a low value, but that's a bit of a weak assumption.

author: Bassman59
author_rank: Super Contributor
timestamp: March 15, 2018, 05:54:39 pm
content: Quote from: paulca on March 15, 2018, 04:07:44 pmAll analog (IIR) filters work by creating phase shifts.QuoteIt's an RC filter. The cut-off frequency (the frequency at which the filter response is 3 dB down) isfc= 1 / (2*pi*R*C)So it is trivially easy to calculate the filter response.

author: tecman
author_rank: Frequent Contributor
timestamp: March 15, 2018, 06:03:41 pm
content: Interesting side note. During the heyday of CD players, a big selling feature became oversampling. In reality the issue was filtering the DAC output. A filter for 44.1 KHz with little attenuation at 20 KHz is not an easy task to make. Early CD players had 10+ pole filters made of of discrete analog R-C components. Tolerance of components was a concern and resulted in pricey parts. By oversampling a 160 KHz or higher DAC output filtered to 20 KHz only required a 3 pole or so simple filter. Much lower cost to produce with greatly reduced tolerance sensitivity. So much for the benefits of oversampling, other than the mfg's profit.paul

author: Buriedcode
author_rank: Super Contributor
timestamp: March 15, 2018, 06:34:28 pm
content: Lets not steer this topic into something about the pros and cons of Delta Sigma DAC,s oversampling etc.. We live in a wonderful time where we can buy DAC chips that have very high dynamic range, with high SNR and very low distortion for <$2.To the OP. I understand wanting to get things "right" before committing to a PCB design - no-one likes having to add extras on - so it is product to add foot prints for output filters, specifically opamp output filters. You could always just not populate these if you add a foot print for a jumper - maybe a 0805 0-ohm resistor - to bypass it straight to the output.Puting RC filters in series - using two caps and two resistors can indeed produce a two-pole filter with a steeper cut-off, but because they are not buffered, their gain is reduced because the second RC filter isn't driven by a zero-impedance output, its the output from another RC filter which generally has a high impedance. A 2nd order filter using an opamp is generally more accurate, and you can easily make this a 3rd order filter with a simple RC on the output (which is driven by the opamp = low impedance output).As with all things audio, one can get carried away trying to get things perfect, but then you'll never get a PCB made. I'd say, find a similar design on TI's website, copy it for your board, with the facility to bypass this.

author: paulca
author_rank: Super Contributor
timestamp: March 15, 2018, 07:37:26 pm
content: Quote from: Buriedcode on March 15, 2018, 06:34:28 pmThanks. I did pick their DAC output filter, but of course they choose their latest and greatest expensive line driver amp which cost over a £1 each and RS only sell them in 5s. Then of course it uses bizarre resistor values, so I have to buy another 3 resistors and one more cap. The filter alone BOM was £10.Still, it's not about price, it's about the fun. Spending a total of £60 including the PCB for one sound card is nuts, but I would have components to make half a dozen or just the start of an SMD stock pile for other projects. Besides, I have spent £60 on a night out before and only had a hangover to show for it.As you say I can add in some 0Ohm link resistors and try it with and without the output filter to see what effect it has on perceptible quality and on the scope.

author: BrianHG
author_rank: Super Contributor
timestamp: March 15, 2018, 08:17:21 pm
content: Quote from: paulca on March 15, 2018, 08:05:58 amDont forget the opamps & their associated filters. That chip has a tiny 0.5vp-p output. You've gone into an absurd high quantity of parts. And no, none of TI's Burr-brown's USB audio chips do not need any sound drivers.

author: Bassman59
author_rank: Super Contributor
timestamp: March 15, 2018, 09:13:03 pm
content: Quote from: paulca on March 15, 2018, 07:37:26 pmI'm completely lost. Exactly which chip are you using?

author: BrianHG
author_rank: Super Contributor
timestamp: March 15, 2018, 10:01:06 pm
content: Quote from: Bassman59 on March 15, 2018, 09:13:03 pmHe's also combining this project with another, maybe, so we can't be sure of all the degrees of stuff involved.

author: BrianHG
author_rank: Super Contributor
timestamp: March 15, 2018, 10:10:39 pm
content: Quote from: blueskull on March 15, 2018, 08:22:52 amWell, in the case of my chosen $2.70 DAC, it's even easier since it interpolates to 384ksps/2 = 192khz. The output filter is as shown in the data sheet, a 470 ohm resistor with a 2.2nf cap to GND giving you a smooth clean 0~20Khz band. You wont match that internal interpolation FIR filter's 0~20Khz reconstruction with any 48Khz dac and analog filters unless you are willing to pay for precision inductors, resistors & capacitors and numerous op-amp stages in the neighborhood of 25$ in parts, PCB area and power supply requirements.

author: paulca
author_rank: Super Contributor
timestamp: March 15, 2018, 10:19:28 pm
content: Quote from: Bassman59 on March 15, 2018, 09:13:03 pmThe TI DAC Output filter I found here:http://www.ti.com/lit/an/sloa150a/sloa150a.pdfThe figure 1 schematic.But I dropped it out after I figured I'd need to redo the maths for the gain level for my 2904The maths looks a bit forbidding. I'm sure I could plug it together, maybe with a bit of help.It's probably overkill. Anyone any links to a simpler design?

author: BrianHG
author_rank: Super Contributor
timestamp: March 16, 2018, 01:20:30 am
content: What sample rate will you be using?What king of gain do you want?What kind of output current?Also, make sure Window's wont deviate from that sample rate.

author: Bassman59
author_rank: Super Contributor
timestamp: March 16, 2018, 02:53:29 am
content: Quote from: paulca on March 15, 2018, 10:19:28 pmAhhh, OK.The point of the DRV603 is that it can drive “line level” audio output from a circuit which has only a single 3.3 V power supply rail. And it does it without a DC blocking cap. “Line level” in the pro-audio world is defined as +4 dBu, which is 1.23 Vrms or 1.7 Vpkor 3.4 Vpk-pk. You obviously can’t swing 3.4 V from a 3.3 V power supply.(For consumer audio, “line level” is -10 dBu, which is only 0.25 Vrms.)The chip does its magic with an internal charge pump, which generates an internal negative voltage rail. The amplifiers do some level shifting so the output is centered on 0 V, and it doesn’t clip below 0 V because of that negative rail.If you have a bipolar supply available, say ±12 V or ±15 V, then the DRV603 is unnecessary.Every audio DAC data sheet I’ve ever seen has an example output low-pass filter design in the “Applications” section. Just use that circuit.

author: paulca
author_rank: Super Contributor
timestamp: March 16, 2018, 07:41:33 am
content: Quote from: Bassman59 on March 16, 2018, 02:53:29 amApparently not this one or I wouldn't be here askinghttp://www.ti.com/lit/ds/symlink/pcm2904.pdfQuote from: BrianHG on March 16, 2018, 01:20:30 amShould be 48kHz.The 2904 output is 0.6Vpp, which might just be good enough, but if I'm adding an amp for the filter impedence buffer I might as well double that.Don't need much output current, it will drive a headphone amp line input.

author: BrianHG
author_rank: Super Contributor
timestamp: March 16, 2018, 08:00:54 am
content: Note when doing you calculations, you want at least 2.5vp-p going into your headphones for cheap cell-phone/mp3 player grade audio output levels. You would like this to be around 4vp-p for a kick-ass level, or an excellent level for high end headphone which may not have as much signal sensitivity.

author: paulca
author_rank: Super Contributor
timestamp: March 16, 2018, 08:18:02 am
content: It won't be driving headphones. It will drive a headphone amp. If I need extra gain I can always plug my stripboard baxandall pre-amp in.Just need to be lifted to a sensible level.Most of the oscilloscope traces I have seen from "domestic line output" or headphone ports have been between 500mVpp and 1Vpp. I think my phone is about the highest I have seen, but I expect it is current limited for nanny state as the headphone output isn't all that loud.Anyway I was watching YouTube last night and a obvious idea I have been missing popped up. If I want to avoid the mathematics, I can get something else to do it for me. LTSpice. So, once I get a few things out of the way first I'll have a play with a few simulations. I might start with the schematic for the TI line driver but put a more modest opamp in place, maybe with a rail splitter and play with the values to get something close to the cutoff I think I want.

author: DimitriP
author_rank: Super Contributor
timestamp: March 16, 2018, 11:17:03 am
content: QuoteThe PCM2904 is awfully similar to the PCM2900/2002/2906 which has a development board with "everything" spelled out on the wierdly included schematic (page 10) :http://www.ti.com/lit/ug/sbau195/sbau195.pdf

author: paulca
author_rank: Super Contributor
timestamp: March 16, 2018, 01:14:59 pm
content: Quote from: DimitriP on March 16, 2018, 11:17:03 amThanks. I missed that one, I found ones for the 270x but not the 2906. 2904 and 2906 are identical expect the 2904 has the SPDIF pins unimplemented.

author: paulca
author_rank: Super Contributor
timestamp: March 17, 2018, 02:48:25 pm
content: So I started laying the board out. The filter/amps allow a nice ladder of Rs and Cs up either side, but it isn't going to fit in the case I was hoping for. Won't be much bigger, but just a little.Question. When routing the audio signals around the board, between the DAC and the amps, does it matter if I run them beside each other or should I try and keep them as far apart as possible?Alternatively, should I push them down to the backside and route them through the ground plane to minimise capacitance?

author: paulca
author_rank: Super Contributor
timestamp: March 17, 2018, 04:51:21 pm
content: So, how bad is this for a first full attempt?Composite:Front side:Back side:VCom analogue ground net:Should the headphone jacks not be on VCommon? It didn't appear so from TI's schematic though.

author: Buriedcode
author_rank: Super Contributor
timestamp: March 17, 2018, 06:27:38 pm
content: No. The outputs from the opamps have DC blocking capacitors, so their output has no DC bias, so the output is referenced to GND. Vcom is at VCC/2 because that is the midpoint of the DAC's scale, and is used to bias the opamps meaning one doesn't require a bipolar supply.

author: paulca
author_rank: Super Contributor
timestamp: March 17, 2018, 08:39:37 pm
content: I keep wondering if I can actually place and air solder components that close together. Maybe I should spread out the lines beside the op amps. I can see it being hard to do the electrolytics as they didn't seem to like air soldering last time I tried and will need done with the iron. I could do them first though and only some of them look tricky to get at.

author: BrianHG
author_rank: Super Contributor
timestamp: March 17, 2018, 11:35:35 pm
content: Make sure your IC smd footprints are DIY assembly friendly. They don't look it.It may be just hard to tell from the photo...

author: paulca
author_rank: Super Contributor
timestamp: March 18, 2018, 11:06:38 am
content: Quote from: DimitriP on March 16, 2018, 11:17:03 amInterestingly I put this into LTSpice and the output of the amps is actually at -4dB compared to the input. (EDIT: Sorry I actually reading the plot wrong) the whole signal in and out is -4dB). So the amp has a gain of 1. ... I think...It does start to roll off at 10Khz, barely dropped before 20Khz when it's slope increases and gets linear (on the dB scale) around 30Khz and at 100Khz it's down at -26dB.Additionally there is a small phase shift below 10Hz which obviously won't bother me, most likely from the DC blocking cap or the 0.0018uF on the input. However there is a 40* phase swing between 10Khz and 20Khz, surely that would be audible? Although it does make me think of how one could use that to create a phase filter, always loved phaser pedals on distorted guitar.Swapping R101 to be a 7k resistor gives me 0dB output, without modifying the filter cut off, so I always have that option.

author: paulca
author_rank: Super Contributor
timestamp: March 18, 2018, 11:08:03 am
content: Quote from: BrianHG on March 17, 2018, 11:35:35 pmGood point. I've got fairly good with SMD soldering, but longer pads do make things easier.I wish KiCad's auto router could handle dragging components with the traces still attached. It can become a pain in the neck moving a component after it's fully laid out.

author: BrianHG
author_rank: Super Contributor
timestamp: March 18, 2018, 10:18:05 pm
content: Quote from: paulca on March 18, 2018, 11:08:03 amDon't just make them blindly longer. For your SSOP-28 pin, download this datasheet :http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en552327Use the footprint recommended layout on page 341. Switch the rectangular pads to rounded pads and increase the recommended width of each pad by 1x the pad's height. (Recovers loss due to pad rounding + gives you a tad more.) Also, I still like making pad 1 a rectangle for additional visual ID in case silkscreen is damaged.If your other IC is an SO-8 (I'm assuming it's an SO-8), download this data sheet:http://www.ti.com/lit/ds/symlink/msp430g2230.pdfUse the footprint recommended layout on page 45. Switch the...............

author: paulca
author_rank: Super Contributor
timestamp: March 19, 2018, 07:51:49 am
content: Quote from: BrianHG on March 18, 2018, 10:18:05 pmI made them 0.5x1.75 and rounded. They look slightly easier.Anyway I went looking for enclosures and the one I like that stands a chance of fitting is this one:http://www.hammondmfg.com/pdf/1551K.pdfBut it's 34mm x 74mm max PCB size which presents a challenge. The board as screenshotted above is 47x77, but there is unused space. Without the amps/filter it would be easy! The little chinese PCM270x I have here is on a board that must be 25mm x 40mm.The reason I like these enclosures is they come with PCB screw mounting holes in the base, so no fannying around with hot glue or drilling holes in the back and putting spaces in, which would mean buying hardware.I was trying Dave's idea of making small blocks off board and dragging them on. Regulator, 2x Amps, 1x DAC + connectors. However the trouble with this approach is that when the small blocks are dragged onto the board they don't make efficient use of space. Also, once dragged onto the board they are a pain to select and move again.Anyway I can move the DAC block down to the lower left corner more, rearrange the amp blocks to make them more space efficient.I'm also considering moving all connectors to one side, which will make getting it into the case easier and less critical.Can't finish the layout until the parts arrive and I get to check the footprints are correct. So expect a few redos before I'm happy. In the meantime I will double check the schematic against both the PCM2904 datasheet and the 2906 demo board. The later is a little more confusing as it's explicitly shows GND and power connections everywhere.

author: BrianHG
author_rank: Super Contributor
timestamp: March 19, 2018, 08:27:13 am
content: Quote from: paulca on March 19, 2018, 07:51:49 amNo, you pads as so fat that the solder will bridge between them if there is any vertical alignment error on the IC. Go for the 0.45 x 1.75mm, if not, 0.45 x 2.0mm.The extra 0.125mm extra length helps give you a bit of horizontal play when placing down the IC + a little pad surface to allow extra solder to wick out, as well as you will be able to use solder wick in an emergency touchup job if necessary.See my example SO14. Basically, your SO8 should appear similar to the top 8 pins. Zoom into my hand soldering job and you will see what I mean about extra meat for your weller, or paste, to solder onto.

author: BrianHG
author_rank: Super Contributor
timestamp: March 19, 2018, 08:35:50 am
content: Take a closeup look at where my IC pins end:With the stubs only under the IC in your footptints, you will not be able to solder the pins easily with a simple weller like the footprints I have with all that extra solder-able surface coming out after the end of the IC pin.

author: paulca
author_rank: Super Contributor
timestamp: March 19, 2018, 09:04:31 am
content: Hmm. SOICs are not exactly difficult. SSOP-28's are much finer pitch though. I did my binary clock SSOP28 on Thursday night and one side went absolutely perfectly, the other side bridged badly (too much solder which was about 2mm of 0.6mm solder wire!), but I was still able to clean it up with flux and it works, which was good as I only had one chip!If you click the direct link to this and zoom in (it's 12MP or similar) you will see how the pads look. Inspected with a uScope and tested with a multi-meter it all checks out.My soldering set up has progressed quite a bit from the days of my 25W Weller.* TS-100 Iron w/ 6.5A PSU* 898 Air reflow* MBO 0.6mm 60/40 solder* Circuit works flux pen* Mechanic 60/40 Solder paste* Andostar M201 microscope* Rolson x36 jewelers visorActually paste and drag might actually be easier, I have found on 1.6mm boards with ground planes the hot air method struggles sometimes. I cooked an ATTiny85 trying to get the paste to reflow. After binning the chip with heat mangled PLL clock the second one was done with a single drag of the iron. I also basically melted the plastic base of a 100uF SMD cap trying to get it to air reflow and again, next board I used the iron and it took barely a touch to reflow it. I think for air-reflow on ground planed thick boards I will put them into the oven for a while first to heat soak the board first, before reflowing. Need to research correct soak temps as I'll need to do it with the paste and components in place. But... the iron is often easier for ICs and large caps.Interestingly, that ATTiny85 was wider than the foot print I used, didn't check the datasheet (doh!) it's pins ended beyond the end of the pads and I still got it soldered and tested though it was a b0ll0x.

author: paulca
author_rank: Super Contributor
timestamp: March 19, 2018, 09:41:16 am
content: So, I have modified the TI schematic for the DAC to remove the HID buttons and force enable the chip and regulator. (I don't need suspend mode or buttons).It's slightly confusing though, but I believe I have worked it out.http://www.ti.com/lit/ds/symlink/pcm2904.pdfFigure 36 Page 26VDDI is an internal power supply "output" which is connected to D+ via a 1.5K as a pull up. It also pulls SEL0 and SEL1 up. If I connect it to SSPND it should force the chip on but ... will VDDI be active at power on, would it be better to directly link it to the V3.x rail? The datasheet is unspecific, although the block diagram shows VBus going directly to the internal regulator where VDDI comes from.The regulator I just connect IN and EN to force it on.The only other optionals in that scematic worth note are that TEST0 is tied low and TEST1 is left unconnected.I did my best to pick the correct Schottky diode with a matching Vf but the worst case would be ordering different resistors for the regulator adjust divider if it's Vf is too high.Anyone see anything glaringly wrong or blonde?

author: paulca
author_rank: Super Contributor
timestamp: March 19, 2018, 02:29:56 pm
content: Well I got it to fit on a board designed for the linked case.But I had to go darkside.Still going to be a pig to solder.EDIT: Grrrr. Left and Right are swapped on the jacksEDIT2: Grrrr. Wrong foot print for the DAC! This will take some rework.

author: paulca
author_rank: Super Contributor
timestamp: March 20, 2018, 08:25:27 am
content: So those issues addressed, board looks good.However I have become a little concerned that I paid little attention to the grounds.The PCM290x has not one but 5 different grounds. 3 analogue, 2 digital + the Vcom for the opamps. Vcom I have kept separate as a starred to the amps, but the others are just dumped onto the flood fill ground.* Digital USB Ground* Digital Ground* Analogue side DAC ground* PLL ground* Oscillator GroundSeparating even the analogue and digital grounds into two planes with stars back to the USB plug, but will take a lot of rerouting. I might be able to split off the Oscillator ground and (I assume) use it just for the crystal.The question is... on such a small low powered board which is getting it's ground from the single noisy USB source anyway (excluding of course the audio grounds from the jacks)... how critical is the ground paths?I expect it will work, but I might suffer some minor noise issues.Any suggestions?

author: BrianHG
author_rank: Super Contributor
timestamp: March 20, 2018, 08:28:39 am
content: Since you PCB isn't 4 layer, and now you have parts on both sides, sorry, no recommendations. Otherwise, I would say reserve the entire bottom as 1 single ground fill except for the odd trace here and there you need to pass.

author: paulca
author_rank: Super Contributor
timestamp: March 20, 2018, 09:08:17 am
content: Quote from: BrianHG on March 20, 2018, 08:28:39 amThanks. I went back and reviewed the TI schematic and to the best I could the gerber layouts and they do not appear to be handling the individual grounds any different than I am.So all I need to do now is wait for a few critical components to arrive to check the foot prints and it's good to goSprinkled a little bit of freeware art on it.Of course a power LED would help. As it's going into a translucent blue base I'm wondering if a white LED bent over to light the board would look good.

author: paulca
author_rank: Super Contributor
timestamp: March 20, 2018, 09:52:01 am
content: Quote from: blueskull on March 20, 2018, 09:38:40 amTrue, there are a lot of them. But when you list out the essential ones the "over engineered ones" are only a couple.Essential:4 x Coupling/DC block caps - 2 x Stereo channels (one in, one out) for the jacks1 x 3.xV power decoupling/bypass capLess essential on such a small board:2 x OpAmp power rail decoupling caps - 1 or even 0 would probably have been fine.1 x Virtual ground decoupling/bypass capProbably overkill, but would require double checking the analogue audio reference ground is indeed VCOM:4 x Coupling/DC block caps 2 x Stereo channels (one in, one out) from the DAC analogue side.At least they are all 10uF so cheap to buy in a pack of 50.

author: BrianHG
author_rank: Super Contributor
timestamp: March 20, 2018, 10:16:32 am
content: You do realize that 10uf 1206 or 10uf 0805 in ceramic has better performance and costs less than half as much as electrolytic and takes up 1/8th the PCB area.Also, with that output capacitance and resistance, do not expect to drive headphones with those parts.Also, you might consider powering your op-amps with 5v, not 3.3v, you will get better performance and power draw if you decide to use headphones will not modulate the the 3.3v bus powering your dac. If you do so, don't forget to optionally power the VCOM of the output opamps with 2.5v if you want the voltage drive head room. You are powering your opamps from the power supply for the analog internal of the PCM2904. This is wrong, read the PCM2904 data sheet. They are powering the opamps not from that source where there is a schottky diode in series. Varying current load on the opamp load will modulate that voltage due to the v-drop across the diode. This will mess up the PCM2904's analog out.Also, since you went with polarized caps, your line input cap's polarity are backwards.Also, your line input impedance is 12k, not 50k or 100k.Also, your audio inputs will be inverted.Also, your Audio inputs will clip your op-amp with standard consumer grade 1vrms audio line level.Also, your Audio input will over drive the input of the PCM2904 by 2x, even with a -10db source audio.Also, your audio input will be inverted. (Initial bass drum strike will be sucked in instead of pushed out.)Also, your audio output will be inverted. (Initial bass drum strike will be sucked in instead of pushed out.)Also, your audio output will be around -10db of consumer level 1vrms. (-10db is weaker than my cell phone headphone out.)Also, a number of DC filter caps are not necessary if you are using 'VCOM' from the PCM2904.Also, non of the power filtering caps are on the same side and right at the PCM2904's power input pins like the recommendations in the data sheet.That's enough for now. You should have checked & reviewed your schematic first.

author: paulca
author_rank: Super Contributor
timestamp: March 20, 2018, 12:14:22 pm
content: Cap polarity and powering the opamps after the diode were indeed mistakes, which are fixable. Thanks.I think somethings come down to design decisions. The question then becomes one of requirements. Remember the primary purpose of this project is not to make a USB sound card. Rather it is to make a prototype module that will be part of a larger project. Yes, the one that has the pre-amps, mixer and headphone amp.I will likely make several stereo pre-amps PCBs next and inter-connect things on the bench. Then I'll make a multi-input mixer and headphone amp board. At some point a BT module. From each I expect to learn things, as I am now.Thinking about it, I could save myself some money by replacing the 3.5mm Jacks with headers and interconnect with 3 conductor shielded sound card leads. For initial tests I can always solder a jacks onto those. Depends on what's cheaper.The output levels might be wrong though. I wanted to aim for 0.615Vrmsinternal "nominal" level for the project. With the configuration shown in the TI schematic it's 0.6Vpp. For 0.615Vrms I need 1.74Vpp.Alternatively I could just leave the output levels as they are and rely on the pre-amp to lift it to 0.615Vrms, which is kind of their purpose, to normalise multiple input levels before mixing.The input levels are a bit of a weirdness. Feeding high line level into an amp with a gain of 1 and then a ADC with a input level of 0.6Vpp will clip it.The confusing thing is... if you look at the user guide:http://www.ti.com/lit/ug/sbau195/sbau195.pdfIt states the input AND output levels are 1.86Vpp full scale LINE level. However if I run a spice simulation on those amps they appear to have a gain off 1. The 2906 datasheet says it's analogue output is only 0.6Vpp. So something is a miss somewhere.The capacitors are now bugging me, for some reason I didn't think 0805/1206 multi-layer ceramics went up to 10uF. I must have been looking for higher voltages or something, but even then 0805 10uF 16V MLC caps are only 4p each.That will make it much easier to place the caps where they will do better good and save space.So most of it needs redone. All good practice though.

author: BrianHG
author_rank: Super Contributor
timestamp: March 20, 2018, 12:58:58 pm
content: Quote from: paulca on March 20, 2018, 12:14:22 pmWarning, that is not a user guide to the PCM2904 IC which was made by BurrBrown. That's a user guide for a cheap eval board made by TI. And TI, if you didn't already know, makes a shit load of mistakes in their data sheet for their own IC and their eval boards. TI has one of the worst documentations I have ever seen, where examples a lot of the times only work with 1 specific setup, or software configuration and don't exhibit proper functionality throughout the devices proper intended range of functionality.That being said, the eval design, besides flipping/inverting the audio up-side-down, isn't absolutely non-functional. You just need to be aware of the signal levels being totally messed up and do not expect to get any audio but a soft weak low volume if you connect headphones directly to this device as is.10uf, 6.3v 0805, 100pcs for 2.25 as cheap as digikey gets:https://www.digikey.co.uk/product-detail/en/samsung-electro-mechanics/CL21A106KQCLRNC/1276-2405-1-ND/389049110uf, 16v 1206, (X7R) 100pcs for 4.72 as cheap as digikey gets:https://www.digikey.co.uk/product-detail/en/samsung-electro-mechanics/CL31B106MOHNNNE/1276-6641-1-ND/596150010uf, 6.3v 0603, 100pcs for 4.58 as cheap as digikey gets:https://www.digikey.co.uk/product-detail/en/tdk-corporation/C1608X5R0J106M080AB/445-4112-1-ND/197546210uf, 25v 0805, 100pcs for 4.79 as cheap as digikey gets:https://www.digikey.co.uk/product-detail/en/taiyo-yuden/TMK212BBJ106KG-T/587-2985-1-ND/271417810uf, 10v 0603, 100pcs for 7.04 as cheap as digikey gets:https://www.digikey.com/product-detail/en/taiyo-yuden/LMK107BBJ106MALT/587-3258-1-ND/3662218

author: paulca
author_rank: Super Contributor
timestamp: March 20, 2018, 02:53:23 pm
content: The output level being 0.6Vpp I can probably live with, but should the input amps not attenuate a little? Are we assuming this board will expect a person to be able to adjust the input level to where it doesn't clip?Then again, the gain on the amps is easily adjust able by swapping in some replacement resistors when I choose.On caps...I think I'll go for these:https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/7984621/£1.45Or probably wise to buy them capable of being used in other projects so 16V ones:https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/8467313/£4.10RS Components are not the cheapest, but they don't charge for shipping and are nearly next day delivery.Changing the capacitors to 0805s allows the board to be moved around a lot so I might as well see if I can address splitting the grounds in two. KiCad can handle two grounds, but there are pitfalls when they interconnect which might allow the ground plane to flood over both. Need to have a play. I'm thinking if I take the ground point as the voltage regulator, everything "before" it is digital, everything "after" is analogue. Obviously "before" and "after" are abstract.Anyway, my FY6600 arrived this morning, so I can actually reliably test my op amps on breadboard etc. for the wider project. Just need to check a few things first... mainly do I need to replace the PSU immediately or can I use it as is until I feel like modding it. 96V phantom leakage voltage w/ 68uA current one the BNC ground.

author: paulca
author_rank: Super Contributor
timestamp: March 20, 2018, 02:59:36 pm
content: If I'm straying from the schematic... should I not flip the amp inputs to non-inverting?

author: Bassman59
author_rank: Super Contributor
timestamp: March 20, 2018, 06:05:48 pm
content: Quote from: BrianHG on March 20, 2018, 12:58:58 pmYou do realize that TI bought Burr-Brown prior to the introduction of these devices? The old BB buildings in Tucson (down by the airport) were emptied out soon after as they moved the operation to Dallas and elsewhere. TI keeps the Burr-Brown name around for marketing reasons.

author: Bassman59
author_rank: Super Contributor
timestamp: March 20, 2018, 06:15:27 pm
content: Quote from: paulca on March 20, 2018, 08:25:27 amThe various ground pins are called out by their function, but they have to all be tied together on the board for the circuit to actually work. Ancient recommendations were to “keep analog and digital grounds separate and tie them together at only one point under the converter,” but that advice fails when you have more than one converter in the design.The better advice is to pour a single ground plane and route the board with the idea that your digital and analog sections are in their own areas. That means, don’t route digital signals in the analog area (to the extent possible), and the converse. This implies that your parts placement is important.Henry Ott discusses this in his books.Chips might have particular recommendations for PLLs and the like.

author: paulca
author_rank: Super Contributor
timestamp: March 20, 2018, 07:34:00 pm
content: I should be able to keep things on different ends of the board, well sort of.I tried flipping the opamps over into non-inverting, but I get a different cut off profile. It cuts off way too early. I tried a dozen different configs of the same values, moving the 330p capacitor around, but it looks like it would need recalculated completely. The non-inverting variant seems a lot more sensitive and the cut off never as sharp. I can get the same cut off with different cap values, but not the sharpness.I suppose this comes from the inverting amps virtual ground behaviour, but again getting out of my depth.I'm not really sure how much I care about true phase anyway.

author: BrianHG
author_rank: Super Contributor
timestamp: March 20, 2018, 11:21:02 pm
content: Quote from: paulca on March 20, 2018, 02:53:23 pmThose are X6S dialect.Go for these, they are top of the line X7R dialect:https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/7661104/(35v, Free shipping next day)https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/1721635/For 0805 16v, X5R second best dialect, this is you best bet.https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/8851698/I know the 25v/35v ones are 1206, a fraction of a mm wider, and a little longer, but, they are X7R dialect and 25v. Good for decoupling on your pre-amp as well with a +/- 18v supply.

author: paulca
author_rank: Super Contributor
timestamp: March 21, 2018, 07:34:51 am
content: Quote from: BrianHG on March 20, 2018, 11:21:02 pmThose 1206 ones are out of stock and the first ones are 50p each!As the higher voltages in X7R seem expensive, I would probably buy them for specific use. If I'm using them for decoupling a PSU, such as in the amp/mixer project I only need to buy a few. I have 12 10us in this project.What about these?https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/1526132/

author: BrianHG
author_rank: Super Contributor
timestamp: March 21, 2018, 09:22:50 am
content: Here are X5Rs 10v 0805 (2.0mm x 1.2mm) (+85 degrees instead of X7R +105 degrees)https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/9155225/Here are X5R 10v, 1206 (3.2mm x 1.6mm) Only 0.4mm wider, 1.2mm longer (ABSOLUTE CHEAPEST by any degree of all searches to date...)https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/6698489/Here are X5R 16v, 1206https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/7407565/

author: BrianHG
author_rank: Super Contributor
timestamp: March 21, 2018, 09:41:20 am
content: Quote from: blueskull on March 21, 2018, 09:32:17 amHe is not using this project to drive headphones, just to drive a line level at >=10k load on a 1 v signal.QuoteYes. I personally might choose tantalum. Something like this:https://uk.rs-online.com/web/p/tantalum-capacitors/7190680/But, I don't think much will be effected in this project.He can go crazy and go for Polymer Aluminum Capacitors, pay 0.60 per cap, and have almost 100x lower ESR, that's like 2 orders of magnitude better than any of the above, 4x better than Tantalum.This guy is rated at 45mOhms:https://uk.rs-online.com/web/p/aluminium-capacitors/8387437/The tantalum is rated at 200mOhms.Electrolytics are at 2.2Ohm.The 1206 ceramic I listed is around 0.3 Ohm at 100khz.Note, these values should be double checked since I don't trust digikey's tables and the damn ESR values are at different frequencies.

author: BrianHG
author_rank: Super Contributor
timestamp: March 21, 2018, 10:33:47 am
content: Quote from: blueskull on March 21, 2018, 09:45:51 amOk, yes, I would personally use Polymer Aluminum Capacitors exclusively with a top end 24bit, not 32 bit, DAC from Analog devices in mono double balanced mode output.And this is my go-to decoupling and DC filtering (2 in parallel/channel for headphones) cap:https://uk.rs-online.com/web/p/aluminium-capacitors/6284153/0.005ohm. No compromise.

author: paulca
author_rank: Super Contributor
timestamp: March 21, 2018, 10:46:02 am
content: LOL. Everytime I finish relaying out the board you throw a curve ball.So I'm happy enough with the MLCCs but... I was just about to consider what resistors I need to add gain to the amps to get headphone level. Then I seen the comment about the MLCC caps and headphones.Of course it would only really need to be the two OUT coupling caps that are under any kind of load....

author: BrianHG
author_rank: Super Contributor
timestamp: March 21, 2018, 11:05:26 am
content: Don't worry, we are just bugging you to go to extremes not needed for your design. You have a series 100 ohm resistor, so with a 1v signal, you are talking only 1ma ac max driving a short. You will be safe, if not for the issue of very low frequency. For headphones, you should be thinking something like 0 ohm (since your voltage is low) , and 220uf cap, not 10uf. And still, you are still only going up to 30ma AC, unless you are using low impedance headphones.I would use a through-hole 220uf, 6.3v since they are cheap, and put a 10uf ceramic in parallel for further lowering the ESR.https://uk.rs-online.com/web/p/aluminium-capacitors/0569451/Stay with the sub dollar for 25 caps 10uf 10v 1206 cap I listed. It's ESR is around 0.3ohm while the aluminum caps it replaced were 2.2 ohm ESR.

author: paulca
author_rank: Super Contributor
timestamp: March 21, 2018, 11:16:11 am
content: Quote from: blueskull on March 21, 2018, 09:45:51 amThis is the tricky part with all electronics progression and forums, aspect pedantry and phoolery and working out when it is one or the other.When someone comments on an aspect of your circuit, you have to work out do they mean:* It will blow up* It won't work!* It will work poorly.* It will work in an acceptible way for 99% of people.* It will work fine, but I would do it differently.* It is fine, but if you want special, trimming away at the 1%s and 0.1%s on functionality, you should...a, b, c.* If you want a high-end, usually sold in $1000 professional versions and often completely and utterly pointless for domestic use... do x, y, z.Audio is probably one of the worst areas for this. I have yet to have someone explain to me why people bother with greater than 44k and 16bit DACs. I can understand for "oversampling" filters etc, but not on the output. Not for audio. Definitely not for standard domestic audio. Your scope might be able to tell you the difference, but not your ears, even if you could afford a pair of headphones or speakers capable of reproducing the defects in the signal your scope shows.For professional studio grade stuff, I can start to see reasons, to keep all the stages where digital must become analogue and vice versa as free from converter artefacts as possible. Though in those areas, how often does a signal need to be converted back and forth these days? If the signal is not digitally generated, guitars, mics, drums, vocals etc., Then probably once. If they are digitally produced, EDM etc. then it might never be converted to analogue and the first time you hear it is the only time it has been reproduced in an analogue form since it's creation.So probably the only market for botique, high end DACs is the middle ground. People who want to produce professional grade digital recordings but have analogue equipment which require DAC-ADC or ADC-DAC chains.EDIT: A similar argument can be made for lossful formats. TIF/BMP versus PNG, JPG. Or, video, YUV12, raw, versus Mpeg2, Mpeg4. For end of line user formats the compressed or even lossful versions are fine, but not so fine for intermediary stages. Some pro-video is saved as individual frames in uncompressed 32bit colour.

author: BrianHG
author_rank: Super Contributor
timestamp: March 21, 2018, 11:35:12 am
content: Actually, remember those 22Khz & 24Khz samples I sent you which came out wobbly on your scope. With the same file played through an up-sampling interpolated DAC, the output would be as clean and steady as your function generator output.This means a 10Khz and 12Khz will just be half as wobbly on your scope compared to a up-sampling DAC, or, a proper analog reconstruction filter on the output of your 48Khz DAC. That removal of wobbly does make an audible difference down at the 10-12Khz range. And no, your output low pass filter which may remove the higher band of frequencies is not sophisticated enough to change those wobbles into a clean sine wave, unless TI has something in this PCM2904 device which is not mentioned in the data sheet.. The sound artifact you get from not straightening and smoothing out those wobbles is called antialiasing.Example, 20Khz sine sampled at 44.1Khz, simple low pass filter output:Exact same 20Khz sine sampled at 44.1Khz, digitally upsampled, interpolated filtered through a 192KHz DAC:If I improved the low pass filter utilizing tuned inductors & caps in the first snapshot, and kept the 44.1Khz dac, then, the output would match the second digital equivalent scope shot. Basically the faster dac receiving the slower sample rate performs a software version of the inductor, cap, (NOTE, this cuts down on op-amp stages, you can make a 7th order filter with many more sophisticated op-amp techniques, but, if you want a single stage, the right tune-able (must be tune-able to get it all in 1 shot) inductor simplifies a lot) resistor to an absurd degree of precision and fills in all the missing steps in the right place meaning you needed output filter only now needs a simple low pass resistor/cap filter to get rid of the really high frequency steps.

author: paulca
author_rank: Super Contributor
timestamp: March 21, 2018, 11:47:33 am
content: Quote from: BrianHG on March 21, 2018, 11:05:26 amI can see the low end roll off in spice for the 10uF, but it's like -3dB at 1Hz, -1dB at 10Hz and 0db at 20Hz... something like that. Though Spice doesn't, probably account for real world capacitors.And why am I on the other side of the 220uF cap debate this time? LOLI also have some room to lift the gain on the opamps. I think I can take the signal voltage up considerably (relatively speaking) while still leaving headroom for the rails. VCom is going to be around 3.5/2 = 1.75V, giving room for the rails, I can go a volt either way comfortably, 2Vpp.So, 2Vpp through a 100R is +-10mA. Will an MLCC handle that?

author: BrianHG
author_rank: Super Contributor
timestamp: March 21, 2018, 11:53:40 am
content: Yes. You will be safe beyond 200ma. In fact, at 0.5 amp rms, the capacitor should only rise less than 5 degrees C for the 1206. After all, the problem with current here is a temperature rise of such a tiny device.

author: BrianHG
author_rank: Super Contributor
timestamp: March 21, 2018, 12:15:18 pm
content: This 3 stage filter is even better, and the signal stays positive:http://www.analogfilters.com/anti-aliasing-filter/For your output, switch to an OPA4353 (quad version of your current opamp), and you can make it.Use 3 amps for the filter, and 1 for the signal gain.

author: paulca
author_rank: Super Contributor
timestamp: March 21, 2018, 01:17:28 pm
content: That looked like neat software to have until I looked at the price!

author: paulca
author_rank: Super Contributor
timestamp: March 21, 2018, 01:57:02 pm
content: I've now checked all the footprints. Sticking with the 0805 10uFs, due to not wanting to move things around again!Final thoughts?The PCB layout and schematic are in here:https://imgur.com/gallery/5pu7K

author: BrianHG
author_rank: Super Contributor
timestamp: March 22, 2018, 02:16:15 am
content: Quote from: paulca on March 21, 2018, 01:57:02 pmStep #1, rotate the PCM2904 by 180 degrees.Swap the location of the USB and regulator.Re-position small components.Step #2, swap in and out jacks and opamps.You have vias on your negative feedback inputs of your opamps when rotating 1 adjacent cap/resistor would eliminate them and shorten the route and clean up a mess at multiple times.For the resistors and small caps, 0603 might suit this design better, but I understand how 0805 is easier to hand solder.Man there is just too many vias out there...Also, your 0805 in many circumstances can be closer together.Take a look at my attached image. Copy my 0805 footprint. The trick here is that the Silkscreen superimposes perfectly when you placed the components as close as possible for safe hand assembly. This makes it easy to group up 0805 as compact as possible visually while routing.

author: paulca
author_rank: Super Contributor
timestamp: March 22, 2018, 07:47:50 am
content: Thanks, but I sent it for manu already. I figured if something is going to stop it working it will be something hugely stupid that we all overlooked rather than a fenickity detail.Using AllPCB this time, 24 hour build time and 3-5 day free shipping, $22 (would have been $15, but I wanted blue solder mask). We'll see how it turns out, but if that lead time is accurate I can afford to mess one or two up.Already laid out the baxandall module, still need to do:* PSU module with LRC filter or see if linear 12V regs will clean up the supply (needs an evening bread boarding with the scope).* mixer/master volume module* headphone amp module* BT module* potentially a bypass-able LP filter moduleIt will look like some 1970s modular synth, but if I can get it all working, the next step is to put it all together onto one 4 layer board.

author: paulca
author_rank: Super Contributor
timestamp: March 23, 2018, 03:16:19 pm
content: Impressively the PCB is now already made, just waiting on shipping. Fingers crossed.

author: paulca
author_rank: Super Contributor
timestamp: March 27, 2018, 08:38:32 pm
content: So the board arrived a day early. Now that's quick for free shipping from China.And... Tada!Code:[12043.564477] usb 3-2: new full-speed USB device number 3 using xhci_hcd[12043.884067] usb 3-2: ep 0x85 - rounding interval to 64 microframes, ep desc says 80 microframes[12044.021022] input: Burr-Brown from TI USB Audio CODEC  as /devices/pci0000:00/0000:00:15.1/0000:06:00.0/usb3/3-2/3-2:1.3/0003:08BB:2904.0007/input/input23Took me two hours to air solder it together, doing it in little blocks at a time.I took the bold move to swap the input resistors on the opamps from 12k to 3.9k at the last minute. Works a treat. It drives headphones at a nice normal nanny state level and when put through my headphone amp it pushes it to it's limits. Perfect.Not a buzz, hiss, burp or fart from it and, allow I am it's creator, I'm sure it sounds better than my cheap £4 PCM2702 Chinese board.Thanks everyone for the help on this one, as always!And yes... they did have to put their order serial number over my text in the lower left :@

author: BrianHG
author_rank: Super Contributor
timestamp: March 28, 2018, 06:39:39 am
content: CongratulationsDon't forget to add to the achievements thread.

author: nihtila
author_rank: Regular Contributor
timestamp: March 28, 2018, 09:59:32 am
content: Nice and neat little board, good job! I found this thread just now but recently finished similar project based on PCM2912A. I needed microphone input as well.I am an audio guy myself and have done 120+ dB dynamic range stuff before, and regarding previous discussions I'd say there is a reason to go for 24-bit DACs instead of 16, it's not audiophoolery (like many other things) as with 16-bits the digital signal itself easily becomes the bottleneck of the system. Extra dynamic range gives some freedom in volume control etc. However, if you want to keep it simple, these USB codecs are handy and unfortunately only offer 16 bits. But with proper gain structure consideration 90 dB dynamic range is obviously plenty.I made this wee board inside a Hammond box mostly for microphone to use when making videos etc. Basically it is a USB interface for headset, it has a 4-pole jack. It's based on TI reference design, no gimmicks here, just a quick project.Measurements and more info can be found herehttp://nihtila.com/2018/03/26/usbhi-usb-interface-for-headset/

author: paulca
author_rank: Super Contributor
timestamp: March 29, 2018, 06:42:53 pm
content: I thought I'd share the source, it was after all a group effort. People wanting to do the same may find this thread.https://gitlab.com/paulcam/PCM2904_DACHopefully the git repo works.