16 Bit Line Out

Status
Not open for further replies.

Dan_B

Member
Hi,

I've recently been working on a drum module using the Teensy 3.2 and it's in built DAC + 10uf capacitor for line out audio. This is working great apart from a few problems.

I'd like to be able to use 16 bit audio quality. I know that the Teensy audio board provides this however it comes with a lot of extra features (headphone amp, line/mic inputs) that are unneeded and will not be accessible if placed within a case. The project will be used live on stage therefore it will only need an audio line out that will go to the mixing desk.

Does anyone know of any external 16 bit DACs that could be used with the teensy audio library? I have found DACs that use the SPI interface like this:
http://www.mouser.co.uk/ProductDeta...=sGAEpiMZZMswix2y39yldWlrlADk/eI6zQVnmChawns=
however the audio library appears to only support I2S and I am already using SPI for SD card support. If these DACs do exist, do they need to be programmed or just wired up? If programmed then I'll be a bit out of my depth I think!

In summary, I'm looking for a simple 16 bit audio line out solution to use with the Teensy and audio library. If this is too complicated then I'll just have to use the audio board.

Also, if I am going to use this project with different mixers do I need to add any protection apart from the 10uf capacitor to prevent damage?

Thanks very much for any help given!
 
This depends on how many units you will make.. if its one, then you should by the audio shield. If its 10. Do the same. If its 100, maybe design your own card based on one of the supported codecs that exist in the library.
 
I solved the 12bit limit problem in code with a little filter algorithm by 4x oversampling (192 instead of 48k DAC sample rate). Ok, that gives still not true 16bit resolution, but it comes close to 14bit. And the analog reconstruction filter at the DAC output becomes simpler and more efficient at the same time.
 
Ok, that gives still not true 16bit resolution, but it comes close to 14bit.

Are you using dithering?

On my long term & low priority list is looking into noise shaped dither. Last time I looked I found lots of info, but only algorithms for white noise dither, not the superior noise shaped dither.
 
Thanks everyone for your suggestions so far!
I've done a bit more research since making the thread and realized my best option is to use the SGTL5000 codec found on the audio board. I've erased the parts that I don't think I'll need for line out but still have a few questions.

Firstly, have I removed any traces or parts that are needed or are there any more that I do not need?

There are also a few areas on the schematic which elude me:

Section 1: I presume the +3.3v is power and the 3.3v pin after this is the Teensy 3.3v pin? If i plan to power the project with 9v should I use a 5v regulator into the Teensy Vin pin and then power the SGTL5000 from the Teensy 3.3v pin through the 0.1uf capacitor, the AP7313(1.8v) and the 2.2uf capacitor. Do i need the 2.2uf and 0.1uf capacitors after the 5v regulator to go into the Vin pin?

Section 2: I presume due to the gap between the pads that I can just connect ADDR straight to ground as it says on the SGTL5000 datasheet and ignore the rest of this section?

Section 3: Can I ignore these pads or do they have a function I am unaware of?

Section 4: I presume CPFILT can be left unconnected?

The final question I had was whether it would be possible to start playing one WAV file half way through the other without the first stopping? Would this require 2 codecs and not be possible with the Teensy?

If anyone has the time to answer any of these questions I would really appreciate it. Apologies if I have made any of them difficult to understand! Thanks.

LINEOUTSCHEM.jpg
 
Last edited:
Yes, just connect ADDR to ground. Likewise, there's no need to cut RX & TX.

The first version had these just permanently connected, as you'll see if you compare the 2 schematics. The jumper config options are only needed if you wish to have two audio shields, for quad channel sound.

Yes, leave CPFILT unconnected.

I do not recommend removing any of the power supply decoupling capacitors. But if you wish to explore this, before finalizing your own PCB without those capacitors, perhaps experiment by desoldering them from the audio shield.
 
Thanks very much for your help Paul. I'll order an audio board now and start trying out some board designs!
 
If you omit power supply decoupling capacitors, be sure to do your audio quality testing with the Teensy actually running all the tasks you intend to use. Especially if you will use PWM to control LEDs or other higher power devices, test with those active.

Those capacitors are inexpensive. I do not recommend omitting them.
 
I don't plan to omit the decoupling capacitors but I do plan to power the project from 5v. I've attached the schematic with the changes I think are needed to make this possible? Do i have the right idea or is this wrong?

LINEOUTSCHEM2.jpg
 
Are you using dithering?

On my long term & low priority list is looking into noise shaped dither. Last time I looked I found lots of info, but only algorithms for white noise dither, not the superior noise shaped dither.

I made tests with different dithering algorithms (linear, triangle shaped and whatever) but I dropped it after finding out that (at least with the internal 12bit DAC, with downshift/saturate ASM of the 16bit values at the end of the algorithm) there was no audible difference, even when listening through high quality audio equipment & headphones, neither with sine sweeps, nor with "difficult" stuff like piano chamber music.

In case you wanted to implement it though, let me know please, and I'll dig out my old code fragments.
 
Do i have the right idea or is this wrong?

Hard to say, since I can't quite understand the idea you're expressing with that schematic.

The original audio board gets its 3.3V power from Teensy, when Teensy gets 5V power on VIN or VUSB. All the words you've said seem like you're planning to just use the 3.3V power from Teensy, exactly like the audio shield does now.

But then in this diagram you're showing 2 of the capacitors that normally are on 3.3V connected instead to 5V. And that dashed line doesn't make sense to be either. I just don't understand what you're trying to say.

Have you actually received the audio shield and used it yet? Maybe spend a little time with a voltmeter and get a better idea of how it works. You'll discover it has absolutely no connection to VIN or 5V. It gets all its power from the 3.3V regulator output on Teensy.
 
I see! I thought the +3.3v on the schematic was a generic power input and the 3.3v pin after this was both the Teensy 3.3v and audio adapter 3.3v when soldered together.

I've attached a picture of my schematic so far. Is the power section correct now?

Sorry to take up so much of your time Paul. I really appreciate the help.

The audio board has arrived and is working perfectly, just a bit confused about where these capacitors go.
SCHEM.jpg
 
Status
Not open for further replies.
Back
Top