Analog Input Guide: Difference between revisions
(Created page with "Category:Primer Analogs Inputs are used to interface many different types of sensors, such as temperature, humidity, position, or pressure sensors. Each Analog Input pro...") |
|||
(32 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category: | {{#seo:|description=Analog sensors generally output a voltage between 0 and 5 Volts DC. This guide will get you up to speed on how to use this type of sensor in your next project.}} | ||
{{#seo:|keywords=voltage input, voltage ratio input}} | |||
[[Category:IntroGuide]] | |||
==Introduction== | |||
It is common for a sensor to output a voltage in order to relay information about what it is measuring. For example, the 1124 temperature sensor has the following characteristics: | |||
[[File:Analoginput_tempsensor.jpg|link=|right|500px|The 1124]] | |||
{|class="wikitable" style="text-align: center; margin:auto;" | |||
|style="background:#f0f0f0;"|'''Measured Temperature (°C)''' | |||
|style="background:#f0f0f0;"|'''Output Voltage (V)''' | |||
[[ | |||
{| | |||
|style="background: #f0f0f0" | |||
|style="background: #f0f0f0" | |||
|- | |- | ||
| | | -50||0.25 | ||
| | |||
|- | |- | ||
| | |0||1.37 | ||
| | |||
|- | |- | ||
| | |150||4.75 | ||
| | |||
|- | |- | ||
|} | |} | ||
<br clear="all"> | |||
This means that if you want to know what the temperature is (or pressure, humidity, position, etc.), you will need to measure the sensor's output voltage. In order to do this, you can use any of our {{CT|HasAI|Phidgets with an analog input}}. Each Phidget with an analog input interfaces with sensors using three wires (as shown in the image above): | |||
*Power (+5 VDC) - provides the sensor with power. | |||
*Ground | |||
*Data - The sensor manipulates the voltage on this line. The Phidget measures and reports this voltage. | |||
For information about different types of analog inputs, as well as the software objects that are used with analog inputs, visit the [[Phidgets Connectors]] page. Next, we will take a look at the connector that is commonly used for our sensors. | |||
==Connector== | |||
{{AnalogConnector}} | |||
==Electrical Specifications== | ==Electrical Specifications== | ||
Line 57: | Line 34: | ||
[[Image:analoginputcircuit.jpg|right|thumb|300px|link=|Schematic for a Phidgets analog input.]] | [[Image:analoginputcircuit.jpg|right|thumb|300px|link=|Schematic for a Phidgets analog input.]] | ||
The maximum total current consumed by all | The maximum total current consumed by all analog inputs should be limited to 400mA. | ||
The | The voltage measurement is represented in the software through the Voltage property as a value between 0 and 5 volts. | ||
5V corresponds to a high sensor value, and 0V corresponds to zero sensor activity. | 5V corresponds to a high sensor value, and 0V corresponds to zero sensor activity. | ||
The analog inputs on Phidgets | The analog inputs on Phidgets InterfaceKits are designed for a maximum of 5V. More than this will cause unpredictable behaviour and could damage the board. | ||
<br clear=all> | <br clear=all> | ||
== | ==Interfacing 3.3V Sensors== | ||
[[File:33vregulator.jpg|thumb|200px|link=|Interfacing a 3.3V Sensor using a voltage regulator.<br/>[[Media:33vregulator.jpg|Full-sized Image]]]] | |||
[[File:33vsensor.jpg|thumb|200px|link=|Interfacing a 3.3V Sensor using a 3.3V power supply.<br/>[[Media:33vsensor.jpg|Full-sized Image]]]] | |||
When using a 3.3V sensor with the analog input of a Phidget InterfaceKit, the main challenge is generating the 3.3V supply. You can either buy a 3.3V power supply, or you can buy a voltage regulator to convert the 5V line on the analog input to a 3.3V line, as illustrated in the diagrams. You can also use a second analog input to monitor the output of the 3.3V supply on the regulator. | |||
<br clear=all> | |||
==Factors that can affect Accuracy== | ==Factors that can affect Accuracy== | ||
*'''High Output Impedance''' - Sensors that have a high output impedance will be distorted by the | *'''High Output Impedance''' - Sensors that have a high output impedance will be distorted by the input impedance of the analog input. | ||
If your output impedance is high, it is possible to correct for this distortion to some extent in your software application. | If your output impedance is high, it is possible to correct for this distortion to some extent in your software application. | ||
*''' | *'''Voltage Drop''' - Phidget cables have some resistance, which can cause voltage to drop across particularly long lengths of cable. For ratiometric sensors in particular, this can affect accuracy. Long cables also potentially expose the line to a greater amount of interference from surrounding electronics. | ||
*'''Intrinsic Error In Sensors''' - For many sensors, the error is quite predictable | *'''Intrinsic Error In Sensors''' - For many sensors, the error is quite predictable by testing it alongside a more accurate sensor, and can be calibrated out in software. | ||
*''' | *'''Voltage Reference''' - Voltage Reference error. The 5.0VDC voltage reference is accurate to 0.5%. | ||
This can be a significant source of error in some applications, but can be easily measured and compensated for. | This can be a significant source of error in some applications, but can be easily measured and compensated for. | ||
<br clear="all"> | <br clear="all"> | ||
Latest revision as of 21:17, 11 July 2023
Introduction
It is common for a sensor to output a voltage in order to relay information about what it is measuring. For example, the 1124 temperature sensor has the following characteristics:
Measured Temperature (°C) | Output Voltage (V) |
-50 | 0.25 |
0 | 1.37 |
150 | 4.75 |
This means that if you want to know what the temperature is (or pressure, humidity, position, etc.), you will need to measure the sensor's output voltage. In order to do this, you can use any of our Phidgets with an analog input. Each Phidget with an analog input interfaces with sensors using three wires (as shown in the image above):
- Power (+5 VDC) - provides the sensor with power.
- Ground
- Data - The sensor manipulates the voltage on this line. The Phidget measures and reports this voltage.
For information about different types of analog inputs, as well as the software objects that are used with analog inputs, visit the Phidgets Connectors page. Next, we will take a look at the connector that is commonly used for our sensors.
Connector
Each analog input uses a 3-pin, 0.100 inch pitch locking connector. Pictured here is a plug with the connections labeled.
The Phidget cables that are designed to plug into these inputs can be found here.
The connectors and pins they use are also commonly available (usually through digikey) - refer to the table below for manufacturer part numbers.
Manufacturer | Part Number | Description |
Molex | 50-57-9403 | 3 Position Cable Connector |
Molex | 16-02-0102 | Wire Crimp Insert for Cable Connector |
Molex | 70543-0002 | 3 Position Vertical PCB Connector |
Molex | 70553-0002 | 3 Position Right-Angle PCB Connector (Gold) |
Molex | 70553-0037 | 3 Position Right-Angle PCB Connector (Tin) |
Molex | 15-91-2035 | 3 Position Right-Angle PCB Connector - Surface Mount |
Electrical Specifications
The maximum total current consumed by all analog inputs should be limited to 400mA. The voltage measurement is represented in the software through the Voltage property as a value between 0 and 5 volts. 5V corresponds to a high sensor value, and 0V corresponds to zero sensor activity.
The analog inputs on Phidgets InterfaceKits are designed for a maximum of 5V. More than this will cause unpredictable behaviour and could damage the board.
Interfacing 3.3V Sensors
When using a 3.3V sensor with the analog input of a Phidget InterfaceKit, the main challenge is generating the 3.3V supply. You can either buy a 3.3V power supply, or you can buy a voltage regulator to convert the 5V line on the analog input to a 3.3V line, as illustrated in the diagrams. You can also use a second analog input to monitor the output of the 3.3V supply on the regulator.
Factors that can affect Accuracy
- High Output Impedance - Sensors that have a high output impedance will be distorted by the input impedance of the analog input.
If your output impedance is high, it is possible to correct for this distortion to some extent in your software application.
- Voltage Drop - Phidget cables have some resistance, which can cause voltage to drop across particularly long lengths of cable. For ratiometric sensors in particular, this can affect accuracy. Long cables also potentially expose the line to a greater amount of interference from surrounding electronics.
- Intrinsic Error In Sensors - For many sensors, the error is quite predictable by testing it alongside a more accurate sensor, and can be calibrated out in software.
- Voltage Reference - Voltage Reference error. The 5.0VDC voltage reference is accurate to 0.5%.
This can be a significant source of error in some applications, but can be easily measured and compensated for.