Component: Analogue Temp Sensors (Environmental): Difference between revisions
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (8 intermediate revisions by 3 users not shown) | |||
| Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Analogue_Temperature_Sensors.fcfx FC_Comp_Source_Analogue_Temperature_Sensors.fcfx] | ||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Analogue_Temperature_Sensors.fcfx FC_Comp_Source_Analogue_Temperature_Sensors.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
| Line 53: | Line 53: | ||
| Line 63: | Line 60: | ||
Example Program showing how to show the temperature in Celsius and Fahrenheit and expected ADC pin voltage on an LCD. | |||
{{Fcfile|Analogue_Sensors_Example.fcfx|Analogue Sensors Example}} | |||
==Macro reference== | ==Macro reference== | ||
===GetTempFloatC=== | ===GetTempFloatC=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetTempFloatC''' | ||
|- | |- | ||
| colspan="2" | Value of the temperature in deg C 999.9 = temperature outside of sensor range | | colspan="2" | Value of the temperature in deg C 999.9 = temperature outside of sensor range | ||
| Line 82: | Line 81: | ||
===GetTempFloatF=== | ===GetTempFloatF=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetTempFloatF''' | ||
|- | |- | ||
| colspan="2" | Value of the temperature in deg F 999,9 = temperature outside of sensor range | | colspan="2" | Value of the temperature in deg F 999,9 = temperature outside of sensor range | ||
| Line 96: | Line 95: | ||
===GetTempIntCX10=== | ===GetTempIntCX10=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetTempIntCX10''' | ||
|- | |- | ||
| colspan="2" | Value of integer temperature in deg C x10 E.g 22.5C will give the result of 225 This allows more contol if using integers to save memory 9999 = temperature outside of sensor range | | colspan="2" | Value of integer temperature in deg C x10 E.g 22.5C will give the result of 225 This allows more contol if using integers to save memory 9999 = temperature outside of sensor range | ||
| Line 110: | Line 109: | ||
===GetTempIntFX10=== | ===GetTempIntFX10=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetTempIntFX10''' | ||
|- | |- | ||
| colspan="2" | Value of integer temperature in deg F x10 E.g 62.5F will give the result of 625 This allows more contol if using integers to save memory 9999 = temperature outside of sensor range | | colspan="2" | Value of integer temperature in deg F x10 E.g 62.5F will give the result of 625 This allows more contol if using integers to save memory 9999 = temperature outside of sensor range | ||
| Line 124: | Line 123: | ||
===GetTempStringC=== | ===GetTempStringC=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetTempStringC''' | ||
|- | |- | ||
| colspan="2" | String value of integer temperature in deg C to one decimal place. E.g 22.5 999,9 = temperature outside of sensor range | | colspan="2" | String value of integer temperature in deg C to one decimal place. E.g 22.5 999,9 = temperature outside of sensor range | ||
| Line 138: | Line 137: | ||
===GetTempStringF=== | ===GetTempStringF=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetTempStringF''' | ||
|- | |- | ||
| colspan="2" | String value of integer temperature in degF to one decimal place. E.g 70.2 999,9 = temperature outside of sensor range | | colspan="2" | String value of integer temperature in degF to one decimal place. E.g 70.2 999,9 = temperature outside of sensor range | ||
| Line 152: | Line 151: | ||
===IntValueADC=== | ===IntValueADC=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''IntValueADC''' | ||
|- | |- | ||
| colspan="2" | The Integer ADC value of the sensor output volttage | | colspan="2" | The Integer ADC value of the sensor output volttage | ||
| Line 166: | Line 165: | ||
===VoltageADC=== | ===VoltageADC=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''VoltageADC''' | ||
|- | |- | ||
| colspan="2" | Calculates what the approximate voltage should be based on Vref, Scale factor, Offset. For TSIC301, based on Max temp and Min temp only. | | colspan="2" | Calculates what the approximate voltage should be based on Vref, Scale factor, Offset. For TSIC301, based on Max temp and Min temp only. | ||
| Line 181: | Line 180: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| Line 192: | Line 191: | ||
| colspan="2" | Select the required sensor. Custom allows you to enter parameters of an analogue sensor not covered. | | colspan="2" | Select the required sensor. Custom allows you to enter parameters of an analogue sensor not covered. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | ADC Properties | ||
|- | |- | ||
|- | |- | ||
| Line 226: | Line 225: | ||
| colspan="2" | The number of ADC samples taken. The higher the number the more stable the reading. | | colspan="2" | The number of ADC samples taken. The higher the number the more stable the reading. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Sensor Characteristics | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:36, 13 July 2026
| Author | Medelec35 |
| Version | 1.0 |
| Category | Environmental |
Analogue Temp Sensors component
A range of the most popular temperature analogue sensors which are: AD22100, AD22103, LM135, LM235, LM335, LM34, LM35, LM60, MCP9700, MCP9701, TC1047, TMP35, TMP36, TMP37 & TSIC301. Uses a single ADC pin which will allow you to display the temperature in C or F. If your sensor is not listed, there is a Custom option. You will be able to enter the scale factor, offset voltage, Temperature Compensation, min and maximum temperatures If the temperature is outside the min and max values, then 999.9 will be displayed.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Analogue_Temperature_Sensors.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Analogue_Temperature_Sensors.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Example Program showing how to show the temperature in Celsius and Fahrenheit and expected ADC pin voltage on an LCD.
Macro reference
GetTempFloatC
| GetTempFloatC | |
| Value of the temperature in deg C 999.9 = temperature outside of sensor range | |
| Return | |
GetTempFloatF
| GetTempFloatF | |
| Value of the temperature in deg F 999,9 = temperature outside of sensor range | |
| Return | |
GetTempIntCX10
GetTempIntFX10
GetTempStringC
| GetTempStringC | |
| String value of integer temperature in deg C to one decimal place. E.g 22.5 999,9 = temperature outside of sensor range | |
| Return | |
GetTempStringF
| GetTempStringF | |
| String value of integer temperature in degF to one decimal place. E.g 70.2 999,9 = temperature outside of sensor range | |
| Return | |
IntValueADC
| IntValueADC | |
| The Integer ADC value of the sensor output volttage | |
| Return | |
VoltageADC
| VoltageADC | |
| Calculates what the approximate voltage should be based on Vref, Scale factor, Offset. For TSIC301, based on Max temp and Min temp only. | |
| Return | |