Analog LPF Included
So I want to build up a quick PCB with a TI PCM USB DAC on it.
If 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.
If 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.
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 20kHz
Does that sound fine?
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 20kHz
Does that sound fine?
Not 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.
Still, from the response of its internal FIR filter, the PCM2904 is a lousy chip, and is nowhere near HiFi.
For this reason, I wouldn't bother, I will just grab a reference design.
Still, from the response of its internal FIR filter, the PCM2904 is a lousy chip, and is nowhere near HiFi.
For this reason, I wouldn't bother, I will just grab a reference design.
Can 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?
I have a PCM2707 here that sounds just as good as my sound card in my PC.
Define good.When you say "reference design" what do you mean? Can you give me an example?
It gotta have some sort of dev kit or something, and the demo board usually come with a schematic. Search TI website.
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!
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.
Just copy the circuit, or design a passive 2nd order LPF with cut off at >>20kHz, <=250kHz.
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.
Any 12MHz crystal will work, though you need to load it properly with load capacitors.
That being said, USB1.1 has a lot of tolerance to frequency error, and I won't be bothered to get the crystal loaded properly if it oscillates.
The PCM2904/2906 requires a 12-MHz (±500 ppm) clock for the USB and audio functions. The clock can be
generated by a built-in oscillator with a 12-MHz crystal resonator. The 12-MHz crystal resonator must be
connected to XTI (pin 21) and XTO (pin 20) with one high-value (1-M?) resistor and two small capacitors, the
capacitance of which depends on the load capacitance of the crystal resonator. An external clock can be
supplied to XTI (pin 21). If an external clock is used, XTO (pin 20) must be left open. Because there is no clock
disabling signal, use of the external clock supply is not recommended. SSPND (pin 28) is unable to use clock
disabling.
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.
Just copy the circuit, or design a passive 2nd order LPF with cut off at >>20kHz, <=250kHz.
It 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.QuoteOne 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.
Any 12MHz crystal will work, though you need to load it properly with load capacitors.
That being said, USB1.1 has a lot of tolerance to frequency error, and I won't be bothered to get the crystal loaded properly if it oscillates.
I'm almost more confused now. Quoting the datasheet:QuoteThe PCM2904/2906 requires a 12-MHz (±500 ppm) clock for the USB and audio functions. The clock can be
generated by a built-in oscillator with a 12-MHz crystal resonator. The 12-MHz crystal resonator must be
connected to XTI (pin 21) and XTO (pin 20) with one high-value (1-M?) resistor and two small capacitors, the
capacitance of which depends on the load capacitance of the crystal resonator. An external clock can be
supplied to XTI (pin 21). If an external clock is used, XTO (pin 20) must be left open. Because there is no clock
disabling signal, use of the external clock supply is not recommended. SSPND (pin 28) is unable to use clock
disabling.
But 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?
I'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.
I am seriously considering splitting the DAC and opto isolating it to get rid of USB power noise, but not this time round.
For USB audio 1.0, maybe hat's okay. If you are looking for 24/192, then you need some more innovative isolation mechanisms.
Thanks. 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.
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.
QuoteThis 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.
That 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.
If I put in the values
68R 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.
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.
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.
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:Dont 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.
6 different types of resistor
5 different types of capacitor
3.5mm jacks
Micro USB sockets
adjustable linear voltage regulator
Crystal
Low Vf Diode
etc. 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.
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.
Thanks. 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.
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.
Thanks. 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.
I'm completely lost. Exactly which chip are you using?
Well, 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.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.
The technique is called interpolation. You interpolate 48ksps signal to higher sample rate, and filter out interpolation-generated image frequencies, to get only 0~20kHz band. Then you DAC the interpolated signal, creating high frequency alias above 192ksps/2=96kHz, which is easier to filter out than 24kHz.
I'm completely lost. Exactly which chip are you using?
I'm completely lost. Exactly which chip are you using?
The TI DAC Output filter I found here:
http://www.ti.com/lit/an/sloa150a/sloa150a.pdf (http://www.ti.com/lit/an/sloa150a/sloa150a.pdf)
The figure 1 schematic.
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.
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.
Apparently not this one or I wouldn't be here asking :)
QuoteApparently not this one or I wouldn't be here asking :)
The 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 (http://www.ti.com/lit/ug/sbau195/sbau195.pdf)
QuoteApparently not this one or I wouldn't be here asking :)
The 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 (http://www.ti.com/lit/ug/sbau195/sbau195.pdf)
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...
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...
Good 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.
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...
Good 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.
Don't just make them blindly longer.
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...
Good 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.
Don't just make them blindly longer.
I made them 0.5x1.75 and rounded. They look slightly easier.
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.
That looks very well, though a bit over engineered with some extra wet capacitors.
The confusing thing is... if you look at the user guide:Warning, 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.
http://www.ti.com/lit/ug/sbau195/sbau195.pdf (http://www.ti.com/lit/ug/sbau195/sbau195.pdf)
The confusing thing is... if you look at the user guide:Warning, 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.
http://www.ti.com/lit/ug/sbau195/sbau195.pdf (http://www.ti.com/lit/ug/sbau195/sbau195.pdf)
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 Ground
Separating 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?
Or probably wise to buy them capable of being used in other projects so 16V ones:Those are X6S dialect. :(
https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/8467313/
£4.10
Or probably wise to buy them capable of being used in other projects so 16V ones:Those are X6S dialect. :(
https://uk.rs-online.com/web/p/ceramic-multilayer-capacitors/8467313/
£4.10
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.
He is not using this project to drive headphones, just to drive a line level at >=10k load on a 1 v signal.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.
Type II/III MLCCs in series of a high current (a few mA for headphone drive or later OPAMP stage) audio signal path. Recipe for disaster.
MLCCs should only be used when voltage across them remain the same and change very little to none due to the nonlinearity, in audio, this practically means only for power decoupling or very high Z signal AC coupling (you still have microphonic issues).
For DC blocking and AC coupling, electrolytic is better. If you don't care about cost and just want the smaller size, go with tantalum, and bias them properly.
And no, don't go MLCC only, even for power decoupling. Use at least one low ESR electrolytic per rail to dampen microphonic noise from MLCCs.Yes. I personally might choose tantalum. Something like this:
But, I don't think much will be effected in this project.
Sorry for the pedantry from someone who reads diyaudio often and designs high spec DACs on his own ;).
But, I don't think much will be effected in this project.
Sorry for the pedantry from someone who reads diyaudio often and designs high spec DACs on his own ;).
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've now checked all the footprints. Sticking with the 0805 10uFs, due to not wanting to move things around again!
Final thoughts?
(http://i.imgur.com/YqE66OC.png) (https://imgur.com/YqE66OC)
The PCB layout and schematic are in here:
https://imgur.com/gallery/5pu7K (https://imgur.com/gallery/5pu7K)
[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] [b]input: Burr-Brown from TI USB Audio CODEC [/b] as /devices/pci0000:00/0000:00:15.1/0000:06:00.0/usb3/3-2/3-2:1.3/0003:08BB:2904.0007/input/input23