Distance measurement using Ultrasonic sensors and phase shift method

Hi, 
I've recently started a project where the idea is that we have an ultrasonic transmitter and a receiver. The transmitter will send out a signal at 40 kHz that will hit some object, most likely a book, and reflect that signal to the receiver. The received signal should have a phase difference from the outgoing signal. Now, when we vary the outgoing signal, the phase shift should also change. Likewise, if we vary the distance to the object, the number of wavelengths that can fit in between the object and the transducers should also change. We would multiply the incoming and outgoing signals and measure the beat signal, but I'm not sure how we would do this in labVIEW. We can calculate the distance to the object by figuring out what d(phase)/d(frequency) is. So far,when I am having problems with actually getting an incoming signal and figuring what that phase shift is. I'm not sure how I could use simulate signal to accuately and precisely send out a 40 kHz sine wave, and then vary that signal by steps of 1 Hz. I have also tried using a signal generator, and having once BNC cable go to the input of the transmitter and the other going to input of the DAQ. I have another BNC cable going from the output of the receiver to the input of the DAQ. I had multiple channels on my DAQ, and used split signals to see the transmitted and received signal. But this doesn't seem to be working. I also tried to add gain to the received signal, but when adding an Op-Amp LF356 to the receiver, the signal completely disappears. Attached are some of the VI's I have, but none of them seem to be working. Thanks in advance for any help. 
Attachments:
Latest version of final.vi ‏64 KB
Draft for final project.vi ‏89 KB

Have you done the basic physics and mathematics? For the speed of sound = 343 m/s and the frequency = 40 kHz the wavelength is 8.6 mm. At 40.001 kHz the wavelength is 214 nm shorter.
So, how do you propose to keep track of the number of wavelegnths if the target moves more than 8.6 mm?
To measure a phase shift you must have some kind of reference. Typically a fraction of the transmitted signal is used as a reference.  Since you probably do not know how much phase shift occurs in the power amplifier driving the transmitter or between the electrical signal at the transducer and the acoustic signal in air, it is usually best to measure both, ideally with the same receiver and amplifiers.
The LF356 should be good for modest amounts of gain. The transducers can look like a capacitance to the circuits. Do you have a DC offset which is saturating the amplifier?
Lynn

