Author Topic: Audio DAC output Low Pass Filter.  (Read 23480 times)

0 Members and 1 Guest are viewing this topic.

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Audio DAC output Low Pass Filter.
« on: March 12, 2018, 09:11:39 pm »
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.

The PCM2904 datasheet says:

Quote
Analog LPF Included

But 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.pdf

And 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)?
« Last Edit: March 12, 2018, 09:13:32 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #1 on: March 12, 2018, 09:17:06 pm »
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?
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline josip

  • Regular Contributor
  • *
  • Posts: 151
  • Country: hr
Re: Audio DAC output Low Pass Filter.
« Reply #2 on: March 13, 2018, 08:21:31 am »
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.

I used PCM2707 as interface to AD1865 and some Philips TDA devices, long time ago.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #3 on: March 13, 2018, 09:34:17 am »
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 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.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #4 on: March 13, 2018, 03:00:32 pm »
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.

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.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Audio DAC output Low Pass Filter.
« Reply #5 on: March 13, 2018, 03:34:22 pm »
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.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #6 on: March 13, 2018, 03:51:49 pm »
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.

Do you mean the one on page 2 of this: http://www.ti.com/lit/an/sloa150a/sloa150a.pdf  with values from page 4?
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #7 on: March 13, 2018, 05:51:00 pm »
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?
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #8 on: March 13, 2018, 06:32:25 pm »
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?

Here's the evaluation board for it:
http://www.ti.com/tool/PCM2704EVM-U
http://www.ti.com/lit/ug/sleu114/sleu114.pdf   - user guide

The 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!
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #9 on: March 13, 2018, 06:38:22 pm »
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.

Good 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.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #10 on: March 13, 2018, 06:44:01 pm »
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!

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.

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.

"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #11 on: March 13, 2018, 06:53:53 pm »
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.

"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #12 on: March 13, 2018, 07:12:47 pm »
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.

Quote
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.

I'm almost more confused now.  Quoting the datasheet:
Quote
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.

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?
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #13 on: March 13, 2018, 07:58:48 pm »
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 newer and cheaper USB DAC chips. 

 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4425
  • Country: dk
Re: Audio DAC output Low Pass Filter.
« Reply #14 on: March 13, 2018, 08:11:50 pm »
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.

Quote
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.

I'm almost more confused now.  Quoting the datasheet:
Quote
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.

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'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






 
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #15 on: March 13, 2018, 08:59:32 pm »
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!
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline josip

  • Regular Contributor
  • *
  • Posts: 151
  • Country: hr
Re: Audio DAC output Low Pass Filter.
« Reply #16 on: March 13, 2018, 09:04:04 pm »
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.

Today 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.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7733
  • Country: ca
Re: Audio DAC output Low Pass Filter.
« Reply #17 on: March 14, 2018, 02:53:33 am »
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.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Audio DAC output Low Pass Filter.
« Reply #18 on: March 14, 2018, 03:05:01 am »
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.

You 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.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Audio DAC output Low Pass Filter.
« Reply #19 on: March 14, 2018, 03:27:51 am »
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.

It 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. 

Quote
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.

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.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7733
  • Country: ca
Re: Audio DAC output Low Pass Filter.
« Reply #20 on: March 14, 2018, 04:38:24 am »
Quote
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.

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.

I 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.
« Last Edit: March 14, 2018, 04:43:02 am by BrianHG »
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #21 on: March 14, 2018, 07:57:00 am »
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.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7733
  • Country: ca
Re: Audio DAC output Low Pass Filter.
« Reply #22 on: March 14, 2018, 09:49:11 am »
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.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #23 on: March 14, 2018, 11:59:58 am »
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.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Audio DAC output Low Pass Filter.
« Reply #24 on: March 14, 2018, 01:59:45 pm »
As you're in the UK, for connectors, low volume passives and discrete semiconductors, Rapid are hard to beat:

http://www.rapidonline.com

Farnell 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf