LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting HC-SR04 to NI USB 6001 and LabVIEW

Hi, I am new to using LabVIEW and hardware in general. I need to connect a HC-SR04 to a NI USB 6001, I've connected the ultrasonic sensor to a breadboard but I am not sure where the remaining four wires would go to in terms of the NI USB 6001, if someone can help me out how to wire it because online the only resources I can find are related to an arduino board which is not possible for me. 

Additionally I am trying to figure out the LabVIEW programming in which the sensor can send a pulse and get it back, I want to create a case structure (?) where when it reaches a certain proximity it will send a signal to initiate another command to another component, what would be the best way to go about this?
Thank you

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

This would be fairly easy with another NI DAQ hardware that provides two full featured counters, cf. this example:

https://forums.ni.com/t5/Example-Programs/LabVIEW-amp-DAQ-Ultrasonic-Distance-Measurement-with-HC-SR...

 

But a USB 6001 is not the best choice.

It has only one counter - and that counter cannot measure a puls width.

 

So the trigger line has to be done with software timing, and the response has to be measured on an analogue input line.

Have a look at this vi over at the german LabVIEWforum, it should be a starting point:

https://www.labviewforum.de/Thread-Ultraschallsensor-SRF-05-Ansteuerung?pid=131454#pid131454

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 2 of 2
(3,260 Views)