LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency shift to audible in real time

I'm processing ultrasonic (155KHz) signals that I'd like to shift to the audible spectrum and play through the PC speaker to allow the user to hear the spikes (clicks) detected while testing.

 

The nominal white noise is about 12mv peek to peek with spikes ranging from 20mv to 1 volt. We currently do this in hardware but with the our new LabView monitor, we'd like to get rid of as much of the existing hardware and associated circuitry as possible.

 

Any suggestions on how to phase shift the 155KHz signal to the audible range and then play through the PC audio in real time would be greatly appreciated?

 

Thanks, Terry

0 Kudos
Message 1 of 10
(4,182 Views)

Hi Terry,

 

If you are trying to just detect spikes and all you need is to hear a beep when a frequency reaches some point, I would suggest you use Peak Detection then just have your system play a default sound. Otherwise you could try to pitch shift your signal to an audible range then play that. I have a few documents below that may help you get started. Also in the example finder in labview you can look for sound examples to help you with the sound output.

 

Peak Detection Using LabVIEW and Measurement Studio

http://zone.ni.com/devzone/cda/tut/p/id/3770

 

Pitch Shifting in Real Time

http://zone.ni.com/devzone/cda/epd/p/id/6219

 

Play Waveform Express VI

http://zone.ni.com/reference/en-XX/help/371361G-01/lvpict/playwaveform/#DBox

 

 

Tim O

 

Applications Engineer
National Instruments
Message 2 of 10
(4,162 Views)

Tim, thank you for the info and links. Unfortunately we have a hard requirement to provide an audible output for the test as it is being run. I will check out the resources you provided.

 

Thank You!

Terry

0 Kudos
Message 3 of 10
(4,157 Views)

Terry,

 

Have you tried simple heterodyning?  This is typically used in radio receivers but in principle can be used at any frequency.

 

Lynn

Message 4 of 10
(4,155 Views)

Tim, a followup question - The download referenced to use the vi is LabVIEW Run-Time Engine 8.6.1. I'm currently running LabView 2009. Would the corresponding run time engine for 2009 have the require vi or will I need to update to the latest version?

 

Thanks,

Terry

0 Kudos
Message 5 of 10
(4,152 Views)

Hi Lynn,

 

I took a look at heterodyning and am not sure how I would get started. I'm way out of my league here but not afraid to jump in and would welcome some direction. The info I skimmed on heterodyning is here. http://en.wikipedia.org/wiki/Heterodyne

 

Thank you!

Terry

 

0 Kudos
Message 6 of 10
(4,151 Views)

Terry,

 

That article is probably pretty good for background. I only looked at it for a few seconds.  The paragraph on the trigonometry is the key.  You multiply the ultrasonic signal by a sine wave you generate. The product contains frequency components at the sum and difference frequencies.  Run the product through a low pass filter and you have the signal translated downward in frequency.

 

Let the signal components of interest be between 145 kHz and 155 kHz.  Multiply by 144 kHz.  Sum frequencies range from 289 to 299 kHz.  Difference frequencies are from 1 kHz to 11 kHz.  Use a ~20 kHz low pass filter and what you have left are signals translated to the audible range.  You will also need to resample the data since your original signals will have been sampled at a much higher rate than the audio out system can handle.

 

If you need a 50 kHz bandwidth squeezed down to 15 kHz this method will not work.

 

Lynn

Message 7 of 10
(4,144 Views)

Hi Terry,

 

You do not need to update your Run-Time Engine since the 2009 version was released after 8.6.1.

 

Tim O

Applications Engineer
National Instruments
Message 8 of 10
(4,116 Views)

Lynn,

 

Thank you for the suggestion and general guidance on how to proceed. I was able to put together a small vi to extract the low frequency harmonic and send it to the sound buffer.

 

 

Terry

0 Kudos
Message 9 of 10
(4,087 Views)

Tim,

 

While I was unable to get the component to build, still missing sub vi's that weren't found, I was able to use the harmonic approach and get an acceptable result. I have saved off your suggestion though and plan to revisit once I've got the other development completed. I appreciate you're response to my request for assistance and look forward to investigating your suggested solution further once I become more proficient and have a better understanding of the labview tools.

 

Thanks,

Terry

0 Kudos
Message 10 of 10
(4,084 Views)