Difference between revisions of "Component: Thermistor (Sensors)"
(XML import) |
(XML import BR) |
||
(One intermediate revision by the same user not shown) | |||
Line 25: | Line 25: | ||
==Examples== | ==Examples== | ||
− | + | This example simply reads the value from the thermistor sensor component and outputs the value to an LCD as a temperature in degrees C. | |
− | + | {{Fcfile|EBM003 - Test Program.fcfx|EBM003 Example}} | |
==Downloadable macro reference== | ==Downloadable macro reference== |
Latest revision as of 15:45, 16 February 2017
Author | Matrix TSL |
Version | 1.1 (Release) |
Category | Sensors |
This inherits from Thermistor Template |
Contents
Thermistor component
A generic thermistor component that can be used to simulate and create code for any thermistor with a known temperature/resistance curve. Thermistor is connected in a simple potential divider circuit - thermistor between ADC input and 0V, and a fixed resistor between ADC and the positive supply. The component is also used with the EBM003 module, in which case the extra circuitry is already included. Default calibration is for the EBM003 module.
Examples
This example simply reads the value from the thermistor sensor component and outputs the value to an LCD as a temperature in degrees C. EBM003 Example
Downloadable macro reference
This component inherits downloadable macros from Thermistor Template
GetIntegerTemperature
Reads the ADC input and returns the calculated Temperature as Integer degrees C
This call is provided by Thermistor Template
Parameters
- This macro has no parameters
Return value
GetRealTemperature
Reads the ADC input and Returns the calculated Temperature as Float value in degrees C
This call is provided by Thermistor Template
Parameters
- This macro has no parameters
Return value
CalculateTemperature
Converts the input ADC value and returns the Temperature in tenths of degree C
This call is provided by Thermistor Template
Parameters
- UINT ADCValue
- ADC Reading to be converted
Return value
GetADCValue
Returns the Raw ADC value from the Analogue Channel
This call is provided by Thermistor Template
Parameters
- This macro has no parameters
Return value
Simulation macro reference
This component inherits simulation macros from Thermistor Template
SetChannel
Set the ADC Channel
This call is provided by Thermistor Template
Parameters
- INT ChannelID
Return value
- This call does not return a value
SetTemperature
Sends the given temperature to the display, and calculates the internal values used by the simulated read macros.
Parameters
- FLOAT Temperature
- Zero to one value - representing min-max of the sensor.
Return value
- This call does not return a value
SetMinMax
Set the minimum and maximum temperature values that can be shown and set on the thermometer readout.
Parameters
- FLOAT Min
- Minimum Value
- FLOAT Max
- Maximum Value
Return value
- This call does not return a value
Property reference
ADC Channel
This property is of type Single analog pin and can be referenced with the variable name CHANNEL.
The ADC channel to which the thermistor circuit is connected.
It is assumed that the thermistor is connected between the ADC pin and 0V, with a fixed resistor connected
between the ADC pin and +V.
ADC Bit Resolution
This property is of type Unsigned integer and can be referenced with the variable name ADC_BITS.
No additional information
Resistor Value
This property is of type Unsigned integer and can be referenced with the variable name RESISTOR.
Value in Ohms of the pullup series resistor. i.e. The resistor is connected between the ADC pin and the
positive supply rail.
-25C Thermistor Value
This property is of type Unsigned integer and can be referenced with the variable name M25.
Value in Ohms of the Thermistor at -25 deg C
0C Thermistor Value
This property is of type Unsigned integer and can be referenced with the variable name P0.
Value in Ohms of the Thermistor at 0 deg C
25C Thermistor Value
This property is of type Unsigned integer and can be referenced with the variable name P25.
Value in Ohms of the Thermistor at 25 deg C
50C Thermistor Value
This property is of type Unsigned integer and can be referenced with the variable name P50.
Value in Ohms of the Thermistor at 50 deg C
75C Thermistor Value
This property is of type Unsigned integer and can be referenced with the variable name P75.
Value in Ohms of the Thermistor at 75 deg C
100C Thermistor Value
This property is of type Unsigned integer and can be referenced with the variable name P100.
Value in Ohms of the Thermistor at 100 deg C
125C Thermistor Value
This property is of type Unsigned integer and can be referenced with the variable name P125.
Value in Ohms of the Thermistor at 125 deg C
Label
This property is of type Line of text and can be referenced with the variable name label.
A text label to help you identify the component on the panel.
Min. Temp.
This property is of type Floating point and can be referenced with the variable name min_temp.
Minimum termperature that can be set or displayed on the thermometer slider.
Max. Temp.
This property is of type Floating point and can be referenced with the variable name max_temp.
Maximum termperature that can be set or displayed on the thermometer slider.
Scale divisions
This property is of type Unsigned integer and can be referenced with the variable name scale_divisions.
Number of numbered divisions shown on the thermometer scale.