Jump to content

Component: Thermistor (Environmental): Difference between revisions

From Flowcode Help
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable""
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(4 intermediate revisions by the same user not shown)
Line 90: Line 90:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CalculateTemperature'''
| width="90%" class="mtx-class-macrohead" | '''CalculateTemperature'''
|-
|-
| colspan="2" | Converts the input ADC value and returns the Temperature in tenths of degree C 
| colspan="2" | Converts the input ADC value and returns the Temperature in tenths of degree C 
Line 109: Line 109:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetADCValue'''
| width="90%" class="mtx-class-macrohead" | '''GetADCValue'''
|-
|-
| colspan="2" | Returns the Raw ADC value from the Analogue Channel 
| colspan="2" | Returns the Raw ADC value from the Analogue Channel 
Line 123: Line 123:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetIntegerTemperature'''
| width="90%" class="mtx-class-macrohead" | '''GetIntegerTemperature'''
|-
|-
| colspan="2" | Reads the ADC input and returns the calculated Temperature as Integer degrees C 
| colspan="2" | Reads the ADC input and returns the calculated Temperature as Integer degrees C 
Line 137: Line 137:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRealTemperature'''
| width="90%" class="mtx-class-macrohead" | '''GetRealTemperature'''
|-
|-
| colspan="2" | Reads the ADC input and Returns the calculated Temperature as Float value in degrees C 
| colspan="2" | Reads the ADC input and Returns the calculated Temperature as Float value in degrees C 
Line 151: Line 151:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetADCValue'''
| width="90%" class="mtx-class-macrohead" | '''SetADCValue'''
|-
|-
| colspan="2" | Used to set the ADC value when an external ADC is being used. 
| colspan="2" | Used to set the ADC value when an external ADC is being used. 
Line 170: Line 170:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetChannel'''
| width="90%" class="mtx-class-macrohead" | '''SetChannel'''
|-
|-
| colspan="2" | Set the ADC Channel 
| colspan="2" | Set the ADC Channel 
Line 189: Line 189:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMinMax'''
| width="90%" class="mtx-class-macrohead" | '''SetMinMax'''
|-
|-
| colspan="2" | Set the minimum and maximum temperature values that can be shown and set on the thermometer readout. 
| colspan="2" | Set the minimum and maximum temperature values that can be shown and set on the thermometer readout. 
Line 213: Line 213:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTemperature'''
| width="90%" class="mtx-class-macrohead" | '''SetTemperature'''
|-
|-
| colspan="2" | Sends the given temperature to the display, and calculates the internal values used by the simulated read macros. 
| colspan="2" | Sends the given temperature to the display, and calculates the internal values used by the simulated read macros. 
Line 233: Line 233:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | ADC Properties
| width="90%" class="mtx-class-propfolder" | ADC Properties
|-
|-
|-
|-
Line 266: Line 266:
| colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. 
| colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Thermistor Properties
| width="90%" class="mtx-class-propfolder" | Thermistor Properties
|-
|-
|-
|-
Line 315: Line 315:
| colspan="2" | Value in Ohms of the Thermistor at 125 deg C 
| colspan="2" | Value in Ohms of the Thermistor at 125 deg C 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author Matrix TSL
Version 2.0
Category Environmental


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. Default calibration is for the EBM003 module.

Version information

Library Version, Component Version, Date, Author, Info
9, 2.0, 19-07-24, BR, Added compatibility for external ADC
9, 2.0, 19-07-24, BR, Allowed full bit depth usage of the internal ADC

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

CalculateTemperature

CalculateTemperature
Converts the input ADC value and returns the Temperature in tenths of degree C 
- UINT ADCValue
ADC Reading to be converted 
- INT Return


GetADCValue

GetADCValue
Returns the Raw ADC value from the Analogue Channel 
- UINT Return


GetIntegerTemperature

GetIntegerTemperature
Reads the ADC input and returns the calculated Temperature as Integer degrees C 
- INT Return


GetRealTemperature

GetRealTemperature
Reads the ADC input and Returns the calculated Temperature as Float value in degrees C 
- FLOAT Return


SetADCValue

SetADCValue
Used to set the ADC value when an external ADC is being used. 
- UINT AdcValue
Value of the external ADC. e.g. 0-255 for an 8-bit ADC 
- VOID Return


SetChannel

SetChannel
Set the ADC Channel 
- INT ChannelID
 
- VOID Return


SetMinMax

SetMinMax
Set the minimum and maximum temperature values that can be shown and set on the thermometer readout. 
- FLOAT Min
Minimum Value 
- FLOAT Max
Maximum Value 
- VOID Return


SetTemperature

SetTemperature
Sends the given temperature to the display, and calculates the internal values used by the simulated read macros. 
- FLOAT Temperature
Zero to one value - representing min-max of the sensor. 
- VOID Return


Property reference

Properties
ADC Properties
ADC Configuration
 
ADC Channel
Analogue Input Channel - Which pin is the analogue input connected to? 
VRef option
Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage. 
Conversion speed
Clock setting to select how fast the ADC peripheral will perform an ADC conversion. The FRC setting is based on a RC time base and so will vary with temperature and pressure. Other settings are generally based on divisions of the master clock. 
Acquisition cycles
Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. 
Thermistor Properties
Wiring
Specifies the arrangement of the Thermistor and Fixed Resistor. Pull Down - Thermistor connected between ADC pin and GND, fixed resistor between ADC pin and VCC. Pull Up - Thermistor connected between ADC pin and VCC, fixed resistor between ADC pin and GND. 
Resistor Value
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
Value in Ohms of the Thermistor at -25 deg C 
0C Thermistor Value
Value in Ohms of the Thermistor at 0 deg C 
25C Thermistor Value
Value in Ohms of the Thermistor at 25 deg C 
50C Thermistor Value
Value in Ohms of the Thermistor at 50 deg C 
75C Thermistor Value
Value in Ohms of the Thermistor at 75 deg C 
100C Thermistor Value
Value in Ohms of the Thermistor at 100 deg C 
125C Thermistor Value
Value in Ohms of the Thermistor at 125 deg C 
Simulation
Label
A text label to help you identify the component on the panel. 
Min. Temp.
Minimum termperature that can be set or displayed on the thermometer slider. 
Max. Temp.
Maximum termperature that can be set or displayed on the thermometer slider. 
Scale divisions
Number of numbered divisions shown on the thermometer scale. 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_Thermistor.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_Thermistor.fcfx