Acqusitioning signal from sonar sensor and filtering

Hi
I am using sonar sensor to caclulate the distance and velocity of my robot vehicle. If I look at signal in Ocope for distance measurement I have two signal(see attachment) one shorter pulse width which is command from host controller to sonar sensor to emit burst this shorter pulse is like 2 micro second and then when the echo returns I have larger pulse this pulse width depends upon the ditabce from the object--larger pulse width is from 115 microsecond to 18.5 millisec. Since I want to calculate the velocity of my robot I need only larger pulse width and if I take difference of two consecutive larger pulses it will give me the velocity.
but in present case I get pulse width of two consecutive as one larger and one smaller every time. My question is how can I filter or reject shorter pulse from my calculation.
see my attachments for Oscope which is exactly what the signal should look like. But the signal which I am capturing in Vi is all edgy how can I take good signal in Vi and how can I get pulse width for only echo that I receive in sonar and not shorter pulse in order to calculate further my velocity and stuff.
thanks
Attachments:
labcapture.zip ‏432 KB

Hi
I captured the signal in Vi that came with NI examples cont acq & graph voltage-int clk.vi . I mentioned earlier since sonar sensor emits small ping and then larger pulse tells you about the distance larger the pulse farther the distance ideally speaking I must see one small pulse and one larger pulse but I can see the larger pulse but instead of small I am looking at some noise or distortion. so pattern I am getting is large pulse and then distortion , larger pulse then distortion and so on. If I am able to remove that noise the larger pulse width is my distance which I want further for my calculation. Look at the attachments.
What do you suggest?
My Vi was same as I posted only I have attached graphic indicator more in the Vi.
Due to this recurrent distortion I get some wrong constant data and number alternatively which makest my delta X i.e dstance same
for example distortion every times give me 0.17 distance so if disance is like 20 cm my display will work like 20--0.17---21---0.17--22---0.17 so if I take deltax that is difference between twoconsecutive distance change which should be like difference between 22-21=1 it actually becomes 22-0.17=20.93 and next time it calculates 0.17-23=-22.83 which becomes wrong.
If I remove this distortion or tell my Vi not to read below certain votages--- how can I do that.
Since you mentioned increase the thresh hold how we do that and how to remove this distortion just see my captures of the signal.
Thanks
Attachments:
signal1.zip ‏110 KB

