| Electronics > Projects, Designs, and Technical Stuff |
| USB noise or ground loop? |
| << < (3/6) > >> |
| Nominal Animal:
--- Quote from: drummerdimitri on March 24, 2019, 02:27:55 pm ---Questyle CMA400i. --- End quote --- The core DAC chip in that one is an AKM Semiconductor Inc. (AkashiKasei) AK4490EQ chip. It has separate analog and digital supplies and grounds. It is quite possible that the board in the CMA400i combines them, and the noise is indeed generated by the USB receiver circuitry. (One of my pet peeves is a similar design "stupidity" in stepper motor controller boards. All the good driver chips, from Allegro A4988 to Trinamic TMC series, have separate digital and motor grounds. Very few (none of the cheaper hobbyist ones) keep the motor side completely isolated, however. It makes me very disappointed, because digital isolators are cheap (especially at the frequencies of DIR/STEP control signals -- even optocouplers can be used if you want to keep it real cheap), and using them at right spots would make the boards so much more robust, and easy to use in cases where the motors have their own separate supply. It is basically the same situation as with audio, except that it's the motors that cause problems to the digital side. Both suffer from ground loops, and bad design.) --- Quote from: drummerdimitri on March 24, 2019, 02:27:55 pm ---Will stick to optical for now since the galvanic isolator is ridiculously overpriced. The only reason I slightly prefer to use USB is for its supposedly lower jitter specifications and asynchronous clock. --- End quote --- Right. I suspect you'd get best results if the male side is to the computer, and you use a cable where the GND and VCC lines are cut near the DAC connector for the isolator-dac section. That way you should avoid any noise from the switch-mode DC-DC supply in the isolator. The reason for cutting the VCC/GND off from near the DAC USB connector is to ensure it won't act like an antenna, introducing noise to the DAC USB circuitry. Verify the switch is in the 12 Mbit/s position. For those who do not understand the difference, SPDIF/TOSLINK is one-directional. The computer will send a digital audio signal at a fixed frequency, and the DAC simply has to try to keep in sync. For say 48000 kHz audio sample rate, if the computer and DAC clock differ by just 1 Hz or 0.002%, each second there is either an extra sample, or a sample is missing. That is what jitter is; timing error. The DAC cannot just buffer the data, because there is no way for it to signal back to the computer that it needs more data (DAC clock is fast compared to computer) or that the computer should wait for it to play it back first (DAC clock is slow compared to computer). With USB data, the audio signal is transferred in short blocks (up to 1023 data bytes for full-speed USB, 12 Mbit/s), with header and checksum data (typically the overhead is less than 25%). Each successfully sent data block is acknowledged. Essentially, the computer does not need to have an internal clock, and provides the data asynchronously to the DAC; it simply sends audio data whenever the DAC is ready for it. |
| ogden:
It is easy to test source of the noise - you need just laptop running on batteries, disconnected from mains, no other connections besides DAC. If no noise in this case - then it is groundloop. I bet it is BTW. Do you use XLR or RCA for amp connection? Using XLR may help minimize conducted noise problems. --- Quote from: Nominal Animal on March 24, 2019, 03:34:58 pm ---For those who do not understand the difference, SPDIF/TOSLINK is one-directional. The computer will send a digital audio signal at a fixed frequency, and the DAC simply has to try to keep in sync. For say 48000 kHz audio sample rate, if the computer and DAC clock differ by just 1 Hz or 0.002%, each second there is either an extra sample, or a sample is missing. That is what jitter is; timing error. --- End quote --- Jitter is cycle-to-cycle clock irregularities. Clock frequency difference is just frequency difference or clock wander. https://statics.cirrus.com/pubs/whitePaper/WP_Specifying_Jitter_Performance.pdf Digital audio receivers recover clock from incoming stream and DAC usually is made as clock slave to the receiver. Particular DAC have professional digital audio AES/EBU input - I doubt that it's digital audio receiver may be inferior to USB receiver by any stretch of imagination. Not in this grade of hardware. I would just use TOSLINK optical to isolate PC from audio equipment and forget about the problem. PC is noisy piece of [censored] and you better isolate it from your analog audio no matter what. |
| pwlps:
--- Quote from: Nominal Animal on March 24, 2019, 03:34:58 pm ---With USB data, the audio signal is transferred in short blocks (up to 1023 data bytes for full-speed USB, 12 Mbit/s), with header and checksum data (typically the overhead is less than 25%). Each successfully sent data block is acknowledged. Essentially, the computer does not need to have an internal clock, and provides the data asynchronously to the DAC; it simply sends audio data whenever the DAC is ready for it. --- End quote --- Data acknowledgement and error correction is used in bulk mode but not in isochronous mode. The Audio Device Class uses isochronous transfers, see e.g. https://www.edn.com/design/consumer/4376143/Fundamentals-of-USB-Audio, https://www.silabs.com/documents/public/application-notes/AN295.pdf. Even at the highest audio sampling rates USB would be fast enough for buffering and error correction but as I understand they do it this way because for musicians minimizing latency is more important than correcting errors. Quoted from https://www.silabs.com/documents/public/application-notes/AN295.pdf --- Quote ---Unlike other transfer types, isochronous transfers have no hardware-controlled handshaking or error-checking ability, so errors may occur occasionally. Systems must be able to recover from occasional errors without the help of hardware. --- End quote --- Would that mean that any corrupted data byte will appear as noise? Unless the DAC software employs some intelligent algorithm to detect corrupted bytes and replace them with some interpolated values (but maybe not in a cheap headphone DAC). High-quality equipment often use some proprietary protocols like ASIO instead of the standard USB audio class, but I don't know what type of error checking they use. |
| Nominal Animal:
--- Quote from: ogden on March 26, 2019, 09:12:08 am ---Jitter is cycle-to-cycle clock irregularities. Clock frequency difference is just frequency difference or clock wander. --- End quote --- I stand corrected. I did intend to refer to wander and not jitter. As that paper defines, "Jitter is the dynamic deviation of event instants in a stream or signal from their ideal positions in time, excluding modulation components below 10 Hz." (Some others define it as excluding components below 1 Hz.) --- Quote from: ogden on March 26, 2019, 09:12:08 am ---Digital audio receivers recover clock from incoming stream and DAC usually is made as clock slave to the receiver. --- End quote --- That particular chip is pretty funky, and requires a 8 to 37 MHz master clock. I imagine it is very nontrivial to try and sync that frequency master clock from a 44.1 kHz to 192 kHz signal, with minimal jitter and wander. --- Quote from: pwlps on March 28, 2019, 08:43:28 am ---Data acknowledgement and error correction is used in bulk mode but not in isochronous mode. --- End quote --- Even isochronous transfer packets have a checksum, so errors can definitely be detected; but as you correctly pointed out, there is no ack/resend mechanism. --- Quote from: pwlps on March 28, 2019, 08:43:28 am ---Would that mean that any corrupted data byte will appear as noise? Unless the DAC software employs some intelligent algorithm to detect corrupted bytes and replace them with some interpolated values (but maybe not in a cheap headphone DAC). --- End quote --- You cannot detect which samples are corrupted in a corrupted isochronous packet, so such an algorithm would have to rely on examining the data; and detecting "out-of-place" samples in PCM is hard. I would expect the errors are typically random single-bit flips, which sound more like crackle than a background hiss, depending on how often the errors occur. |
| Bassman59:
--- Quote from: pwlps on March 28, 2019, 08:43:28 am --- --- Quote ---Unlike other transfer types, isochronous transfers have no hardware-controlled handshaking or error-checking ability, so errors may occur occasionally. Systems must be able to recover from occasional errors without the help of hardware. --- End quote --- Would that mean that any corrupted data byte will appear as noise? Unless the DAC software employs some intelligent algorithm to detect corrupted bytes and replace them with some interpolated values (but maybe not in a cheap headphone DAC). --- End quote --- It's up to the device how it handles corrupt or missing data. It's best to mute the output, I think. --- Quote ---High-quality equipment often use some proprietary protocols like ASIO instead of the standard USB audio class, but I don't know what type of error checking they use. --- End quote --- ASIO still relies on isochronous transfers. There is no way to resend data if those data are live samples coming from microphones! I suppose you could have a buffer and attempt retries from it, but the latency might be intolerable, and how big should that buffer be, and anyway that would be a custom device class and your digital-audio workstations and all probably won't be able to talk to that hardware. A better question is: how often does one see errors in USB transmission? In my experience, it either works perfectly or it fails miserably, and the problem is usually solved by replacing the cable. |
| Navigation |
| Message Index |
| Next page |
| Previous page |