Similar Messages

  • Distance measurement using devantech srf05

    Hello,
    I am working on a university project where i will use ultrasonic sensor for detecting vehicles. The distance measured from the srf05 will be used to determine wether  a parking spot is occupied or not using red and green led lights. I have already used an example from the forums but the problem is that the values of distance obtained are not correct, with numbers reaching thousand of metres.
    What do you thing is the problem? The vi used is attached in the following link :https://decibel.ni.com/content/docs/DOC-3737
    The hardware used is Compactrio 9024 with cRIO 9118 chassis and the module is NI 9403.
    Attachments:
    Parking1.vi ‏100 KB

    Hi Stefanos,
    I have taken a look at your VI and have a few questions/tips I need you to do to establish what is causing the distance to be so large.
    1. If you place a probe on the wire leading to the "Raw Distance (cm)" indicator and one after the high throughput add function. Do either probe display the correct value or is the raw distance correct?
    2. If you test your system and measure a known distance does the distance measured by your application linearly increase or decrease as you move the object? If so, it could be to do with some scaling somewhere.
    3. Would it be possible to create a .zip file with your full project file and attach this to a post. This could allow me to try to recreate the system and see if I experience the same issue.
    I hope this info helps!
    Kind Regards,
    Laurence C.
    Senior Test Development Engineer
    Dyson Ltd

  • Distance measure using ultra sonic sensor:::timming problem

    hi
    i found  a problem during making a distance measure system
    the timming diagram of the ultrasoinc type SRF05 below
    the problem as flow
    after i send at leat 10 us
    what will happen and when to start capture value from output???100 us or 25 us what is mean
    i read this this VI https://decibel.ni.com/content/docs/DOC-3737  and he said::
     """after send 10 us we Wait for falling edge of Output echo or timeout after 18ms""
    best ragards
    hi ?Q>

    GerdW wrote:
    Hi mangood,
    1) read the manual of the sensor.
    2) Read the manual of your DAQ device.
    3) Combine the given error ratios by error propagation rules.
    When you don't know how to apply point 3 you should read some basic books on "Measurement theory" - or consult Wikipedia...
    thank you,i know these ponits
    but you know some time practicatl result diffrent in some how from data sheat
    so maybe some one work on it and see some error and i need how much  happen
    best regards
    hi ?Q>

  • How do i access my installer disc on a 2011 macbook pro as they are virtual now, i have tried to use command r and hold shift on start up

    I have, a 2011 macbook pro with osx lion, last year  it died, by doing the not getting past the logo and startup gear, i tried doing the data screen repair where u type some code and try and repair, that didnt work so i took it to genius bar and it wasnt in warrenty and they were gonna charge me but as was only 3 weeks over the warrenty period, so they did for free, and the harddrive they installed had a 90 day warrenty and that is ova now, and my mac has now done the same thing again and this time i think was a power interruption at some point and now has a fault, another thing that crossed my mind is that yes this has done this but could they have (to save money and not right offf a new one) given me my same harddrive back and jus wiped it now 5 months down the track its broken again?
    The laptop isnt even 18 months old and has broken down twice, my old macbook had 4 5 years not a hiccup.
    In conclusion i need to get photoes off it and cant seem to activate safe mode, or do i know how to access the startup disk that the guy did at genius last time, or get to the data screeen that allowed me to attempt to repair the drive. Can someone help me please, i have tried command r and holding shift, meither have worked.

    It's hard to know whether your hard drive has actually failed or if your system has just gotten badly corrupt. If the former, unfortunately, there may be no way to get any data off the drive at this point. If there aren't any backups of that data, it will be gone forever, unless perhaps a high-priced (ie, in the thousand dollar range) data recovery service has some luck with it.
    If the system and/or hard drive are badly corrupt, the same may be true. Some or all of that data may be irrevocably corrupt by now. However, there are some ways that you can attempt to recover from this situation without paying such huge fees. First, if you have access to another Mac, and both have Firewire ports, you can connect the two using Firewire target disk mode. This will mount the damaged drive as if it were an external hard drive on the second Mac, and could allow you to copy some data from the drive.
    Another possibility would be to buy an external hard drive, install Mac OS X on it and boot the machine from that, then copy any data from there that you can.
    In both of these cases, it may be helpful to scan the damaged drive for recoverable files using something like Data Rescue.
    There are also some possible ways to repair the drive if you can't do either of those things, but any repairs at this point could potentially destroy data. I only recommend this as a last resort. Still, if all other options have failed, try repairing the drive using DiskWarrior. This can fix problems that Disk Utility (and fsck, the command-line tool that it sounds like you may have used) cannot. It is possible that DiskWarrior will be able to get the drive back in working order long enough to get the data recovered, though of course it's also possible the process will be destructive.
    If none of the above work, you'll have to seek professional help.

  • Frequency measurement using Labview 8 and Fieldpoint FP-CTR-502 - wind speed measure

    All the information regarding this kind of application seems to be outdated, I did not find no solution or example to construct frequency measurement VIs using Labview 8
    The examples at "NI Discussion Forums :
    Most Active Hardware Boards :
    FieldPoint Family :
    Low-Frequency measurements using counter/timer" is very strange and so far the steps given seems to be usefull only do old Fieldpoint Explorer.
    I was trying to find a way to learn how to make an anemometer send its signal to a FP-CTR-502 but I have no sucess.
    I am realy very new on this Labview stuff, any help would be welcome.

    (similar thread here)
    Message Edité par Mathieu R. le 12-23-2005 02:28 PM
    .mrLeft{float:left} .mrInfo{border-left:solid 1px #989898;font-size:x-small;color:#989898}
    Mathieu R.  
      CTD - Certified TestStand Developer / Développeur TestStand Certifié  
      CLAD - Certified LabVIEW Associate Developer  

  • HT1602 Can I use Nike+ sensor and a bluetooth headset simultanously???

    I am planning buy a Ipod Nano for running. And I want to use a Nike+ shoe sensor and a bluetooth headset.
    Can I use them at the same time? Or bluetooth only accepts one connection at a time?

    No
    Get a bluetooth headset.

  • RTD Temperature Measurements using LabView 2013 and MyRio

    Hey everyone.  I am VERY new to LabView programming and working with a MyRio.  I need to figure out how to measure the resistance of a 2 wire RTD to find a temperature utalizing the MyRio and LabView.  I am pretty lost on how to do this.  Does anyone know some good resources for making the LabView program off of the tops of their heads?  I've figured out how to measure from specific pins, but I am not sure how to get it to constantly output a voltage from the output pins.
    Eventually, I would like to have it display the temperature as well as have it turn on or off a heater depending on that temperature, but that will come far later in this process. First things first, how do I take temperature measurements utalizing LabView 2013 and a MyRio with a 2 Wire RTD. 
    Thanks so much!

    Hi JoshEpstein87,
    The myRIO can't acquire a change in resistance directly, so you'll need to somehow convert the change in resistance to a change in voltage. There are multiple ways to do this, but you'll need to build an external circuit and then read the voltage output with the myRIO. One example of a circuit that allows you to do this can be found here. To output a voltage on the analog output pins, you should just need to set the output voltage and then it will remain at that voltage until you change it or power cycle the myRIO.
    To get started with LabVIEW and myRIO programming, see the following page:
    http://www.ni.com/myrio/setup/getting-started/
    There are some links to LabVIEW training as well as resources about RIO programming. I also highly recommend you check out the myRIO Community as there are example programs on there that you can take a look at to see how they are designed.
    Best Regards,
    Matthew B.
    Applications Engineer
    National Instruments

  • RPM Measurement using Quadrature Encoder and PXI 6602 counter

    Hi,
    I am on a project at work where I need to verify the speed (in RPM) of an unloaded motor which can operate up to 1400 rpm.  After doing some research, i determined that a quadrature encoder could be used to make the measurement.  I am looking at this encoder  http://sine.ni.com/nips/cds/view/p/lang/en/nid/205321.
    I have a PXI 6602 counter/timer module in which I would like to interface to the quadrature encoder.  I would like to create a VI that allows me to calculate the speed using the encoder.  Can someone provide me with details of what needs to be in the VI or an example which can do this?  At the most basic level, i want to calculate the speed on demand.  After doing this, i would like to figure out how to quickly calculate the speed so that i can determine response time of the speed changing within sub-millisecond resolution (1 ms resolution max).
    Further, i created a VI that allows me to change the pulse width of a 100 Hz pulse train at run-time which tells the motor controller the desired speed.  I would like to be able to use this VI to change the speed of the motor and the first VI (that I am seeking help about) to calculate the response time (time between the initial speed and settling at the new setpoint).
    I am familiar with the NI example finder, but have not been able to find an example that I can use.
    Thanks,
    Gary

    Hey Gary,
    I think for you setup, you should try using the Meas Dig Frequency - Low Freq 1 ctr. You can find it by searching example finder with 'low freq'. This vi tells you the frequency of a digital signal by sampling between two pulses and inverting the time between pulses. If you hook up your encoder to a counter and have that counter specified in the vi, it will be able to give you on demand readings of frequency (you can do some multiplication to get the rpm value, freq*60/pulses per revolution of encoder). A simple way to take continuous readings is to put a while loop around the daqmx read and the data output of the read. You can also replace the numeric indicator to a waveform chart to graphically display the change of frequency or rpm readings over time.
    You should be able to integrate this as two separate tasks with the pulse train vi you created earlier.
    Hope this helps
    Luke W

  • Using Page Breaks and Template Shifting

    I'm working on a book.  The book is in a word formate.  I'm taking the text and porting it into InDesign with page after page being connected. There are 73 pages in total of pure copy once ported in.  Now I'm going in and laying the media into the text.  I have two basic master template designs that I use based on the content being talked about in the text.  Example is Master Template A has a white background, and Master Template B which has a black background. 
    Since the book is alternating between templates depending on the content on the page the pages might look like this:
    Page 1: Template A
    Page 2: Template A
    Page 3: Template B
    Page 4: Template A
    and so on.  I have a question about page breaking.  I'd like to always keep the content on page 3 on a master template B background. 
    However, if I add more content to A, or if I use a page break, the content on all subsequent pages gets pushed down (all pages are connected).  So if I page break on Page 1, my content from page B gets pushed onto a template A background.  This is obviously not what I wanted.  Should there be another function besides page break that I should be using to put separaters?  How can I make sure that my content on page 3 stays on a template B background?

    Right now your text is threaded in one continuous story. When you add new text inthe middle, anything following that point is going to move. To prevent that you need to break the text into separate stories for eac type of content.
    This is basically the same thing as dividing the chapters of a book so that each one starts onthe correct master page, which is didcussed at some length here: http://forums.adobe.com/message/3993405#3993405

  • Ability to use the FFT and phase analyzer in Multitrack mode

    This will be very convenient while recording and mixing. Also, in edit mode it would me much more flexible to have an effectsrack (like the masterrack now) with the ability to go to certain parts in your song with the chosen effects still worlking, instead of being dependant on an earlier determined selection and a play button. eg the same behaviour as in the multitrack mode.

    You can use the search on the read only (normal mode) of the PL/SQL Editor. Either through menu or using ctrl F.
    The other is still an enhancement and is being tracked.
    Sue.

  • DC component measurement using BasicDC-RMS and AvgDCRMS

    Hello,
    I am planning to calculate the DC component from a noisy signal.Both the BasicDC-RMS and AvgDCRMS vi's will the give the ouput as the waveform but how to get them as a constant instead of showing it with the waveform.As the DC component of the signal obtained will be used for the later calculation with a formula.
    Thanks in Advance.
    Solved!
    Go to Solution.

    I just use the Basic Averaged DC-RMS.vi.  It returns the DC value of a waveform.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Phase shift between a pulse and sin wave

    Hello,
    I was wondering if there is any VI that I can use to get the phase shift between a pulse and a sin wave (they have same frequency).
    The Ideal case is that the pulse should go to 1 when sin wave is positive and goes to 0 when the sin wave is negative. I want to set this test to measure the phase shift between pulse going to one and sin wave going positive.
    We just bought labview full version with Signal processing package, and I was wondering if there is anything that would be useful for me.
    Thanks in advance,
    Baran.

    Hi Baran,
    Try this on for size and see if it works for you.
    Have a great day,
    Chris V
    Applications Engineer
    National Instruments
    Attachments:
    Phase Difference.vi ‏22 KB

  • Interchannel delay and phase measurement

    Hi all,
    Below is my latest vi, which I am using to measure the phase shift across the RC circuit. The values I am getting each time I run the program have an error of 0-0.3 radians. When testing for interchannel delay (i.e I put the two analog inputs at the same point on the RC circuit expecting the same readings). However the delay (measured also in radians of phase shift) varies 0-0.3.
    It appears that error is related to the interchannel delay but they are not constant (each run the error is different). Can anyone provide me with insight on how to correct this?
    If someone could also check the program to see if anything is amiss there.
    Sorry the explanation is poor I am having trouble wording the problem. Please ask for any more details. Feedback/advice as always would be hugely appreciated.
    Attachments:
    RC Circuit Test Multiple AI.vi ‏265 KB

    You can account for interchannel delay using the "AI Convert Rate" property available in DAQmx.  Invert it (to get how long the interchannel delay is) and multiply it by the current frequency (in radians per sec) and subtract that from your phase calculation.
    Attachments:
    interchannel delay.JPG ‏10 KB

  • NXT ultrasonic sensor problem

    I guess there is some hardware problem with my NXT ultrasonic sensor , there is a try me option and when I try it to use ultrasonic sensor it makes sounds when something gets close to it ( now it only makes sound when I put something extremely close to it ), other than this it has an option to measure distance in cm , but it can measure no more than 7 cm wheras the booklet that came with it says that it can measure lenghts upto 255cm .
    Anyone had this problem before ?? or can you help me out ?
    Thanks in advance

    Hello dumba16,
    What software are you using to test the device? What firmware are you using? Are you using an example program? If the program is an issue you could post the code so that we can verify its functionality. Have you been able to get any other sensors to work successfully?  If the device is malfunctioning you may want to contact the vendor that you purchased the device from. 
    Wear
    National Instruments
    Product Support Engineer

  • Simulate Signal phase shifting loop

    I am trying to use a loop to phase shift a simulated signal across 360 deg. My loop will change amplitude, frequency, offset, but it won't change the phase, does anyone know how I can do this? I have attached a code that shows the fundamental problem.
    Solved!
    Go to Solution.
    Attachments:
    SimSigPhaseShift.vi ‏34 KB

    When you wire a graph to it and set the graph to ignore timestamps, you see the phase shift. If you wire a chart to it, wire a true constant to the reset input of the simulate signal.

Maybe you are looking for