0
$\begingroup$

I am working on Active Noise Cancellation Project. I came across this strange problem, where the signal is getting attenuated as the audio bit depth changes and I cannot understand it!
My circutit :I connected Audio Output( Head phone terminal) of PC to Audio IN of NI myRIO 1900 device using AUX cable (two way 3.5mm jack cable). I have a pre-recorded signal(.wav) of sinusoidal waveform with Amplitude 1, Frequency 2kHz, 40000 Sample Rate, 80 Number of Samples, Bit depth( bits per sample) = 16.
Now, I just played .wav file using windows media player and tried to record the waveform on NI myRIO module. Surprisingly, I am getting an attenuation of the signal corresponding to the volume reduction in PC(not linear!!). Only I could see the waveform close to amplitude 1, when I increased the volume of the system to 100%. Please explain this !!

The ADC of NI myRIO has its Resolution as 12 bits but the audio Output(.wav file) is 16 bit data. I am expecting it does not have to matter except in quantization errors, as at the PC Audio Out, the audio data should be converted to analog and and again at the 'NI myRIO Audio In', this analog signal will be sampled! (please correct me if I am wrong !)
Another question is, I have tried the same with sinusoidal sound of Amplitude 2.5 and all other specifications are same as given above, now the audio signal is clipped off at 1V above and below -1V. enter image description here
ADC(NI myRIO) nominal range is 2.499V to -2.5V! Is it bacause of the bit depth conversion?
Please explain these things !TQ

$\endgroup$
5
  • $\begingroup$ Unless you have a complete path with a specified calibration, it's normal for signals to be attenuated or amplified by almost arbitrary values to keep typical signals within a reasonable range. To do so, the bits dropped in reduced ranges are typically the LSBs, not the most significant. $\endgroup$
    – hotpaw2
    Nov 13, 2015 at 7:14
  • $\begingroup$ By amplitude of 1 in a 16-bit WAV file, do you mean that the sine wave goes from +32678 to -32767 peak-to-peak? If so, then amplitude 2.5 makes no sense as the those were already the minimum and maximum 16-bit values. $\endgroup$ Nov 13, 2015 at 21:00
  • $\begingroup$ @OlliNiemitalo Its not clearly given in the VI description, whether amplitude of 1 means volts or sth. But I think it means 1 Volt signal $\endgroup$
    – charansai
    Nov 14, 2015 at 15:18
  • $\begingroup$ I mean the WAV file you played with the PC's built-in sound device. $\endgroup$ Nov 14, 2015 at 15:54
  • $\begingroup$ @OlliNiemitalo No no, I created wav file using LabVIEW not PC ! $\endgroup$
    – charansai
    Nov 14, 2015 at 16:55

1 Answer 1

0
$\begingroup$

From NI myRIO-1900 User Guide and Specifications:

The audio inputs are left and right stereo line-level inputs with a ±2.5 V full-scale range

• For Audio In/Out,
LSB Weight = 5 V ÷ 212 = 1.221 mV
Maximum Positive Reading = +2047 * 1.221 mV = 2.499 V
Maximum Negative Reading = -2048 * 1.221 mV = -2.500 V

Your computer's head phone output probably has another constant of proportionality between voltage and numerical value. Perhaps you can find manufacturer's data, but it is probably safer to simply measure with the help of your NI device.

$\endgroup$
1
  • $\begingroup$ Yeah, I understood with some help that PC is clipping off all the signals above 1V amplitude of sine wave. As I understood, even if I play wav file of a 1V amplitude sinusoidal wave, this amplitude when output through headphone will be attenuated/modified according to the PC volume control and Windows media player volume control. If I increased both PC and Media player volumes to 100%, then built in sound card is giving 1.6V amplitude output,whereas external sound card is giving 1V amplitude output. Irrespective of the PC volume, the sinusoidal signals above 1V amplitudes are clipping off!! $\endgroup$
    – charansai
    Nov 14, 2015 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.