This widget could not be displayed.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Proof of Concept

 Hello,

 

Sound travels at roughly 340.29m/s. D = vt. Using these two basic concepts I want to build a navigation system for a robot.

 

What I've already done

Built a PCB with a condenser microphone that can pick up desired frequencies. At the moment my PCB or beacon can pick up a 1500 kHz tone. 

 

I am using some code I found on these forums to generate a 1500 kHz tone through the computer speakers.

 

I am using a PCI-6229 and a SCB-68 where I have setup a 100 kHz square pulse and am feeding it back into the PCI-6229 where I am count rising edges.

 

I've written some code that will store the number of counts when the beep is sent, and store the number of counts when the sound beacon picks up the sound and transmits the data via radio signal.

 

Working backwards, we know that 1 count equates to 0.00001s. Using d = vt We know v = 340.29m/s. t is the function of the difference in counts divided by the 100 kHz giving us the time. Therefore we should be able to calculate d.

 

The Problem

From 1m away the results always indicate 60 meters. I am pretty sure the discrepancy in the counts is due to interrupt priority issues, labview is windows based and processing power is being used else where, and that my code takes time to process causing delays.

 

This is a time critical application and I have no idea where to go to next.

 

Things I have been suggested to look at.

 

  • Look at the lower levels of the language and try counting clock cycles for each function. (would have a clue how to do this in labview)
  • Using FPGA. Can this be done in labview and with the equipment I already have?

 

Can someone shed some light on the matter please?

 

Thank You

 

Kamilan

 

P.S.

 

my current code and sub vis can be viewed here

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=361796#M361796

 

0 Kudos
Message 1 of 2
(3,067 Views)

Kamilan,

 

LabVIEW Real-Time and LabVIEW FPGA are excellent options for more time-critical applications.  You're probably looking more along the lines of FPGA for this project, most likely an R-Series card.  With this device you would be able todo I think the same thing that you are doing in your code except the sound output.  You'd use a waveform stored in a look-up-table on the FPGA and output the waveform as a voltage.  From this you could make an external amplifier, etc, to produce the sound.  It will be quite a bit different coding-wise as FPGA has a pretty steep learning curve, but it could very well be possible.

 

See if any of the following devices fit the criteria you are needing: http://zone.ni.com/devzone/cda/tut/p/id/2883

Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,049 Views)