Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 17 of 17

Thread: Currently purchasable audio codecs

  1. #1

    Currently purchasable audio codecs

    Hi!

    I'm currently using the Audio shield, for Teensy 4.1, and it works fine.
    BUT
    I need better S/N.
    I've googled, and I see there is at least one project to address this:
    https://hackaday.io/project/8567-hif...o-codec-module
    but it doesn't have recent progress, and it doesn't look like it can be purchased, assembled.
    There's this, but I can't tell what's required to get this to work with Teensy, and also I've never heard of BangGood (!)
    So what I'd like to know is, what can I buy now that will work with the Teensy audio library, that has higher S/N ratio than the audio shield? Anything?

  2. #2
    Junior Member
    Join Date
    Dec 2020
    Posts
    13
    I'm not sure what level of integration / construction you are willing to do. Ie do you just want a proven design and are happy to buy and solder components yourself, or r are happy if it has header pins but not in a teensy footprint, or it needs to be pluggable with a teensy 4.1?

    Also, are you after ADC only or DAC or both? And what SNR would you accept?

    I don't pretend to know much about codecs but I'm sure others will find it easier to help you with some more information to direct their thinking.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,742
    Quote Originally Posted by johnmayqwerty View Post
    There's this, but I can't tell what's required to get this to work with Teensy
    I have that exact board sitting on my workbench. Or rather, buried under a bunch of other stuff....

    It was purchased because of this old thread.

    https://forum.pjrc.com/threads/59383...-I2S-BCK-ratio

    But of course it took a couple months to arrive, and by then we struggling to keep the company running during a pandemic lockdown, and get Teensy 4.1 released. So it sat here through most of 2020. Maybe it's time to finally wire it up and check if it really works? (it's configurable for different protocols and I'm pretty sure all the trouble on that old thread was due to having it set to the wrong protocol)

  4. #4
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    7,942
    You can use a PCM1808 which is tested. I've personally used it.
    Edit: Sorry, PCM5102. PCM1808 was the ADC I used both - they can work together.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,742
    PCM1802 is also an ADC. Claimed S/R 105dB and THD+N 96dB.

    FWIW, I also recently updated the CS42448 test board for Teensy 4.x, and added a PCM1808 ADC, so all 8 channels can be tested. Boards are on order from OSH Park.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,742
    Confirmed, that PCM1802 board works. But you have to solder a wire from 3.3V to FMT0 to correctly configure it. Just soldering the pads together does not work, due to a design flaw on that board.

    https://forum.pjrc.com/threads/59383...l=1#post265571

  7. #7
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    840
    I use the audio library with USB input and SPDIF optical output. I have no noise issues.

    You haven't explained what you need to do, but stay digital as much as possible and if you have to do a A/D or D/A conversion, consider using low noise external units (I use a high-spec Topping E30 DAC).

  8. #8
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Location
    Canada
    Posts
    290
    Quote Originally Posted by johnmayqwerty View Post
    Hi!

    I'm currently using the Audio shield, for Teensy 4.1, and it works fine.
    BUT
    I need better S/N.
    I've googled, and I see there is at least one project to address this:
    https://hackaday.io/project/8567-hif...o-codec-module
    but it doesn't have recent progress, and it doesn't look like it can be purchased, assembled.
    There's this, but I can't tell what's required to get this to work with Teensy, and also I've never heard of BangGood (!)
    So what I'd like to know is, what can I buy now that will work with the Teensy audio library, that has higher S/N ratio than the audio shield? Anything?
    You didn't mention what you are using it for? Line-level signals? Guitar signals? Microphone?

    I have a Teensy shield that is optimized for low-noise and guitars but can also used with line level.
    https://www.tindie.com/products/blac...-audio-shield/

  9. #9
    Guitar, with high gain. Would like to avoid hand soldering surface mount. Otherwise Im fine with integration. Something the library will support without too much trouble would be awesome. I just ordered this: https://www.amazon.com/gp/aw/d/B081V...?ie=UTF8&psc=1
    With some hope that it will work. Long shipping time, very sad.

  10. #10
    Blackaddr, I like the look of your shield. Im really interested in low noise/ high dynamic range because I want to hand-code really nice amp emulation. Whats your s/n ratio?

  11. #11
    Im sorry - soldering the pads doesnt work but a wire does? Does the wire act like a little capacitor?

  12. #12
    I hope you can keep it running, man. The teensy fills a role nothing else does. Good luck!

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,742
    Quote Originally Posted by johnmayqwerty View Post
    I’m sorry - soldering the pads doesn’t work but a wire does? Does the wire act like a little capacitor?
    Nope. The problem is a design flaw in the PCM1802 breakout PCB. Those 5 pads should connect to 3.3V, but whoever designed the board didn't connect them to anything at all.

    Detailed writeup on the blog.

    https://www.pjrc.com/pcm1802-breakout-board-needs-hack/

    Hopefully this will save anyone else trying to use these cheap PCM1802 boards from a lot of frustration!

  14. #14
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Location
    Canada
    Posts
    290
    Quote Originally Posted by johnmayqwerty View Post
    Blackaddr, I like the look of your shield. I’m really interested in low noise/ high dynamic range because I want to hand-code really nice amp emulation. What’s your s/n ratio?
    The SNR of the WM8731 codec is 90dB, but you'll never get that in a real guitar circuit. Every component in the entire signal chain add some kind of noise and the CODEC is the lowest source of noise. Most noise floors are determined by interference from digital circuits getting into the analog signal path through inadequate power supply design and filtering, along with non-optimal PCB layout.

    There is no way you will get a measurable SNR of 105 dB SNR on that PCM1808 board. Keep in mind 16-bit audio only has 96dB of dynamic range in the first place. Consumer grade equipment that sounds noisy (as in you can hear it very easily) is usually an actual SNR of -40dB to -60dB when measured from input jack to output jack. Good, well designed equipment is usually in the -70dB to -80dB range. True studio grade equipment costing thousands can push into the 90s, but it's only achievable with power supply conditioning units (the ones that clean up the mains high voltage).

    For guitarists, once you get past about 70dB, the PCB (if well designed) is no longer that worst noise/interference contributor, it's the guitar pickups themselves. A studio isn't a studio because it has expensive equipment. A studio is an environment (often consisting of low lighting and power conditioners and filters everywhere to minimize electrical interference).

    High gain guitar circuits are particularly susceptible to noise. Have a low-noise PCB is a good start, but you must also design a high impedance guitar preamp if you want to plug your guitar straight in (likely for fuzz effects, etc.). Most good high gain digital models obtain good performance through carefully designed digital filters to significantly reduce noise in frequencies outside the target guitar frequencies.

    Building a digital guitar pedal goes way beyond a codec and DSP processor. In addition to the guitar preamp, you must build protection circuits. Most codecs take 1Vpp. If you send the output from 9V guitar pedal into the codec you can potentially fry the input. I've seen people even fry codec inputs using really h ot humbuckers and passive bass guitars too.

    One of the reasons I made the TGA Pro was because there is so much more stuff required for the special case of guitar that people just don't realize. Then they spend all their time blowing up codecs, or dealing with awful digital noise interference instead of learning to program stuff with the wicked Teensy Audio library.
    Last edited by Blackaddr; 01-05-2021 at 02:30 PM.

  15. #15
    Quote Originally Posted by Blackaddr View Post
    The SNR of the WM8731 codec is 90dB, but you'll never get that in a real guitar circuit....
    I'm considering your board, for many of the reasons you say... but this is my hobby... I like blowing up boards.

    To a degree.

  16. #16
    Quote Originally Posted by PaulStoffregen View Post
    Nope. The problem is a design flaw in the PCM1802 breakout PCB...
    Just received a PCM1808 board, not quite the same but other people have said it will work, so I'll try maybe tonight.

    I'm curious, though - what does the audio library do about the fact that it's a 24 bit input? The library I think is only 16 bits, right? What happens? does the library throw out the bottom 8 bits?

  17. #17
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,742
    Quote Originally Posted by johnmayqwerty View Post
    What happens? does the library throw out the bottom 8 bits?
    Yes, the bottom 8 bits (plus 8 more empty/zero bits) are just ignored.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •