Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 7 FirstFirst 1 2 3 4 5 ... LastLast
Results 51 to 75 of 159

Thread: 24 bit audio boards

  1. #51
    Junior Member
    Join Date
    Feb 2015
    Posts
    2
    @whollender: no, there was no noticable noise of that extent.
    A FFT analysis revealed lots of humming from low-frequency AC, but as far as I can tell, that is actual sound from electronic devices.
    Being able to record beyond chunk sizes the RAM can hold has many advantages for "primitive" audio quality testing, as one can capture normal voice and music, vary in loudness and move the microphone around to verify that it is picking up real sound sources instead of internal distortions.

    Your board looks really good, do you have more information available?
    Looking at the pictures, U202 and U203 isolate the digital ground on the teensy (connected to a computer, which may bring all kinds of noise) from your main ground on the board. It follows that U301 is the 28-Pin TSSOP CS4272 chip which controls the show, and to the right are your stereo input and stereo output stages.
    The 4 individual groups suggest that you have differential audio connection towards the outside world (probably to keep the audio quality high) .. but what I yet don't understand is the fact that you need four 8-Pin SOIC chips (2x input, 2x output) for that.
    I thought a single LME49721 was already designed for dual channel (=stereo) operation - do you need this configuration for the differential output?

  2. #52
    Senior Member
    Join Date
    Sep 2013
    Location
    Sonoma County, CA
    Posts
    141
    Quote Originally Posted by hex View Post
    The 4 individual groups suggest that you have differential audio connection towards the outside world (probably to keep the audio quality high) .. but what I yet don't understand is the fact that you need four 8-Pin SOIC chips (2x input, 2x output) for that.
    I thought a single LME49721 was already designed for dual channel (=stereo) operation - do you need this configuration for the differential output?
    In order to do the fully differential input and output, I went with a fully differential amp (the THS4521) for each I/O. You can achieve the same thing with single-ended amps, but diff amps are better at driving fully differential signals.

    I do have a second design that is almost identical, except for using the LME49721 to drive single-ended outputs. I don't plan on using that design unless the current board doesn't work well when it's driving a single-ended load.

    Right now, the only real information available is the schematic: https://forum.pjrc.com/threads/27215...ll=1#post59718

    I'll get more information up once I finish bringing up the board.

  3. #53
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,673
    Quote Originally Posted by whollender View Post
    In order to do the fully differential input and output, I went with a fully differential amp (the THS4521) for each I/O. You can achieve the same thing with single-ended amps, but diff amps are better at driving fully differential signals.

    I do have a second design that is almost identical, except for using the LME49721 to drive single-ended outputs. I don't plan on using that design unless the current board doesn't work well when it's driving a single-ended load.

    Right now, the only real information available is the schematic: https://forum.pjrc.com/threads/27215...ll=1#post59718

    I'll get more information up once I finish bringing up the board.
    There's a board for the Raspbery PI, called "HifiBerry", I2S 24BIT 192KHz - from the pictures it seems to be very simple, and perhaps its possible to connect it to the Teensy, too.
    I did not find any shematics, but from the pictures it seems that it has only the minimum required components, and so i'm sure your's is better.
    Last edited by Frank B; 03-16-2015 at 06:12 PM.

  4. #54
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,174
    I wonder how HifiBerry does 192 kHz at 24 bits over S/PDIF?

  5. #55
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,673
    Don't know. I am a S/PDIF noob :-)

    They state on https://www.hifiberry.com/hbdigi/:
    - Dedicated S/PDIF interface chip supports up to 192kHz/24bit resolution
    - Optical (Toslink) and electrical outputs
    They have different versions of this board, and mention a Burr-Brown DAC

  6. #56
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by Frank B View Post
    Don't know. I am a S/PDIF noob :-)

    They state on https://www.hifiberry.com/hbdigi/:

    They have different versions of this board, and mention a Burr-Brown DAC
    unless i'm mistaken, that's the one i've been using : pcm5102a.

    when used w/ raspberry pi, i think people mostly just use it as 16/48 (at least that's what you'd do if any sort of mildly interesting audio processing is to be involved)

  7. #57
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,673
    Quote Originally Posted by mxxx View Post
    unless i'm mistaken, that's the one i've been using : pcm5102a.

    When used w/ raspberry pi, i think people mostly just use it as 16/48 (at least that's what you'd do if any sort of mildly interesting audio processing is to be involved)
    Indeed, i found that the "DAC" (Raspberry 1) has a PCM5102, and the "DAC+" (Raspberry 2) a PCM5122.

    I think it should be possible to use this boards with the teensy. Is this correct ?
    Edit: of course not with 192 kHz :-)

  8. #58
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by Frank B View Post
    Indeed, i found that the "DAC" (Raspberry 1) has a PCM5102, and the "DAC+" (Raspberry 2) a PCM5122.

    I think it should be possible to use this boards with the teensy. Is this correct ?
    Edit: of course not with 192 kHz :-)
    yep, i have no experience with the pcm5122, but the pcm5102a is very easy to use. no i2c, no MCLK, no AC coupling needed; works out of the box with the audio library. i've been using it in a few teensy and raspberry pi projects. (none of them having to do with hi-fi though, they're all synthesizer modules).

  9. #59
    Senior Member
    Join Date
    Sep 2013
    Location
    Sonoma County, CA
    Posts
    141
    Yes, you should be able to use it with the Teensy if you can find the pinout of the pi connector.

    One of the things that I had been contemplating was an adapter board for the raspberry pi and the board I'm working on because the interfaces are the same (I2C control and I2S audio). The only downside is having to write a kernel driver

  10. #60
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,673
    I'm sure there is already some linux-code somewhere in the web that could be used. It's not too hard to create a driver.
    Years ago, when the raspi was very new, I patched the existing I2C driver to accept different speeds (before, it was fixed to 100khz) , and it was surprisingly easy to get my patch accepted by the maintainers of "raspbian" and in the official release. I think it's still there.
    Last edited by Frank B; 03-16-2015 at 09:27 PM.

  11. #61
    Junior Member
    Join Date
    Mar 2015
    Posts
    1
    Hi guys!. I'm doing a DAQ with my raspberry Pi B+ and i'm using CS4272, but i have several problems with SPI communitacion. I'm using wiringPi library for GPIO (i so similar to C code) i don't understand how send my samples to DAC.
    Could someone help me with that?
    Thank you very much

    Sorry, my level of english is very low

  12. #62
    Senior Member
    Join Date
    Sep 2013
    Location
    Sonoma County, CA
    Posts
    141
    You may be able to approximate an I2S interface using the GPIO library, but it probably won't work very well because it's not using the dedicated I2S hardware on the Broadcom SoC.

    The best way to do it is to write a kernel driver so that the normal audio programs on linux will automatically play through the dedicated I2S interface to the codec.

    If the board I'm working on performs the way I expect and people are interested in a version that can talk to the raspberry pi, then I'll probably look into that, but I don't really have time at the moment.

  13. #63
    Quote Originally Posted by PaulStoffregen View Post
    Yes, it's expensive. Unfortunately, it's also very necessary.

    Perhaps the PCB can be designed so either the isolation chips or some jumpers or resistors could be placed?
    Paul,

    I recently made some boards to interface a pcm5122 to a Raspberry Pi. I read this comment and am wondering if I need to add this level of complexity. I do not believe the i2c is used except to change volume or filter, etc, so during a 'listening session' I assume it is not contributing noise/distortion. Do I have this right? As for the I2S, this is probably a problem. As it is, I use the 3v3 supply on the raspberry to power the digital of the pcm5122 and have a low noise 3v3 regulator off the 5V supply for the analog side of the pcm5122 and these are star grounded on my board. If I were to do this, I would still need an analog and digital ground star connected, no?

    Regards,

    Keith

  14. #64
    Senior Member
    Join Date
    Jan 2015
    Location
    frisia
    Posts
    285
    @keithg
    The main thing is that there are no common return paths, so no digital return current can travel over the analog ground and vise versa. At these frequencies, using a star ground is an easy layout trick that can solve this issue.

    I just checked the pcm5102 of the HiFiBerry and found a measurement
    The spectrum is dominated by the distortion of the IC and some pickup of the mains. I don't think the mains is coming through the power supply, since there you would expect strong multiples of 100 Hz (rectified mains).

    The good thing in their layout is that in the spectral domain no clear spurious due to the raspberry pi is visible, despite the close proximity.

    On the other hand, what bothers me is the distortion. I assume here that the performance is not limited by the measurement equipment itself. The datasheet claims to have a SINAD of 93 dB (= 15.1 bits). The measured performance is 88 dB (ie. only 14.3 bits). This value should essentially be the IC itself, since there seems to be no output buffer amp on the board.

  15. #65
    @kpc
    Thanks for the reply. I am an ME with audio interests, so I am a bit light on the theory and experience for board layout. I did not get that analysis from the published graph of only 14.3 bits, but nice to know. I am wondering if I need to do anything more/different to get the best performance out of this design. I attach the schematic (basically straight from the spec sheet from TI) and the board layout if you care to comment. This is my Rev2 and I'd like to get as much improvement in it as possible before I have more made. My first attempt did not have a star ground, so that will be one improvement.

    Thanks!

    Keith
    Attached Files Attached Files

  16. #66
    Senior Member
    Join Date
    Jan 2015
    Location
    frisia
    Posts
    285
    Just with a quick look, the grounding looks strange to me. But on the other hand, professionally I designed circuits up to 120 GHz, so I lost the ability to see a PCB just as a connection, I am always thinking in E/H-fields, instead of a normal voltages/currents.
    The analog signal is the most important signal. I drew the current the signal follows. Starting from the power supply capacitor to the IC, then from the connector and all the way back. You would want to make this loop as small as possible, to prevent any RFI/noise etc from entering the line. In general for these kind of lines, there should be a ground return path underneath, without any other line crossing the ground.
    Furthermore, I do not really see the ground strategy. I would put the 'star ground' underneath the pcm5122.
    From a filtering perspective you will always want to force the current over the capacitor. I do not know if you need the planes near the regulator for dissipation, If you need it, I would put slots in it, to force the current over the capacitors. Likewise, I would route the trace from R5 to C12, and then from the C12 pad to the connector, but like I sai, this is probably the RF engineer in me. Another thing about the capacitors, you will always want to place then with the smallest values near the IC, so swap C6 and C8.
    Click image for larger version. 

