1102 User Guide 3
away; it cannot see any objects outside that range.
The 1102 is not a digital sensor. The returned value is inversely proportional to the amount of reflectivity of the
object (0 being more reflective, and 400 being less reflective), but in practice the variation between sensors is broad
enough that the 1102 should not be used to measure the reflectivity of an object - only to detect if the object exists.
You may have trouble using this sensor through a pane of glass, since the IR light can easily reflect off of the surface
of the glass.
When working with sensors that are not digital, it is helpful to filter out noise by implementing a simple hysteresis in
your code. By interpreting any SensorValue < 400 as a detection, and not releasing the detection until SensorValue
goes above some higher threshold, such as 500, multiple triggering can often be avoided.
Finally, the 1102 works best in a constrained environment, where objects can be mechanically guaranteed to be
within the 3-7mm range, or not present at all.
Other Interfacing Alternatives
If you want maximum accuracy, you can use the RawSensorValue property from the PhidgetInterfaceKit. To adjust
a formula, substitute (SensorValue) with (RawSensorValue / 4.095) If the sensor is being interfaced to your own
Analog to Digital Converter and not a Phidget device, our formulas can be modified by replacing (SensorValue) with
(Vin * 200). It is important to consider the voltage reference and input voltage range of your ADC for full accuracy
and range.
Each Analog Input uses 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.
API
Phidget analog sensors do not have their own API- they simply output a voltage that is converted to a digital value
and accessed through the "Sensor" properties and events on the PhidgetInterfaceKit API. It is not possible to
programmatically identify which sensor is attached to the Analog Input. To an InterfaceKit, every sensor looks the
same. Your application will need to apply formulas from this manual to the SensorValue (an integer that ranges
from 0 to 1000) to convert it into the units of the quantity being measured. For example, this is how you would use a
temperature sensor in a C# program:
// set up the interfacekit object
InterfaceKit IFK = new InterfaceKit();
// link the new interfacekit object to the connected board
IFK.open("localhost", 5001);
// Get sensorvalue from analog input zero
int sensorvalue = IFK.sensors[0].Value;
// Convert sensorvalue into temperature in degrees Celsius
double roomtemp = Math.Round(((sensorvalue * 0.22222) - 61.11), 1);
See the PhidgetInterfaceKit User Guide for more information on the API and a description of our architecture.