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

Thread: Advice on audio board alternative (4 in/2 out)

  1. #1
    Junior Member
    Join Date
    Jan 2022
    Posts
    9

    Advice on audio board alternative (4 in/2 out)

    Hi,

    Having discovered Teensy rather recently (mind = blown) I am working on a couple of audio/synth projects, most recently some sort of SID/digital synth hybrid inspired by great stuff such as Tsynth and the Insidious plugin.

    I am using the audio boards atm which works great, however in order to slim down the design I am looking for ADC/DAC options to integrate on my own pcbs and would love some advice. Here are the brief "specs":

    - 4 in (capturing 4 SIDs)
    - 2 out
    - Ideally compatible with the wonderful audio library. If not need to be a well known design.

    I suppose one alternative could be to just copy the SGTL5000-based design and stick two of those on the board, but I am a bit concerned over hand-soldering anything smaller than SSOP. Any other obvious options?

    Cheers, MrC

    (inspirational footage below)

    Click image for larger version. 

Name:	20220103_20355712.jpg 
Views:	25 
Size:	124.6 KB 
ID:	27150

  2. #2
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    215
    Hi MrC

    I use two WM8731s for an audio project, you'd have an extra 2 outs ( 4in and 4 out) but the chips are reasonably available and come in SSOP so easy to solder by hand. They are also supported by the audio lib. I've got a couple of test pcbs spare if you're interested your welcome to one.

    Another option supported by the lib is the CS42448 it is 6 in and 8 out and more capable altogether. if you have a search on the forum you'll find some post and boards based on it

    Cheers, Paul

  3. #3
    Junior Member
    Join Date
    Jan 2022
    Posts
    9
    Thanks Paul, appreciated. I'll check out those two options. The CS42448 looks really tasty but probably a bit overkill.

    If we only needed 2 inputs I would probably stick with the audio board because everything works so well atm and noise levels are surprisingly low.

  4. #4
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    215
    4 SID chips sounds ace - would love to hear that if you’ve got anything on YouTube or Instagram?

  5. #5
    Junior Member
    Join Date
    Jan 2022
    Posts
    9
    Well its still early days for this project so although everything works at the moment it is basically just a mediocre polysynth. We need to get those fast sequenced SID register updates going next to create that Hubbard magic. Will post an update when it sounds less like a 5$ Casio and more like the other amazing SID projects already out there.

    So for the WM8731, were you satisfied with that test board design Paul? I am thinking in terms of decoupling and other noise factors?

    Cheers, Daniel

    (I realize now that I should probably have posted this topic under audio projects. Apologies and if anyone wants to move it fine by me)

  6. #6
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    215
    The test board was really just getting two WM8731s working together. I've been using that codec in a project to recreate an old vintage effect unit (some details on Instagram if interested).

    For noise, if you're happy with the STGL5000 it will be about the same as that, you need some care towards power supply, grounds etc but you need that with everything. One point to note is the output is at consumer line level (same as the STGL), I added an amplifier to the output stage to boost it up to pro line level which I needed for my application.

    @blackaddr also uses it in a guitar effect unit which he has shared the design for , you might want to check it out (he also has some great audio library extensions)

    cheers, Paul

  7. #7
    Junior Member
    Join Date
    Jan 2022
    Posts
    9
    I started adding the two 8731s to my design but have to admit I am not familiar with I2S signalling. How do you connect "shared" clock signals (LRCLK, BCLK) on the Teensy end? Or maybe they should not be shared at all?

    Here is a semi-finished schematic to illustrate the question:
    Click image for larger version. 

Name:	2xWM8731.jpg 
Views:	16 
Size:	130.9 KB 
ID:	27189

  8. #8
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    215
    Hi,

    They share the same clock so connect BCLK & LRCLK on both WM8731s to 21 ad 20 on the Teensy.

    Your I2S_2_TX & RX don't look right, the correct pins at the teensy end are in the comments against the quad input object and output object

    These are my notes from connecting to the micro mod - they have the T4.x pins on them.
    Click image for larger version. 

Name:	image.png 
Views:	6 
Size:	163.3 KB 
ID:	27192

    Also I connected them all through 33R series resistors like:
    Click image for larger version. 

Name:	mm_i2s.jpg 
Views:	10 
Size:	86.5 KB 
ID:	27193

    Last point is you might want to look at conditioning the AVDD to keep noise down (you might be planning to do this anyway).

    Cheers Paul

  9. #9
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,460
    Yes the clocks are bussed - typically driven by the Teensy. Only the data in and out lines are kept separate in I2S, and each dataline carries 2 channels in one
    direction, so for instance the SGTL5000 and WM8731 each have one data in and one data out. The WM8731 has separate LRCLK for each direction, but I'd
    just common them as the Teensy library supports a single sample rate at any one time.

    Attention needs to be paid to layout (esp for MCLK) to keep clock signals short, with groundplane under them for high frequency ground return currents.

    Most I2S chips auto-configure their sampling rates so long as you provide the right ratios between clocks (look at the table in each datasheet to double check).
    Some I2S chips need extra config via I2C or SPI, some don't. Some have extra config but default to something useful without touching it - datasheet time!

  10. #10
    Junior Member
    Join Date
    Jan 2022
    Posts
    9
    Thanks for your help guys. I may be in over my head here in more ways than one. But gonna give it a go.

    Cheers, Daniel

    Also, here is further inspirational footage of the custom case in current state:
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	case1.jpg 
Views:	9 
Size:	54.1 KB 
ID:	27194  
    Last edited by MrCanvas; 01-12-2022 at 08:00 PM. Reason: missing line

  11. #11
    Junior Member
    Join Date
    Jan 2022
    Posts
    9
    Thanks to Paul and MarkT (also, indirectly, Blackaddr) I got the dual WM8371 running now (part breadboard, part old hw).

    Not 100% confident in the I2C behaviour atm. Those series resistors on I2S clocks are really a must to get anything working with two encoders. I am hoping for a bit more stable behaviour once I get it on a proper pcb.

    Is it likely that the CS42448 is a more robust design in general? I do understand that signal conditioning is needed for any hw though.

  12. #12
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    215
    Hi,

    That's great you're up and running. Couple of points:
    - are you using the Audio library?
    - you mix up I2C and I2S in the comment - is that deliberate (I2S and encoders)?
    - on stability, I've found them very stable once on a pcb, depending on how neat your breadboard is I could see that might cause issues.
    - the cs42448 is a more modern chip with better audio performance, differential inputs etc. there are a few test board on the site if you google. Downsides that may or may not be important are it's a bit harder to hand solder, a bit more expensive and it runs surprisingly hot

    cheers Paul

  13. #13
    Junior Member
    Join Date
    Jan 2022
    Posts
    9
    Yes I am using the audio library with the 8371 control object from Blackaddr with added address setting similar to what you recommended Paul.

    The "mixup" of I2C and I2S in my previous comment was intended. I found that I2C performance was improved a lot by adding the series resistors to I2S lines. At least on my semi-breadboard setup.

  14. #14
    Junior Member
    Join Date
    Jan 2022
    Posts
    9
    What was not indended was to refer to the codecs as "encoders". Sorry for that brainfreeze.

Posting Permissions

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