Similar Messages

  • How to get signal from analog input and send it to analog output (real-time​)

    Hi everyone,
    I am doing simple task in Visual C++ and I am using PCI-6221(37 pin).
    Basically, I want to send same signal from 'analog input' to 'analog output'
    at the same time (almost), to make it real-time application.
    Can someone please provide me sample program. 
    I would appreciate if you could provide me with the good tutorial which explains
    step by step everything about programing NI-DAQmx for C/C++.
    Best Regards,
    Khassan
    Solved!
    Go to Solution.

    This is my code in C++, you can optimize it if it looks too messy. This code reads signal from analog input and outputs it through analog output. 
    To make this code work additional  include directories and library directories must be added from NI.
    I hope it helps someone.
    #include <stdio.h>
    #include <conio.h>
    #include "NIDAQmx.h"
    #include <math.h>
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    int main(int argc, char *argv[])
    int32 error=0;
    TaskHandle taskHandleRead=0,taskHandleWrite=0;
    int32 read=0;
    float64 dataRead[1000];
    char errBuffRead[2048]={'\0'};
    char errBuffWrite[2048]={'\0'};
    bool32 done=0;
    int32 written;
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleRead));
    DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleRead,"Dev1/ai0​","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Vo​lts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleRead,"",100.0,DAQ​mx_Val_Rising,DAQmx_Val_ContSamps,0));
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleWrite));
    DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandleWrite,"Dev1/ao​0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleWrite,"ai/SampleC​lock",100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1​000));
    DAQmxErrChk (DAQmxStartTask(taskHandleRead));
    DAQmxErrChk (DAQmxStartTask(taskHandleWrite));
    while( !done && !_kbhit() )
    DAQmxErrChk (DAQmxReadAnalogF64(taskHandleRead,1,10,DAQmx_Val_​GroupByScanNumber,dataRead,1000,&read,NULL));
    DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleWrite,read,0,10.0,D​AQmx_Val_GroupByChannel,dataRead,&written,NULL));
    _getch();
    Error:
    if( DAQmxFailed(error) )
    DAQmxGetExtendedErrorInfo(errBuffRead,2048);
    DAQmxGetExtendedErrorInfo(errBuffWrite,2048);
    if( taskHandleRead!=0 )
    DAQmxStopTask(taskHandleRead);
    DAQmxClearTask(taskHandleRead);
    if( taskHandleWrite!=0 )
    DAQmxStopTask(taskHandleWrite);
    DAQmxClearTask(taskHandleWrite);
    if( DAQmxFailed(error) ){
    printf("DAQmx Error: %s\n",errBuffRead);
    printf("DAQmx Error: %s\n",errBuffWrite);
    printf("End of program, press Enter key to quit\n");
    getchar();
    return 0;

  • I m using apple mac pc, when we start windows 7 , apple mouse doesn't work properly it take to much time to gain signals from the pc and many times it not work but when we use mac it moves fastly and works properly. please suggest me. thanks ravi

    i m using apple mac pc, when we start windows 7 , apple mouse doesn't work properly it take to much time to gain signals from the pc and many times it not work but when we use mac it moves fastly and works properly. please suggest me.
    thanks
    ravi
    <Email removed by Host>                                                                                                                                                                                                                                       

    sounds more like Bluetooth rather than moue, but w/o knowing w/o posting mac model type/year we... will... not... know... what you have
    All computers are personal computers, a PC though is also "non-Apple" in common usage.
    Mac also is platform and OS.
    Very confused reading what you are trying to tell us.

  • How to create a table with 3 inputs one of which is received from a sensor and the other 2 are constants

    i want to create a table that has 2 angles (beta and theta) that could assume values from 0 to 180º and gamma that is given from a sensor to the table at every moment... all angles depend of each other and i want a table that demonstrates that. so i can pull a data to use it in a equation. can someone help with this mess?

    alufe wrote:
    I have to make an array for each angle and connects them?
    That's one way. You end up with multiple 2-D arrays. You also could make a 3-D array to iterate through all your beta/theta arrays, calculating a gamma for each pair, if you understand arrays of multiple dimensions. You seem to indicate a major shortfalling in your math skills here, so I'll repeat, work with your teacher until you can understand the math, and then work on the programming.
    You have to know what you want to do before you can do it. In this case, you have to know what that array represents, and how (I'm talking math now) you are going to determine/represent the one set of numbers you need to work with for each experiment before you set something up in software.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Acquring signal from piezo sensor

    im new to labview.im using usb-6251 to read voltage from a piezo sensor. i started off by reading the voltage with an avometer and it read 0 volts at free strain now i used a BNC cable to wire the piezo to the analog input channel and read it using the daq assistant there was on offset of about 1.7 volts when i used floating source configuration. when i used ground ref source configuration the readings were not reasonable it kept drifting while im not applying strain and whever i touch the insulator of the cable the reading keeps going from min voltage to max voltage. i made sure of the positive and negative terminals and that im reading from the correct channel.any help with the configuration or a possible reason for the problem would be appreciated . this is a screenshot of the readings while using floating source and no strain applied (it should be reading zero)

    An "AVOmeter"?!?  Haven't heard that term in... well actually ever.  But my dad used to have a "Megger" so I know what you mean.
    It sounds like your electrical setup is probably wrong, not your DAQ.  What kind of piezo are you using?  What kind of signal conditioning circuit is conected to it and what signal does the circuit output???
    EDIT:  Added avometer wiki-link.

  • How to isolate the signals between TX/RX and RX2 on the USRP N210?

    Hello everyone,
        I want to use one USRP N210 to transmit and receive signals simultaneously. But when I try to transmit signals from TX/RX and receive signals from RX2(the transmitted and received signals are on the same center frequency), I found that the there are signals leaked from TX/RX to RX2.  What can I do if I want to isolate the signals between TX/RX and RX2?
       Thanks very much!

    Hello -
    I believe two questions are being asked on this thread:
    1. Isolation:  The internal switch provides about 30dB of isolation between TX/RX and RX2. As with most transcievers, if you transmit and recieve on the same frequency at the same time you will recieve your own transmission as well.
    2. Spurs: The USRP represents and optimized price vs performance and some images and spurs will occur.  Often they can be predicted as you mention. One thing you can do is use the CORDIC to acquire a signal at IF and then digitally shift I and Q to the ceneter frequency and bandwidth of interest.   This is done by setting the 'lo' via a property node and 'center frequency' to different values.
    Other NI RF instrumentation options are available if you're looking for  RF performance.  The NI 5791 was recenty released and may be of interest.
    Best Regards,
    Erik

  • Linking/combining data from old sensors

    Is there any way to combine all the data captured from old sensors and add that to the current sensor data. My first sensor went bad. I would like to put that old data back on my iPod and combine that on iTunes with the current sensor...and then delete/remove the old/bad sensor from iTunes. The Nike website combines all the data as if there was only one sensor used, but the iPod and iTunes do not. Is there any way to do put that data from the old sensor back on the iPod and combine all the data in iTunes?
    Thanks.

    I figured out how to do this--how to combine the old data with the new data and delete the old sensors from iTunes.
    I downloaded an application called TinkerTool at http://www.bresink.com/osx/TinkerTool.html
    This application enables you to view the hidden files and folders (on your Nano). With this program I was able to find where the Nike+ data is stored on the Nano. The data for each sensor (including the workout data) is stored in a folder named "Empeds" at:
    Ipod_Control/Device/Trainer/Workouts/Empeds
    Before you attempt any of this, I would recommend you make a copy of this folder in case something goes wrong, you will have a backup (just in case).
    Here's what I did...
    Within the Empeds folder you should see subfolders (or many subfolders if you had many sensors) with a long string of numbers and letters (e.g. 4H713B45VSX). Each of these folders represent a different sensor. Inside that folder (with the long string of numbers and letters), you will see several xml files with the workout date used as the name of the title of the file. I simply combined all these xml files and pasted them inside the folder with the current sensor data. The oldest sensor was listed first alphabetically...and the newest sensor was listed last.) Then I deleted the other folders with the (with the long string of numbers and letters).
    Once I figured out how to do this, it took less than 5 minutes.
    Please let me know if you have any questions.
    Thanks.

  • How to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

    How do you read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine?
    I tried using a DAQ Assistant but the CAN port is not included as one of the supported physical channels even though all its drivers are upto date.
    Please help..
    Thanks.
    Solved!
    Go to Solution.

    Attached herewith is a print screen of what is showing on MAX
    The CAN ports are on NI PXI-8461
    Hopefully that clarrifies something.
    Attachments:
    Untitled.png ‏212 KB
    Untitled.png ‏212 KB

  • How to read and display a signal from my PIC Microcontr​oller onto Labview?

    Hi,
    I am doing a project on a Pulse Oximeter and i am trying to read and display the signal from my PIC Microcontroller on Labview? How do i go about doing it? I am using the PIC16F877 and also making use of the USART?
    How do i implement and initialise the USART in PIC16? What are the steps to be taken, please guide me through the process? The link provides information regarding the USART connection, initialisting and stuff? Is it correct to use these codes in my program?Link: http://ww1.microchip.com/downloads/en/AppNotes/007​74a.pdf
    Also, i am using the RS232 serial interface to connect to the PC? The connector i am using is the DB9 Connector. Which template and VI can i use? Am i supposed to use the NI-DAQmx and VISA? Also, for my USART connection, i am using the MAX232 Driver which is applicable for my application as i am working with +5V. So far, i have been reading and trying out on Labview and the steps i have taken are:
    1) Open a New VI and used the Instrument I/O(Read & Display) template?
    2) How do i configure the Instrument I/O Assistant Express VI to read the info from my device connected to COM1?
    3) I was reading the Labview Manual, 'Getting Started with Labview' and i was following the steps under Page 55, Communicating with an Instrument. Am i on the right track?
    4) How do i check and make sure that the port settings of the I/O Assistant and my PIC Micro Match
    Please help me out and guide me through the process. I am student at a polytechnic and i am very new to Labview and the software is used as a development tool for the project. I have a deadline to meet and i hope i can get a response as fast as possible. Your help will be kindly and greatly appreciated. I hope to hear from you guys soon.You can e-mail me all your answers at [email protected]
    Thank You
    Best regards,
    Ashwin
    Ashwin Kumar Mansukhani
    Attachments:
    Getting Started with Labview.pdf ‏901 KB

    Hi Ashwin,
    It is a good idea to first be able to communicate with the microcontroller using some sort of serial communication software such as "HyperTerminal" or "Procomm", etc. Refer to MicroChip's recommendations on this.
    Once that works, then you are ready to use LabView.
    Here is a link which covers many aspects of serial communication. Link - click here
    You probably received a development kit. They usually have a readily available interface. It's been a long time since I played with the PIC, but I seem to remember that you need to program the serial communication driver (as well as at least a bootloader) to get the serial communication going. The driver contains the necessary protocols so that you PC can have a machine conversation with the target (PIC).
    It sounds like a fun & interesting project. Please avoid to have replies to your personal email. By having the answers posted to this thread, you will get much more support and advice.
    Have fun,
    JLV

  • How to read and display a signal from my PIC Microcontroller onto Labview

    Hi,
    I am doing a project on a Pulse Oximeter and i am trying to read and display the signal from my PIC Microcontroller on Labview? How do i go about doing it? I am using the PIC16F877 and also making use of the USART?
    How do i implement and initialise the USART in PIC16? What are the steps to be taken, please guide me through the process? The link provides information regarding the USART connection, initialisting and stuff? Is it correct to use these codes in my program?Link: http://ww1.microchip.com/downloads/en/AppNotes/00774a.pdf
    Also, i am using the RS232 serial interface to connect to the PC? The connector i am using is the DB9 Connector. Which template and VI can i use? Am i supposed to use the NI-DAQmx and VISA? Also, for my USART connection, i am using the MAX232 Driver which is applicable for my application as i am working with +5V. So far, i have been reading and trying out on Labview and the steps i have taken are:
    1) Open a New VI and used the Instrument I/O(Read & Display) template?
    2) How do i configure the Instrument I/O Assistant Express VI to read the info from my device connected to COM1?
    3) I was reading the Labview Manual, 'Getting Started with Labview' and i was following the steps under Page 55, Communicating with an Instrument. Am i on the right track?
    4) How do i check and make sure that the port settings of the I/O Assistant and my PIC Micro Match
    Please help me out and guide me through the process. I am student at a polytechnic and i am very new to Labview and the software is used as a development tool for the project. I have a deadline to meet and i hope i can get a response as fast as possible. Your help will be kindly and greatly appreciated. I hope to hear from you guys soon.You can e-mail me all your answers at [email protected]
    Thank You
    Best regards,
    Ashwin
    Ashwin Kumar Mansukhani
    Attachments:
    Getting Started with Labview.pdf ‏901 KB

    Hi Ashwin,
    I am not familiar with the PIC Microcontrollers, but I am assuming you mean that you have the microcontroller sending out serial data that you want to read on another computer with LabVIEW. Please let me know if this is incorrect.
    What type of data is coming out of the serial port? Is it ASCII, or binary? The reason I ask this is that the serial communication in LabVIEW is done through a protocol called VISA, which uses ASCII data to send and receive. You can later convert this data into whatever form you need, but this is what it is designed to read and write.
    You can check the settings such as baud rate and data bits in a configuration utility called Measurement and Automation Explorer, or MAX. When you open up the MAX interface, you can expand the Devices and Interfaces entry on the left, and then expand the Ports entry to see your serial port. When you highlight this port, select the Port Settings tab at the bottom of the window, and you can see what the current settings are, and change them if you need to. You can also set these parameters in LabVIEW using the VISA Configure Serial Port VI.
    You can also test communication in MAX by right clicking on the correct port and choosing Open VISA Session. Then choose the Basic I/O light blue tab, and then go to the Read tab. When you click execute, it should read in what is coming from the serial port. This will allow you to verify that the correct information is coming in before even trying to acquire the data in the LabVIEW environment.
    In LabVIEW, the best resource to use the Basic Serial Write and Read example program that ships with LabVIEW. By examining the block diagram of this program, you will be able to see the basic programming flow of serial communication in LabVIEW.
    I hope this information was helpful! Please let us know if there's anything else we can help with.
    john
    Applications Engineer

  • Can I use Airport Express to extend signal from my Airport Extreme and then run Ethernet from Express to my TV which requires ethernet to access internet?

    As stated in title. I want to access Netflix but my TV requires ethernet connection. I would like to use Express to repeat Exreme sigal and then to TV via Ethernet. I only have one access point in house for cable modem so I'm using Extreme to broadcast though house. Will need to be able to input network key for Extreme secure network. Thank you.
    Mike

    Are both your AirPort Extreme and AirPort Express 802.11"n" devices?
    If yes, you can configure the Express to "extend a wireless network" and it will  provide more wireless coverage and the Etherent port will be enabled so that you can connect an Ethernet device.
    This assumes that the Express is located where it can receive a strong signal from the AirPort Extreme.

  • Cannot seem to get a signal from my router with my Ipod touch. Lap top and desk top are working fine.

    I have been having trouble with my Ipod touch getting a signal from my 2wire router. This is an easy set up for lap top and desk top. Now I can't seem to get the internet with my ipod. I can get the a signal with my wife's ipod 3rd generation with no problems.  My old ipod i purchased in early 07. I can get a signal at the local McDonalds or Starbucks. Just not at home. Does anyone else have this problem? I ran the reset as prescribed by apple but have been unsuccessful.

    The problem is most likely with your router.  Follow the instructions in the router's manual to reset it.  Also what security are you using?  If it's WEP upgrade to WPA.  The iPod sometimes has trouble with WEP "protected" routers.  I put "protected" in quotation marks because WEP security is essentially useless.  It can be hacked in less that 30 seconds.

  • HT1454 Can I send audio and video signals from sling box on my IPhone to a tv using any of these cables?

    I have an iPhone 4 and would like to stream the sling box signal from my phone to a TV. Is there a cable that will do this?  I have heard that the only thing you can show on the TV from your phone is content stored on your phone.

    TV out on the iPhone 4 only display video out for the apps that support v'ideo out. The app description in the App store will say if it supports TV out. iPhone4S will mirror the iPhones screen with VGA or Digital AV adopter.

  • How to output the digital clock and synchronization signal from the NI USB-6211

    Hello,
    I need to connect the NI USB-6211 to control a digital to analog convertor chip (AD5541). However, this chip requires three input signals :1) Clock input, 2) Logic input or a synchronization signal  and 3) Signal Serial Data input (CS, SCLK, DIN).
    how to output the digital clock and the synchronization signal from the NI USB-6211?

    Hi SaberSaber,
    You should be able to use the counters to generate a pulse train that could be used for clock and synch purposes.  
    Hope this helps.  Let us know if you have more questions.  
    Dave C.
    Applications Engineer
    National Instruments

  • Is there any official market or store or anything in Egypt to fix my iphone 4 it jumped from 5th floor and the back hous was crashed and the network sensor was not working good but the phone and the screen and the others things are ok so plz help ???

    Is there any official market or store or anything in Egypt to fix my iphone 4 it jumped from 5th floor and the back hous was crashed and the network sensor was not working good but the phone and the screen and the others things are ok so plz help ???
    my iphone is now just coverd with case and the back house is crased

    Etisalat, Mobinil and Vodafone provide warranty service in your country.  You can also search Google for a 3rd party repair shop near you.

