Component: Analogue Temp Sensors (Environmental)

From Flowcode Help
Revision as of 16:23, 7 January 2022 by Wiki bot (talk | contribs)
Jump to navigationJump to search
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, 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, min and maximum temperatures If the temperature is outside the min and max values, then 999.9 will be displayed.

Component Pack

FREE

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. FC6 Icon.png Analogue Sensors Example

Downloadable macro reference

Fc9-comp-macro.png VoltageADC
Calculates what the approximate voltage should be based on Vref, Scale factor, Offset. For TSIC301, based on Max temp and Min temp only.  
Fc9-f32-icon.png - FLOAT Return


Fc9-comp-macro.png GetTempIntFX10
 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png IntValueADC
 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png GetTempFloatF
Value of the temperature in deg F 
Fc9-f32-icon.png - FLOAT Return


Fc9-comp-macro.png GetTempFloatC
Value of the temperature in deg C 
Fc9-f32-icon.png - FLOAT Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Select Sensor
Select the required sensor. Custom allows you to enter parameters of an analogue sensor not covered. 
Fc9-type-6-icon.png Channel
Analogue Input Channel - Which pin is the analogue input connected to? 
Fc9-type-21-icon.png Vref (mV)
For a more accurate reading, enter the exact referance voltage.  
Fc9-type-16-icon.png 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. 
Fc9-type-16-icon.png 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. 
Fc9-type-14-icon.png Acquisition cycles
Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. 
Fc9-type-21-icon.png Scale factor (mV x100)
for a scale factor of 22mv/C or 22mV/F it's 2200. Scale factor is set for you automatically. It can only be adjusted when custom is selcted.  
Fc9-type-21-icon.png Offset (mV)
Offset is set for you automatically. It can only be adjusted when custom is selcted. 
Fc9-type-21-icon.png Total average samples
The number of ADC samples taken. The higher the number the more stable the reading.  
Fc9-type-14-icon.png Max Temp
Max Temp the sensor can reach is set for you automatically. It can only be adjusted when custom is selcted. 
Fc9-type-14-icon.png Min Temp
Max Temp the sensor can reach is set for you automatically. It can only be adjusted when custom is selcted. 
Fc9-type-14-icon.png Centigrade
0 for a fahrenheit sensor. 1 for a centigrade sensor. Can only be changed when custom is selected. 
Fc9-type-14-icon.png Kelvin
1 for a kelvin sensor. Can only be changed when custom is selected. 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations