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
- Connect a 3.3kΩ resistor between IO +5V and the GPIO pin
- Connect the NTC thermistor between the GPIO pin and IOGND
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.
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.
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/)
| State | Unit | Description |
|---|---|---|
Rthermistor | Ohm | Calculated thermistor resistance |
Vthermistor | V | Filtered voltage reading at the GPIO pin |
temperature | °C | Temperature calculated from thermistor resistance |
Sensor 2 (/btemp2/)
| State | Unit | Description |
|---|---|---|
Rthermistor | Ohm | Calculated thermistor resistance |
Vthermistor | V | Filtered voltage reading at the GPIO pin |
temperature | °C | Temperature calculated from thermistor resistance |