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

Thread: Custom TDM board - what did I do wrong?

  1. #1
    Junior Member
    Join Date
    Nov 2019
    Location
    Piedmont, OK
    Posts
    7

    Custom TDM board - what did I do wrong?

    I created a test audio board for a T4 project that isn't acting exactly as expected.

    This test board is modeled after Paul's OSH Park CS42448 multichannel TDM board. I followed the passive input and output schematics in the CS42448 manual and like the OSH Park board used a 10uF X5R in place of the schematic's polarized 10uF.

    Overall it functions as anticipated with the exception that the audio is higpassed. This proved adequate for developing the board's software and I am starting on the layout for a full version with active input and output filters and power supply. The passive test board will no longer be used, but before moving forward I feel compelled to understand what I did wrong in the existing board so I don't make whatever stupid mistake that caused this again.

    The passive board configured with a passthrough sketch and tested with REW using a loopback-calibrated external sound card produces the following response:
    Click image for larger version. 

Name:	FResponse.PNG 
Views:	13 
Size:	34.6 KB 
ID:	18720

    The board's inputs are laid out like so:
    Click image for larger version. 

Name:	input.png 
Views:	4 
Size:	15.6 KB 
ID:	18721

    Not shown are the to 2700pF capacitors snuggled up next to the CS42448.

    The outputs:
    Click image for larger version. 

Name:	outputs.png 
Views:	3 
Size:	237.5 KB 
ID:	18722


    Thanks!

  2. #2
    Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    63
    I'm also working on a CS42448 board, however I've moved away from providing active input and output filters on the main board, due to parts count. Each 2 pole filter has around 9 components plus the opamp. Happy to share my designs, as

    There are high pass filters automatically invoked on the CS42448 - they allow the chip to do auto nulling of offset voltages. They can be switched off with register settings, and a code-driven offset null used instead.

    See @recursinging's comments on HP filters in this other thread https://forum.pjrc.com/threads/58836...ed-performance.

    I've attached my active filter designs for your amusement. I found MCP664 (5 V rail, high GBW, low noise, relatively cheap, TSSOP 14) opamps to be an excellent option, despite the circuits labelling them as LM324s (not recommended!)
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	2 pole OP.PNG 
Views:	2 
Size:	16.2 KB 
ID:	18724   Click image for larger version. 

Name:	2 pole IP.PNG 
Views:	2 
Size:	4.3 KB 
ID:	18725  

    Click image for larger version. 

Name:	single pole OP.PNG 
Views:	2 
Size:	6.3 KB 
ID:	18726  

  3. #3
    Junior Member
    Join Date
    Nov 2019
    Location
    Piedmont, OK
    Posts
    7
    Quote Originally Posted by palmerr View Post
    I'm also working on a CS42448 board, however I've moved away from providing active input and output filters on the main board, due to parts count. Each 2 pole filter has around 9 components plus the opamp. Happy to share my designs, as

    There are high pass filters automatically invoked on the CS42448 - they allow the chip to do auto nulling of offset voltages. They can be switched off with register settings, and a code-driven offset null used instead.

    See @recursinging's comments on HP filters in this other thread https://forum.pjrc.com/threads/58836...ed-performance.

    I've attached my active filter designs for your amusement. I found MCP664 (5 V rail, high GBW, low noise, relatively cheap, TSSOP 14) opamps to be an excellent option, despite the circuits labelling them as LM324s (not recommended!)
    Thank you for the reply. I was reading that thread earlier today and it seems an interesting direction with many possibilities for I/O.

    I recognize that the codec has DC offset filters, but that graph indicates something near 12dB/oct slope below 2Khz. It's down 26dB by 20hz. I'd have thought that would have been noticed by those using the OSH Park design as it seems awfully extreme, though I admit I can't see any reasonable way for either the input or output circuits from the datasheet causing it. Thus the post . I'll have a look at the datasheet more deeply and see what things look like with them disabled.

  4. #4
    Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    63
    Sorry about the misunderstanding.

    Assuming the vias are going to a ground plane, the input and output layouts look OK.

    What's the impedance of your source? It will add to the 150 ohms on the input, moving the pole of the input filter. i.e 200 ohms source impedance in the generator would more than double the pole frequency.

    On the output, a low sink impedance would also move the pole up.

    Hope this helps - it's really why they recommend the active filters you're heading for - anything but an ideal generator (zero internal resistance) and an infinite sink impedance disturbs the filter behaviour significantly for passive filters.

    In all, you do seem to be heading down the right track - half the battle is won by just getting the CS42448 to talk to the Teensy!

    BTW - watch out for separating digital and audio ground planes, only joined at the chip. @mattven and I had a useful discussion on ground planes in https://forum.pjrc.com/threads/58899...-design-review this thread.

  5. #5
    Junior Member
    Join Date
    Nov 2019
    Location
    Piedmont, OK
    Posts
    7
    Quote Originally Posted by palmerr View Post
    Sorry about the misunderstanding.
    No worries. It's a lot of attenuation and quite unexpected.

    Quote Originally Posted by palmerr View Post
    Assuming the vias are going to a ground plane, the input and output layouts look OK.

    What's the impedance of your source? It will add to the 150 ohms on the input, moving the pole of the input filter. i.e 200 ohms source impedance in the generator would more than double the pole frequency.

    On the output, a low sink impedance would also move the pole up.
    According to the datasheet, the highpass filter is -3dB at 1 Hz. The measurement device is an M-Audio Mobile Pre and though the specs don't give a number it does indicate it has "High Z" in and out. How high? No idea.


    Quote Originally Posted by palmerr View Post
    Hope this helps - it's really why they recommend the active filters you're heading for - anything but an ideal generator (zero internal resistance) and an infinite sink impedance disturbs the filter behaviour significantly for passive filters.

    In all, you do seem to be heading down the right track - half the battle is won by just getting the CS42448 to talk to the Teensy!
    Thankfully that worked out of the gate

    Quote Originally Posted by palmerr View Post
    BTW - watch out for separating digital and audio ground planes, only joined at the chip. @mattven and I had a useful discussion on ground planes in https://forum.pjrc.com/threads/58899...-design-review this thread.
    I read that thread after the layout had been sent out and did end up placing a bridge between the ground planes to combat mclk leaking into the output. I was uncertain which would work better during layout so I left pads for that purpose. This was my first SMD board so I expected it to become a learning opportunity. It was... I will be much more attentive to package size in the future...among other things! Live and learn.

    Altogether I have a hard time believing the impedance of the Mobile Pre is having that much effect on the filters, but I don't really know what I did either. Whatever it is it was applied uniformly - all of the channels measure the same. I may toss together a pink noise sketch and measure the output; that should help identify which side has the fault (input or output).

  6. #6
    Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    63
    Here's my board layout for the CS42448 and the bottom copper - you can see a U shaped audio groundplane, with the digital one under the Teensy and reaching down under the chip. The two groundplanes (A&D) overlap under the chip, with the audio one having priority (Eagle). Top and bottom planes are both GND and identically shaped.

    Plenty of vias to make sure all the components are serviced and good connections near the edges of the planes. The boards have just been finished today and are in the dispatch queue at my favorite Chinese PCB maker (PCBway). Maybe I'll see them towards the end of the month.

    I just noticed that the ground planes haven't joined under the CS chip after all - there's an opportunity for a bit of scratch and solder on the prototype and a link on the next version!

    With the filter characteristics - try buffering your test set's ins and outs with unity gain op amps to see if that makes a difference. Happy hunting!

    Richard
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	cs42448.PNG 
Views:	6 
Size:	288.8 KB 
ID:	18751   Click image for larger version. 

