1146 User Guide: Difference between revisions
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOINDEX__ | |||
<metadesc>The IR Reflective Sensor measures the distance of an opaque object up to 4mm away using IR light. Connects to an Analog Input or VINT Hub port.</metadesc> | <metadesc>The IR Reflective Sensor measures the distance of an opaque object up to 4mm away using IR light. Connects to an Analog Input or VINT Hub port.</metadesc> | ||
[[Category:UserGuide]] | [[Category:UserGuide]] | ||
Line 14: | Line 15: | ||
==Using the 1146== | ==Using the 1146== | ||
{{UGcontrolpanelSensor|1146| | {{UGcontrolpanelSensor|1146|HUB0000}} | ||
{{UGSensorVoltageRatioInput|1146|distance (mm)}} | {{UGSensorVoltageRatioInput|1146|distance (mm)}} | ||
Line 24: | Line 25: | ||
The 1146 voltage changes from 4.5V to 0.15V as the object is moving closer to the sensor from a distance of 4mm. When the object is more than 4mm away, you may notice some change in voltage as the object enters or leaves the sensor's field of view, but this value does not represent the actual distance to the object. The exact equation for the sensor is as follows: | The 1146 voltage changes from 4.5V to 0.15V as the object is moving closer to the sensor from a distance of 4mm. When the object is more than 4mm away, you may notice some change in voltage as the object enters or leaves the sensor's field of view, but this value does not represent the actual distance to the object. The exact equation for the sensor is as follows: | ||
===Formulas=== | ===Formulas=== | ||
{{UGSensorFormula|distance (mm)}} The Formula to translate voltage into distance is: | {{UGSensorFormula|distance (mm)}} The Formula to translate voltage ratio into distance is: | ||
:<math> | :<math> | ||
\text{Distance (mm)}= 1.3927e^{(\text{ | \text{Distance (mm)}= 1.3927e^{(\text{VoltageRatio} \times 1.967)} | ||
</math> | </math> | ||
Latest revision as of 17:04, 13 December 2018
Getting Started
Welcome to the 1146 user guide! In order to get started, make sure you have the following hardware on hand:
- 1146 - IR Reflective Sensor 1-4mm
- Any Phidget with a Voltage Ratio Input port, here are some compatible products. We will be using the VINT Hub for this guide.
- USB cable and computer
- Phidget cable
Next, you will need to connect the pieces:
- Connect the 1146 to the HUB1000 with the Phidget cable.
- Connect the HUB1000 to your computer with the USB cable.
Now that you have everything together, let's start using the 1146!
Using the 1146
Phidget Control Panel
In order to demonstrate the functionality of the 1146, we will connect it to the HUB0000, and then run an example using the Phidget Control Panel on a Windows machine.
The Phidget Control Panel is available for use on both macOS and Windows machines. If you would like to follow along, first take a look at the getting started guide for your operating system:
Linux users can follow the getting started with Linux guide and continue reading here for more information about the 1146.
First Look
After plugging in the 1146 into the HUB0000, and the HUB0000 into your computer, open the Phidget Control Panel. You will see something like this:
The Phidget Control Panel will list all connected Phidgets and associated objects, as well as the following information:
- Serial number: allows you to differentiate between similar Phidgets.
- Channel: allows you to differentiate between similar objects on a Phidget.
- Version number: corresponds to the firmware version your Phidget is running. If your Phidget is listed in red, your firmware is out of date. Update the firmware by double-clicking the entry.
The Phidget Control Panel can also be used to test your device. Double-clicking on an object will open an example.
Voltage Ratio Input
Double-click on a Voltage Ratio Input object in order to run the example:
General information about the selected object will be displayed at the top of the window. You can also experiment with the following functionality:
- Modify the change trigger and/or data interval value by dragging the sliders. For more information on these settings, see the data interval/change trigger page.
- Select the 1146 from the Sensor Type drop-down menu. The example will now convert the voltage into distance (mm) automatically. Converting the voltage to distance (mm) is not specific to this example, it is handled by the Phidget libraries, with functions you have access to when you begin developing!
Technical Details
General
The 1146 can detect the distance of an object from 1mm to 4mm away. Objects with smooth, opaque surfaces are typically easier to detect.
The 1146 voltage changes from 4.5V to 0.15V as the object is moving closer to the sensor from a distance of 4mm. When the object is more than 4mm away, you may notice some change in voltage as the object enters or leaves the sensor's field of view, but this value does not represent the actual distance to the object. The exact equation for the sensor is as follows:
Formulas
The Phidget libraries can automatically convert sensor voltage into distance (mm) by selecting the appropriate SensorType
. See the Phidget22 API for more details. The Formula to translate voltage ratio into distance is:
Because this sensor uses infrared light, it works just as well in both dim and well lit areas.
Phidget Cable
The Phidget Cable is a 3-pin, 0.100 inch pitch locking connector. Pictured here is a plug with the connections labelled. The connectors are commonly available - refer to the Analog Input Primer for manufacturer part numbers.
What to do Next
- Programming Languages - Find your preferred programming language here and learn how to write your own code with Phidgets!
- Phidget Programming Basics - Once you have set up Phidgets to work with your programming environment, we recommend you read our page on to learn the fundamentals of programming with Phidgets.