Name:	return_current.png 
Views:	202 
Size:	63.0 KB 
ID:	4135
    Edit: I only drew the loop for the L-signal. If you imagine a similar loop that the R-signal will follow, you see both loops overlapping, thereby reducing the isolation between both signals.
    Last edited by kpc; 04-20-2015 at 03:33 PM.

  17. #67
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,174
    Quote Originally Posted by kpc View Post
    @keithg
    The main thing is that there are no common return paths, so no digital return current can travel over the analog ground and vise versa. At these frequencies, using a star ground is an easy layout trick that can solve this issue.
    Yes, I agree with this.

    The tricky part of achieving "no digital return current can travel over the analog ground" in practice involves what happens when you connect a Teensy+DAC or RaspberryPi+DAC to anything else which has a ground connection.

    If your DAC has a built-in headphone or speaker amplifier and you connect the speaker directly, and it's a DAC output only (no ADC receiving signals from an audio system), then things are relatively simple.

    But the moment you try to connect to anything else (which isn't purely battery powered and isolated from ground), you suddenly get other ground paths around that nice star ground.

  18. #68
    Senior Member
    Join Date
    Jan 2015
    Location
    frisia
    Posts
    285
    I might not have been very clear, when I said
    easy layout trick
    I meant easy to remember, not easy to implement. I really do know the reality is very harsh.

  19. #69
    kpc,

    Thanks for the instruction. I really appreciate it. Yes, this is a dedicated digital to analog device (playback only). No analog in to deal with.

    My (faulty) logic was to split the ground on the bottom and connect the analog and digital at J1. The ??? on your jpg refers the portion of the analog ground plane which is split from the output ground and connects at J1.

    My 'strategy' was 3 separate the ground from the star at J1: one f for the PCM5122 Digital ground, analog supply ground and analog output ground and all meeting at J1. It is unclear on the PDF, but that is the layout. The large + fill is not needed, I can delete it and just use a large-ish trace for the analog + rail. From your comment,. though, my R ground will always cross the L signal unless I have a separate L and R ground traces on the bottom which do not cross. Is that what you mean?

    I will noodle on this a bit... If I rotate the chip 90 deg, I can shorten the analog outs, and keep the + rail from crossing the outputs but the SDA/SCL will cross them. I'll try again, but with the star at the PCM5122 and see what it looks like.

    Thanks!

    Keith

  20. #70
    Senior Member
    Join Date
    Jan 2015
    Location
    frisia
    Posts
    285
    I played a little with the layout as well. It is just a rough sketch.
    I am not very proud of it.
    The SDA/SCL crossing can indeed not be prevented. But then again these lines should be static when audio is playing.
    I assume ground plane anywhere. The special zones are indicated with the green haching, as well as where they should be connected. In principle no line should cross a gap between groundplanes.
    I am a bit unsure about Vneg. I assume it to be used for the analog stuff, so I also included the analog groundplane underneath it. Or is this voltage part of the charge pump?
    Click image for larger version. 

Name:	testlayout.png 
Views:	618 
Size:	39.1 KB 
ID:	4141

  21. #71
    kpc,

    Thanks for the help. I have not had time to work on it. Maybe this weekend. I spoke too soon, though. I do not think I have to rotate the part, but do have to move the regulator to the other side to do what you have outlined. I'll make these changes and see if I understand all of it and post back. Do you use Eagle? I could post the board layout in that if you want. Regardless, when I am done, the eagle files will be available for others to use/convert to teensy.

    Keith

  22. #72
    Senior Member
    Join Date
    Jan 2015
    Location
    frisia
    Posts
    285
    Sorry, no eagle. Gerber + drill will do.

  23. #73
    kpc.

    The Gerbers are attached. One thing that was not clear to me was if I should connect the charge pump to the digital ground or the analog ground. I have it on the digital. Also, the low noise regulator is set up for the analog side of the 5122 chip. I use the on board regulator for the digital 3v3 supply.

    Thanks again for the 'class' in board layout!

    Keith
    Attached Files Attached Files

  24. #74
    Senior Member
    Join Date
    Jan 2015
    Location
    frisia
    Posts
    285
    Although the digital side is not very critical, I would align the digital signals with the connector where there is still round, instead of underneath the connectors.
    Furthermore, I would give the power supply a little more space wrt the I2C.
    I would also keep the I2C signals together.
    I personally do not like the big loop the power supply takes.
    As for the analog power supply, I see the clean power supply crosses the I2C signals. I would only allow it to cros the digital power supply
    I would also keep the digital ground pin attached to the digital ground and the analog ground pin connected to the analog ground. (I hope the chip designers also kept it separate internally)
    The input of the power supply crosses a gap. This is (almost) never a good idea. In principle there should always be a return path near the signal.
    You can rotate the power supply 90 deg CCW. I kept the decoupling the same, but as there are now 4 C's at the output close together, I would move one of these C' as a 10/100nF input decoupling C, with the ground on the digital side, as this is where the noise is coming from, therefore the current should short this noise to its own local ground.
    Finally, I would keep the charge pump also on its own ground.
    Click image for larger version. 

Name:	keithg1.png 
Views:	350 
Size:	15.4 KB 
ID:	4165

    Click image for larger version. 

Name:	keithg2.png 
Views:	268 
Size:	21.3 KB 
ID:	4166

    Edit: I would also place capacitor at the (optional) power supply input, before the diode. I suppose there will be long leads attached, so it will be perfect as an antenna for picking up mobile phone signals. I do not know where you live, but here in Europe with GSM, all cheap audio stuff will perfectly detect the mobile phone signals. You want to short circuit these signals with a 100p...1nF capacitor.
    The audio lines will also have the same problem, but these already have the capacitors.
    Last edited by kpc; 04-27-2015 at 02:03 PM.

  25. #75
    kpc,

    Thanks again. I think I follow most of your suggestions, but a couple have me stumped.
    "but as there are now 4 C's at the output close together, I would move one of these C' as a 10/100nF input decoupling C"
    The supply has 10uf/10nf on its output and the chip has 10uf/10nf as well. Do you suggest only having the pair at the DAC chip grounded to the digital instead of analog ground? My current layout does not show this, but it is easily done.

    The other is the 5V lead. I need the 5V lead from pin2 on the 40 pin connector to supply the 3v3 regulator. You showed it connected to the 3v3 digital supply which I am pretty sure will not work. Your comment that it is a long run around the 40 pin connector, I get. Is it better to have a long run like that or to run it on the bottom and cut a slot in the digital ground? The only other way I can see it is to have a jumper on the board but do not know if that is even worse. Regardless, I added a small cap to digital ground for the alternate 5V input (J1). I do not intend to use it right now, but could, in the future, use a more appropriate supply on these pins to power the system (board and Pi).

    Also, you showed pin VCOM (pin 10) connected to the digital ground. As I read the data sheet, it seems like this should be connected to the analog ground, but maybe I misunderstand. I interpret this as the ground connection for single ended instead of balanced output...

    Are the grounds connected correctly, now?

    Regards,

    Keith
    Attached Files Attached Files

Posting Permissions

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