Skip to main content
Firmware Stable

GPIO Battery Temperature

FALCON supports up to two battery temperature sensors using NTC thermistors connected to GPIO pins. The measured temperatures are broadcast over CAN in the 0x620 - Battery Status message as min/max values.

Thermistor Installation

The thermistor is connected in a voltage divider configuration with a pull-up resistor to the IO reference voltage:

IO +5V ──┤ 3.3kΩ pull-up ├──┬──┤ NTC thermistor ├── IOGND

GPIO pin
  1. Connect a 3.3kΩ resistor between IO +5V and the GPIO pin
  2. Connect the NTC thermistor between the GPIO pin and IOGND
warning

The pull-up resistor value and reference voltage are fixed in the firmware (3.3kΩ pull-up, 5V reference). Using different values will result in incorrect temperature readings.

tip

After connecting, verify your wiring by checking the Rthermistor and Vthermistor states in the respective /btemp1/ or /btemp2/ folder. The resistance should match the expected thermistor value at room temperature.

Setup

1. Assign GPIO pins

Configure which GPIO pins the thermistors are connected to in the /io/ folder.

in_btemp1

GPIO ID for battery temperature sensor 1. Set to 0 to disable.

in_btemp2

GPIO ID for battery temperature sensor 2. Set to 0 to disable.

2. Configure thermistor parameters

Each sensor has its own parameter folder (/btemp1/ and /btemp2/) where the thermistor characteristics are configured.

info

The thermistor parameters are located in the /btemp1/ and /btemp2/ folders.

thermistor_r0 [Ohm]

Resistance of the thermistor at 25°C.

thermistor_beta [K]

Beta coefficient of the thermistor. Use a negative value for NTC thermistors.

States

Sensor 1 (/btemp1/)

StateUnitDescription
RthermistorOhmCalculated thermistor resistance
VthermistorVFiltered voltage reading at the GPIO pin
temperature°CTemperature calculated from thermistor resistance

Sensor 2 (/btemp2/)

StateUnitDescription
RthermistorOhmCalculated thermistor resistance
VthermistorVFiltered voltage reading at the GPIO pin
temperature°CTemperature calculated from thermistor resistance