I2S line measurement

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi Guys

I'm working on a student project to graduate: a USB to I2S converter (ie a USB PC sound card).

I'm using a 32-bit microcontroller for the USB interface with 2 crystals (one for the USB, the other for the I2C sampling frequency), the microcontroller has a builtin I2S output.
I have to resample the audio flow (coming from the usb) to the I2S output, but it means i'm introducing noise to the "real" signals. The I2S is connected to a DAC.

I want to measure the SNR and THD on the I2S signals (comparing to known audio signal i'll stream on the USB), but i haven't found a good and cheap system (sound card or scope) to record the I2S signals to something i can analyse on a PC (and compare to the original file).

Do you have any idea what i can use?

Kind regards and thanks for your help
Bob
 
not going to find a cheap, fast logic analyzer and FFT/spectrum analyzer i'm afraid, this particular measurement demands some of the fastest and most advanced measurement kit available, someone here may come up with an idea, as i'm certainly not an expert in this field; but unless I misunderstand what you want to do, then I think its impossible on a small budget and without some serious background knowledge to isolate what noise is from what source, as you will need to know exactly what the influence of the gear taking the measurement has; kind of a chicken and the egg thing.

you are looking to isolate the phase noise, which is just one element of what is popularly called jitter. recording the i2s will introduce its own jitter from the recording interface, its power supply, its clock and then again writing it to memory as well will all accumulate jitter as well as any buffer probably effectively removing some

or you are looking to compare the 2 audio files? i2s is not a format like wav or mp3 and cannot be stored as a file, so you would need some sort of logic analyzer to read it and compare the data integrity as well as noise in the frequency and time domains, while isolating the noise sources that are from the measurement gear. thats one hell of a project you have there
 
Last edited:
Member
Joined 2009
Paid Member
You could get/make an I2S to SPDIF converter, e.g. with Cirrus Logic's CS8406. The SPDIF signal can then be fed to a PC sound card with an SPDIF input. If the sound card has an ASIO driver you can get the I2S bit stream into the PC with no changes to the data.
 
Administrator
Joined 2004
Paid Member
You could get/make an I2S to SPDIF converter, e.g. with Cirrus Logic's CS8406. The SPDIF signal can then be fed to a PC sound card with an SPDIF input. If the sound card has an ASIO driver you can get the I2S bit stream into the PC with no changes to the data.

The conversion process however will add some jitter which is one of the things he was probably trying to measure in the I2S stream.

Perhaps National Instruments LabView could be useful, still need a very good data acquisition board. Take a look here: Engineering Education Resources with LabVIEW ? National Instruments Academic
The problem I see is the very good data acquisition card required and the steep learning curve for using LabView effectively. (Powerful computer required)
 
Member
Joined 2009
Paid Member
It is not really a conversion process. It just transfers the bits, without any change, from the I2S bus to the PC. Then it can be recorded and used for comparison with the original signal. I think this is what poudoucou is trying to do.
Of course, if you want to measure jitter, that is something completely different.
 
Don't know what kind of uC you're using but here's an idea. How about writing bits of audio that have been converted to i2c to the flash memory of the uC(or an external one if you need a lot of data). You could put uC in the debugging mode and read data back on your PC. Then use matlab/octave to process the file and calculate noise/error numbers.

No need to use expensive lab equipment in this scenario.
 
So, just to be clear, you want to record the digital data coming out of the i2s, and compare it to the original data coming from the USB?

Do you realize the actual data will be exactly the same?

There is no "resampling" going on.

Any possible effects would be due to jitter, not actual data content.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.