FLAC player with Teensy 3.0 - Noob question

Status
Not open for further replies.

Gordie

New member
Hello, I'm Federico from Italy.
First of all I'm not confident with all this stuff but I open to study and understand; I would like to build by my self a very portable FLAC player.
I'm a DIYer, I have skills on soldering and building circuits on analog stuff, not on digital.

My question is: Can I use this MikroElectronics board with the Teensy 3.0? Are they compatible? Can I use IC2 to see/speak each other? Or I need another protocol?

If not: Anyone here knows other boards that manage FLAC files with Teensy?

Link to the board: http://www.mikroe.com/click/mp3/

Thanks in advance to all. :)
 
I have heard that there is development of the PERFECT solution as we speak.... Patience might pay out in spades if you can wait for Pauls Audio board!
 
That VS1053-based MikroElektronika board has not been tested. But this similar one from Adafruit has been reported to work. Scroll down to the part of the thread where the code was fixed.

http://forum.pjrc.com/threads/23970-Teensy-3-0-Ada-FRuit-VS1053-Audio-Breakout-Board-Problems

If you're going to use a VS1053, and you want it to be a trouble-free experience, Adafruit's board is probably your best path. There are also lots of very cheap VS1053 boards from no-name Asian merchants (eg, on Ebay). I have one in my big box of waiting-to-be-tested hardware. Those can probably work too with Adafruit's code, but you may have to do some fiddling, which might turn out to be easy or it could end up being very difficult.

But since you're talking about FLAC, I'm going to guess this is an "audiophile" project. So first, let's consider the output hardware.

There are roughly 5 categories of audio output hardware. In order from lowest to highest quality.

  1. PWM or other pulse averaging.
  2. DAC integrated into a mixed-mode chip. The VS1053 is an example.
  3. Low-power dedicated chip DAC or Codec. The upcoming audio board will be in this category.
  4. High performance DAC with low cost parts.
  5. High performance DAC with top quality output filter & crystal clock. I'm considering publishing a DIY design...

If we talk about these in terms of noise+distortion in terms of effective number of bits, you generally get up to about 13-15 bits at #3. That's simply the level of performance possible with today's technology when optimizing for low power consumption. Every chip claims to use 24 bits, and internally they do manipulate that many bits. But not even the very best DACs can achieve 146 dB signal to noise+distortion.

The VS1053 doesn't spec S/N+D in dB. They do specify THD at 0.07% (page 8 of the datasheet), which is really pretty terrible, only -31.5 dB. So even though the chip claims to support 24 bit FLAC decoding using a software plugin, and the built-in DAC is supposed to have 18 bits, in terms of effective number of bits (signal to noise+distortion), the analog circuitry in the chip adds a huge amount of distortion. That's actually pretty typical for low-cost mixed-mode chips. They're rarely anywhere near as good as a dedicated DAC or Codec chip.

The good news, if you only want to build a portable player that sounds ok, is human hearing is pretty insensitive to most types of distortion, especially harmonic distortion.

The bad news, if this is an audiophile application, as I suspect it is since you're interested in FLAC, is to truly get the S to N+D ratio over 96 dB requires expensive and power hungry hardware.

I can tell you the first release of the upcoming audio library will support 16 bit WAV files, but not FLAC.
 
Not to be picky but I would say 0.07% THD is more like -63 dB, stillnot great but not nearly as bad.
 
A few weeks ago I purchased a couple Wolfson WM8740 DACs and the expensive opamps for their recommended output filter. Sometime next year I might try making a 24/32 bit version or extension for the library, and built a WM8740-based board with a dedicated 11.2896 MHz crystal oscillator. That board almost certainly will NOT become a regular PJRC product, but when/if I do this, I'll publish all the info so anyone can order the PCB from OSH Park and built it themselves.

The upcoming audio board has a chip spec'd for 85 to 88 dB S/N+D. Those specs are probably based on a near-perfect zero jitter clock. I've personally spent quite a bit of time listening to it using quality headphones, but wav files converted from mp3 files, and of course the clock based on Teensy3's PLL. It sounds very good, at least to my non-audiophile, and definitely superior to my MacBook's headphone output, where I can hear a slight noise/hiss.

Still, I'm curious to try building a board with a 104 dB S/N+D output and find out it is really makes any difference. I'll probably do it sometime next year.

I also wonder if FLAC decompression is possible on Teensy3? I really don't know. But maybe if a -104 bB quality board exists and FLAC is possible, there may be audiophiles out there who's use it?
 
Last edited:
Paul, for what it's worth, you'll be in a position to perform a double-blind experiment on your perception of sound quality. Have some hardware randomly select from two or more sources and log both the selection and your feedback (pot + button?).
 
I'd love to conduct an elaborate double-blind listening test, with several audio samples and multiple testers, and offer some pretty substantial prize for anyone who can get 100% accuracy of detecting 16 vs 24 bits across dozens of separate tests.

At least in my dream world where I magically have many hundreds of hours in every day to do all the stuff I ever want to do......
 
I was thinking you had all the ingredients for a very simple blind test on your own ears, but the idea of betting audiophiles that they're not as good as they think--you could be the Audio Shark!
 
One key ingredient that might be missing is 24 bit music files that actually have noise and distortion less than -96 dB. Do such files actually exist?
 
One key ingredient that might be missing is 24 bit music files that actually have noise and distortion less than -96 dB. Do such files actually exist?
Linn Records makes available well recorded music in 'studio master' FLAC (24/96) as well as CD quality FLAC (16/44.1). Mostly classical with some jazz, blues and folk. I would expect those to be good candidates. I have some, but haven't analysed them on a technical level.

Also, testing with ARTA showed that my Presonus AudioBox 44VSL 24/96 audio interface has a noise floor on the microphone inputs (at minimum gain and with no input connected) of around -96dB :(
I haven't been able to measure the noise on the outputs.
 
My question is: Can I use this MikroElectronics board with the Teensy 3.0? Are they compatible? Can I use IC2 to see/speak each other? Or I need another protocol?

The short answer would be: 'yes' since the board uses SPI and Teensy3 certainly supports that bus type.

However, you will have to program the library to access the VSxxxx MP3 chip all by yourself if no one else has done this before.
 
Status
Not open for further replies.
Back
Top