03-20-2019 10:51 AM
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
03-20-2019 11:23 AM
This would be fairly easy with another NI DAQ hardware that provides two full featured counters, cf. this example:
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