Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Sharp 2Y0A21 IR sensor to input data into a labview program using mydaq

Solved!
Go to solution

Hi,

I am working on a LabVIEW project. For a part of it (creating a subVI) I want to make use of an IR sensor (SHARP 2Y0A21), in order to measure the proximity of my hand from the sensor. I also have the myDAQ to aid me with the sensor inputs. I want to make a program that lights up an LED boolean when my hand goes out of the sensor's range. Please guide me as to what should i do in order to get it working. A few steps on how to make my program will be highly appreciated!

 

Thanks,

 

Ksquared.

0 Kudos
Message 1 of 3
(9,796 Views)
Solution
Accepted by ksquared

Hi KSquared,

 

This DeveloperZone article, Measuring Distance with myDAQ and Sharp Infrared Proximity Sensor should help you get started. Although the sensor model used in this article is different, the specifications appear to be very similar from a quick glance at the datasheet. If you follow this article, you should be able to acquire the voltage output from the sensor, filter it and convert the voltage to a distance. From here, the rest of your program should be fairly simple to complete. Feel free to post any further questions you may have regarding the article or your application. Hope you find the article helpful!

0 Kudos
Message 2 of 3
(9,787 Views)

Thank you very much! 

0 Kudos
Message 3 of 3
(9,782 Views)