Setup a external temperature sensor
Introduction
This page describes how to setup external Temperature sensor using a Revolution, Revolution Nano, or Sparky2 board, to be used as HoTT sensor.
Two temperature sensor can be connected to a ADC port :
- LM35 sensor, up to around 100°C
- NTC sensor, up to 300°C
Hardware
LM35 sensor
Connections are pretty simple: Gnd, +5V, and analog voltage proportional to the temperature (usually 0.01V/°C) back to the ADC pin.
The sensor can be connected to various ports, according to the board you use. See next part.
NTC sensor
NTC can be connected to the ground or to the 3.3V voltage reference and following settings will be adjusted with the values used.
The sensor can be connected to various ports, according to the board you use. See next part.
Select the analog input
Go to System > UAVOBrowser > Settings > HwSettings > ADCRouting and select the adc input pin used for temperature function (LM35Temperature or NTCTemperature).
Preferred adc input pins are located on Output ports, using a servo connector.
Here is the adc mapping for various boards:
Board | adc0 | adc1 | adc2 | adc3 | adc4 | adc5 | adc6 |
---|---|---|---|---|---|---|---|
Revolution | PWR port pin 3 | PWR port pin 4 | Output port out 3 | Output port | Output_port | Output port | internal |
Sparky2 | PWR port pin 3 | PWR port pin 4 | PWR port pin2 | Output port | Output port | Output_port | Output port |
RevoNano | FlexiIO | FlexiIO pin 5 | FlexiIO pin 6 | FlexiIO pin 7 | FlexiIO pin 8 | Output_port out 5 | Output port out 6 |
FlexiIO refers to the receiver port
Calibrate sensor
LM35 calibration
At this point you can do some measurements and compare a LM35 temperature readings found into the TemperatureState UAVO with the ambient temperature.
A LM35 will not need calibration since his output is factory calibrated for 0.01V/°C.
NTC calibration
NTC sensor type may need some calibration according to:
- the reference voltage need to be stable
- NTC datasheet: beta value, nominal value at xx°C
- serial resistor value
Temperature1 refers to the LM35 temperature and Temp2 to the NTC measured temperature.