LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Speed measurement of a projectile using 2 IR sensors

Solved!
Go to solution

Hi everyone.

 

I want to calculate speed of a projectile using two IR sensors. I want to calculate time interval between rising edge of two signals from LabView 10.0. I have tried pulse width measurement, elapse time options but I am unable to calculate time interval between start of two signals. I would be thankful if anyone can provide some guidance regarding this.

0 Kudos
Message 1 of 8
(2,654 Views)
Solution
Accepted by topic author Uniyalpiyush

What DAQ device are you using?

 

The best approach (if you have a DAQ device to support it) would use a counter configured for "two edge separation measurement".  The devices which support it (including M-series, X-series, 66xx counter/timers, certain cDAQ module/chassis combos) would give you very good timing resolution for your measurements (12.5 or 10 nanosec resolution for desktop boards, some cDAQs might be more limited -- I just don't know).

 

A not-nearly-as-good alternative is to sample with AI and post-process to find edges.  You'll likely lose somewhere between 2 and 3 orders of magnitude in your resolution though.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 8
(2,631 Views)

Thank you Kevin for your response. I am using card Pxie 6124. I am acquiring analog input data.

 

 

0 Kudos
Message 3 of 8
(2,628 Views)

Looking up your board specs, I see that it has counters which support "two edge separation measurement".  The 80 MHz onboard clock allows you to get timing resolution as fine as 12.5 nanosec.

 

Over on the analog side, if you *must*, your best timing resolution will be 0.25 microsec, assuming a clean signal and excellent post-processing.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 4 of 8
(2,607 Views)

Thank you Kevin once again. I have gone through documentation of " two edge separation measurement". For this measurement, I have to connect IR sensor outputs to PFI pinouts. (I am using TB-2706, 68-pin terminal block).

 

Since IR sensor have 3 wires (+V, -V/common, PNP/NPN). The output (PNP) from sensor I am connecting to PFI (pin-9 for my DAQ) and +Ve to external +24V power supply. The -V/Common should I connect to DGND? In the same way do I have to connect output from 2nd sensor to PFI(pin-10)?

 

I would be thankful if you can guide regarding the connections.

0 Kudos
Message 5 of 8
(2,591 Views)

Thanks Kevin, Now I am able to do it.

Thanks alot for help.

0 Kudos
Message 6 of 8
(2,585 Views)

It isn't clear if you've already dealt with the issue of digital voltage levels.

 

Your board is designed for for 5V digital.    I don't know what you're using as an IR sensor, but the fact it uses a 24V supply is a little cause for concern that it might use 24V logic.  On the other hand, you refer to the output signal as "PNP/NPN".  That sounds like it might be an open collector arrangement where you can connect to a 5V logic supply (perhaps on your DAQ breakout board) through a pull-up or pull-down resistor.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 7 of 8
(2,551 Views)

Yes, Kevin, my issue is resolved. Now I am able to measure the speed using two edge separation method.

 

Since my DAQ device can provide +5V of voltage but and the IR sensor requires 10-24V of supply that's why I was providing it externally. I am not sure how to use pull up and pull down resistors for this purpose. 

0 Kudos
Message 8 of 8
(2,545 Views)