Difference between revisions of "Component: Thermistor (Environmental)"
From Flowcode Help
Jump to navigationJump to searchLine 5: | Line 5: | ||
|- | |- | ||
| width="20%" style="color:gray;" | Version | | width="20%" style="color:gray;" | Version | ||
− | | | + | | 2.0 |
|- | |- | ||
| width="20%" style="color:gray;" | Category | | width="20%" style="color:gray;" | Category | ||
Line 15: | Line 15: | ||
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. | 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== | ==Detailed description== | ||
Line 144: | Line 144: | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===SetADCValue=== | ||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetADCValue''' | ||
+ | |- | ||
+ | | colspan="2" | Used to set the ADC value when an external ADC is being used. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | AdcValue | ||
+ | |- | ||
+ | | colspan="2" | Value of the external ADC. e.g. 0-255 for an 8-bit ADC | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 221: | Line 240: | ||
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | ADC Properties | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | ADC Properties | ||
|- | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | ADC Configuration | ||
+ | |- | ||
+ | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-6-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-6-icon.png]] | ||
| width="90%" | ADC Channel | | width="90%" | ADC Channel | ||
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Analogue Input Channel - Which pin is the analogue input connected to? |
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
Line 231: | Line 255: | ||
|- | |- | ||
| colspan="2" | 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. | | colspan="2" | 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. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
Line 320: | Line 339: | ||
| colspan="2" | Number of numbered divisions shown on the thermometer scale. | | colspan="2" | Number of numbered divisions shown on the thermometer scale. | ||
|} | |} | ||
+ | |||
+ | ==Component Source Code== | ||
+ | |||
+ | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Thermistor.fcfx FC_Comp_Source_Thermistor.fcfx] | ||
+ | |||
+ | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Thermistor.fcfx FC_Comp_Source_Thermistor.fcfx] |
Latest revision as of 14:41, 19 July 2024
Author | Matrix TSL |
Version | 2.0 |
Category | Environmental |
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. 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 | |
![]() |
ADCValue |
ADC Reading to be converted | |
![]() |
Return |
GetADCValue
![]() |
GetADCValue |
Returns the Raw ADC value from the Analogue Channel | |
![]() |
Return |
GetIntegerTemperature
![]() |
GetIntegerTemperature |
Reads the ADC input and returns the calculated Temperature as Integer degrees C | |
![]() |
Return |
GetRealTemperature
![]() |
GetRealTemperature |
Reads the ADC input and Returns the calculated Temperature as Float value in degrees C | |
![]() |
Return |
SetADCValue
![]() |
SetADCValue |
Used to set the ADC value when an external ADC is being used. | |
![]() |
AdcValue |
Value of the external ADC. e.g. 0-255 for an 8-bit ADC | |
![]() |
Return |
SetChannel
![]() |
SetChannel |
Set the ADC Channel | |
![]() |
ChannelID |
![]() |
Return |
SetMinMax
![]() |
SetMinMax |
Set the minimum and maximum temperature values that can be shown and set on the thermometer readout. | |
![]() |
Min |
Minimum Value | |
![]() |
Max |
Maximum Value | |
![]() |
Return |
SetTemperature
Property reference
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