LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing SRF04 range finder with LABview

Hi all,
 
I have a project to use the SRF04 ultrasonic range finder to measure the height of the person, I already interface it to the computer with using the labview but the problem is that the readings are strange and I can not calculate the distance
can anybody help?
 
 
Thanks,
0 Kudos
Message 1 of 8
(4,566 Views)

Take a look at this, it might help you:  http://www.acroname.com/robotics/parts/R93-SRF04p.pdf

Explain more aout how you are interfacing to your computer and making your measurements. 

Also try posting the value(s) you are reading along with the value(s) you are expecting.  SS



0 Kudos
Message 2 of 8
(4,548 Views)

THank you

but this is an interface to BS2 microcontroller, I want to interface it to the computer

I used the NI- DAQ , the readings that I get is like 2.453, 2.654 and so on . I mean small values.

what I expected and what I should get is the time in micoseconds, something like 462, 645 and so on

as you can see what the sensor gives is not a time of the echo, and this my problem

0 Kudos
Message 3 of 8
(4,546 Views)
Can you give more details about what NI hardware you are using and how exactly you have the SRF04 connected to the hardware? I found the product page for the SRF04 and it seems that you need to supply a 10uS pulse to the trigger input and you can measure the pulse width of the echo output to get the distance. Please see the link below for more details. You can measure pulse width using a counter input on the NI hardware. There are also LabVIEW examples on measuring pulse width. In LabVIEW, goto Help » Find Examples. Next, click the Hardware Input and Output » DAQmx » Counter Measurements » Period or Pulse Width.

SRF04 - Ultra-Sonic Ranger Technical Specification
http://www.robot-electronics.co.uk/htm/srf04tech.htm
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 4 of 8
(4,521 Views)

Dear Sir/Madam

 

At my University "Institucion Universitaria Politecnico Grancolombiano" we´ve got a DAQ Multifunction NI USB-6009 and Labview, is there any way we can connect the NI USB-6009 to the SRF04 - Ultra-Sonic Ranger?

 

Your prompt response will be highly appreciated

 

Thank you in advance

 

Kind Regards

 

Diego Alejandro Rodriguez

0 Kudos
Message 5 of 8
(3,519 Views)

Hi Diego,

I'm looking at these specs: http://www.acroname.com/robotics/parts/R93-SRF04.html and it seems like you need at least 30mA of current, I don't think the USB-6009 could source that much reliably, I think it can only go up to 5 mA. Therefore, you might need an external power source or an amplifier of some kind.

 

Regards,

Basil

NI-AE

0 Kudos
Message 6 of 8
(3,509 Views)

Dear Basil,

 

I’m struggling to get this sensor connected to the NI USB- 6009 DAQ. this is the only DAQ that we manage at the University that therefore i don´t have choise. I´ve purchase an externa supplier that can provide me the 30mA, however i´m not able to adquire the Data from the DAQ, is there any clue or documention  that you can provide me to make this work.

 

I´ve been followed a couple of examples but they use a different DAQ

 

Download All
0 Kudos
Message 7 of 8
(3,431 Views)

Hi diego0206,

 

The counter on the NI USB-6009 cannot be used to measure pulse width.  It can only be used to count events.  Below is an article that mentions this.

 

Can I Use Pulse Generation with the Counters on the USB-6008/6009?

http://digital.ni.com/public.nsf/allkb/1B4905F3DFF9CFF986256FF5006C18C2?OpenDocument

 

The user manual for this devices also only describes using the onboard counter as an event counter and does not describe using it as you are trying to.

 

USER GUIDE AND SPECIFICATIONS
NI USB-6008/6009

http://www.ni.com/pdf/manuals/371303m.pdf

 

Josh B
Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(3,378 Views)