Name:	CS42448 Bottom Copper.PNG 
Views:	4 
Size:	71.3 KB 
ID:	18752  


  7. #7
    Junior Member
    Join Date
    Nov 2019
    Location
    Piedmont, OK
    Posts
    7
    That looks great! I find it interesting that you split the ground planes across the CS42448.

    Do you have your MCLK running straight from the Teensy to the codec or are you doing anything to terminate the line? I'll have a closer look at your layout choices with respect to the clocks - I think there's a lot I can learn there. Thank you for posting that . I do think I remember reading of a 150R being used in series with the clock to terminate it when used with one of the other codecs but that's from memory and mine's known to be quite temperamental.

    Threw together a pink noise sketch and ran it through the MobilePre into REW. Collected 32 averages at 1/48 and then smoothed to 1/3 octave to get this:
    Click image for larger version. 

Name:	PinkNoiseOutputTest.PNG 
Views:	1 
Size:	21.5 KB 
ID:	18753

    -2.5db roll-off below 100Hz. That's much more like what I'd expect from passive filters and the preamp's input. The MobilePre is a fairly clean device with 1/4" and XLR inputs used as a mic pre for recording. It's not Focusrite, but it's a pretty decent preamp for general audio measurement and recording purposes.

    At any rate, those results tell me my outputs are roughly 'as expected', so it's reasonable to assume I'm doing something bad on the input.

  8. #8
    Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    63
    Sounds like you're getting close to a good place with the filters.

    My Focusrite shares the same characteristics - moderate input output impedances & HP filters - and I've been caught before.

    Thanks for the reminder on the MCLK resistor - Paul has put it in the SGTL5000 board, the "why" (crosstalk and noise due to fast, low impedance signals and long lines) is in https://forum.pjrc.com/threads/41157...-Adaptor-Board
    Last edited by palmerr; 01-15-2020 at 05:22 AM.

  9. #9
    Junior Member
    Join Date
    Nov 2019
    Location
    Piedmont, OK
    Posts
    7
    Quote Originally Posted by palmerr View Post
    Sounds like you're getting close to a good place with the filters.

    [/URL]
    Yep. It's the 10uF cap in the passive input filter. Here's an electrolytic vs a COG. My fail and probably what those with the OSH Park board are seeing given I used its BOM as a design reference. That's ~25dB difference at 20Hz. Your design uses electrolytics and won't see this self-inflicted frequency loss.

    Click image for larger version. 

Name:	inputCap.PNG 
Views:	1 
Size:	25.1 KB 
ID:	18778

  10. #10
    Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    63
    Great that you have found a key to your puzzle.

    I'm surprised to learn that a C0G produced that kind of response, though I might have expected it from a standard MLCC. All the available info points to CoGs as "stable superstars" - but I can't find a single published chart of frequency response below 1kHz.

    My boards and components were shipped yesterday, so I'll publish a full account of how they perform when I've hand loaded a couple of boards. BTW, I've also got off the shelf preamps modules based on SSM2167 and AD828 to test - at the princely cost of < $5 on eBay. I'll build little daughter boards for them if they perform well. The SSM will get a combo jack and mic/line switch, and I haven't quite worked out what to do with the 828 version yet - possibly a straight 40dB mic preamp, maybe with a phantom option from V+ (18V isn't 48v, but is better than nothing!).

Posting Permissions

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