Maybe you are looking for

  • Recovering from a disk crash

    i experienced a hard disk failure on my MacBook Pro today. at first Safari started complaining it's unable to save bookmarks, then Mail gave errors about not being able to write data. i tried logging out and logging in again with the same account but

  • Why did IMovie 9 start crashing when trying to import from camcorder

    I have Imovie 8.0.6 and a Panasonic HDC-SD60 camcorder. I have been importing from this camera for a long time, with no problems but now, IMovie crashes whenever I push the import button. I checked and when nothing is connected, the internal camera c

  • ITunes not picking up on tags from AAC files ripped using Toast 9

    I am trying to rip CD's into AAC files using Toast 9. When I import them into iTunes, they have next to no tags - only artist, album, and song title. I don't know if the problem is with iTunes or Toast 9 at this point. Is there a way I can see all th

  • The Web Benefit Of P6 R8 For Primavera P6 V7.0

    Hi, I would point at the following think. The commitment of P6 R8 to web access has also boosted the interest of users on P6 Web, version 7. That is the good part. The most of the enhancement and change are about the web administration (including wor

  • Adobe Reader X Constantly Freezing up

    Ever since I started using version X, it constantly locks up at least 90% of the time while trying to open a .pdf.  Sometimes it takes 5 minutes for Adobe to quit, other times I have to reboot my computer just to get out of the frozen program.  HELP!