READINTERNALTEMP voltage, variable
READINTERNALTEMP voltage, offset, variable
READINTERNALTEMP voltage, - offset, variable
Voltage - is a constant that indicates the power supply voltage. Options are:
IT_5V0 5V supply IT_4V5 4.5V supply IT_4V0 4V supply IT_3V5 3.5V supply IT_3V3 3.3V supply IT_3V0 3V supply IT_RAW_H Raw word reading (high setting, above 4V only) IT_RAW_L Raw word reading (low setting, any voltage)
Offset - is an optional correction factor, defaults to 0
Variable - receives the temperature data.
The readinternaltemp command reads the analogue voltage drop across 2 (low) or 4 (high) internal diodes. This gives a very approximate temperature indicator.
This command is used to provide an indicator of the internal temperature of the chip. It is designed to be used as a cooling failure warning threshold device, not an accurate temperature sensor! For accuracy use a DS18B20 sensor and the readtemp command instead.
Internally an ADC reading is measured across two or four diodes that are linked to the power supply. As temperature changes the ADC reading will also vary. As the ADC reference is the supply voltage the reading will also change with a change in supply (e.g. as a battery runs down). When IT_RAW_H or IT_RAW_L are used, the raw reading is returned in a word variable. Offset is ignored in these cases and so should be set to 0. When the other settings are used the PICAXE attempts to mathematically change the value into an approximate reading in degrees Celsius. If desired an 'offset' can be added or subtracted from the raw reading before this conversion occurs to try to improve accuracy.
Kindly note this system can never be an accurate sensor and should only be used as an indicator of extreme temperature only. Thresholds and offsets will vary from part to part. For accuracy use an external DS18B20 instead!
Submit Your Own Code!
You must be logged in to submit code examples. Login now.