Component: Thermistor Template (Sensors)

From Flowcode Help
Jump to navigationJump to search
Author Matrix
Version 1.0
Category Sensors


Thermistor Template component

Base component for creating thermistors. Has no GUI - this would be added by concrete examples using this basem which may or may not expose the propertes.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

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







Macro reference

CalculateTemperature

Fc9-comp-macro.png CalculateTemperature
Converts the input ADC value and returns the Temperature in tenths of degree C 
Fc9-u16-icon.png - UINT ADCValue
ADC Reading to be converted 
Fc9-s16-icon.png - INT Return


GetADCValue

Fc9-comp-macro.png GetADCValue
Returns the Raw ADC value from the Analogue Channel 
Fc9-u16-icon.png - UINT Return


GetIntegerTemperature

Fc9-comp-macro.png GetIntegerTemperature
Reads the ADC input and returns the calculated Temperature as Integer degrees C 
Fc9-s16-icon.png - INT Return


GetRealTemperature

Fc9-comp-macro.png GetRealTemperature
Reads the ADC input and Returns the calculated Temperature as Float value in degrees C 
Fc9-f32-icon.png - FLOAT Return


SetChannel

Fc9-comp-macro.png SetChannel
Set the ADC Channel 
Fc9-s16-icon.png - INT ChannelID
 
Fc9-void-icon.png - VOID Return


SetTemperature

Fc9-comp-macro.png SetTemperature
Simulation macro that sets the internal ADC value to the appropriate value for a given temperature. This allows all internal systems of the sensor to be simulated. 
Fc9-f32-icon.png - FLOAT Temperature
The temperature in C - restricted to -25 to +125 range 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-6-icon.png ADC Channel
Analogue Input Channel - Which pin is the analogue input connected to? 
Fc9-type-21-icon.png ADC Bit Resolution
 
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-16-icon.png 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. 
Fc9-type-21-icon.png 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. 
Fc9-type-21-icon.png -25C Thermistor Value
Value in Ohms of the Thermistor at -25 deg C 
Fc9-type-21-icon.png 0C Thermistor Value
Value in Ohms of the Thermistor at 0 deg C 
Fc9-type-21-icon.png 25C Thermistor Value
Value in Ohms of the Thermistor at 25 deg C 
Fc9-type-21-icon.png 50C Thermistor Value
Value in Ohms of the Thermistor at 50 deg C 
Fc9-type-21-icon.png 75C Thermistor Value
Value in Ohms of the Thermistor at 75 deg C 
Fc9-type-21-icon.png 100C Thermistor Value
Value in Ohms of the Thermistor at 100 deg C 
Fc9-type-21-icon.png 125C Thermistor Value
Value in Ohms of the Thermistor at 125 deg C