INAV Temperature Sensor Configuration
About 2 minINAVINAV温度传感器LM75DS18B20I2C1-WireOSD
I. Feature Overview
INAV now supports connecting temperature sensors via I²C bus (LM75) and 1-Wire bus (DS18B20). Temperature data can be displayed on OSD and used for logging.
| Feature | Description |
|---|---|
| Supported chips | LM75 (I²C), DS18B20 (1-Wire) |
| Display methods | OSD display + logging |
| Number supported | Up to 8 temperature sensors |
| Default support | F4/F7 flight controllers are supported by default, F3 requires custom firmware compilation |
II. LM75 Temperature Sensor Wiring Instructions
- Package: SOP-8 (common module: CJMCU-75)
- Communication interface: I²C (up to 400kHz)
- Supply voltage: 2.7V ~ 5.5V
- Measurement range: -55 ~ 125°C
On the purple LM75 (CJMCU-75), the address pin on the bottom of the PCB needs to be bridged to GND or VCC to define the I2C address
Address Settings
The CJMCU-75 module has three address configuration pads (A2, A1, A0) on the back that can be connected to VCC or GND to set a unique I²C address:
| A2 | A1 | A0 | I²C Address | INAV CLI Address |
| --- | --- | --- | --- | --- |
| GND | GND | GND | 0x48 | 0 |
| GND | GND | VCC | 0x49 | 1 |
| GND | VCC | GND | 0x4A | 2 |
| GND | VCC | VCC | 0x4B | 3 |
| VCC | GND | GND | 0x4C | 4 |
| VCC | GND | VCC | 0x4D | 5 |
| VCC | VCC | GND | 0x4E | 6 |
| VCC | VCC | VCC | 0x4F | 7 |
Important
Note: Each LM75 device address must be unique.
III. DS18B20 Wiring Instructions
- Package: TO-92 / SO-8 / µSOP-8
- Interface: 1-Wire (requires DS2482 intermediary chip)
- Power supply: 3.0V ~ 5.5V (parasite power not supported)
- Range: -55 ~ 125°C
Wiring Method:
- Use DS2482 as I²C to 1-Wire converter;
- Connect DS2482 to flight controller I²C bus (SCL/SDA);
- Connect all DS18B20 DQ pins in parallel, with a 4.7k pull-up resistor between them and VCC;
- Connect receiver DQ pin to DS2482 DQ.
IV. CLI Configuration for Temperature Sensors
4.1 Command Format
temp_sensor
temp_sensor reset
temp_sensor <index> <type> <address> <alarm_min> <alarm_max> <osd_symbol> <label>4.2 Parameter Description
| Parameter | Description |
|---|---|
| index | Sensor configuration number (0~7) |
| type | 1 for LM75, 2 for DS18B20 |
| address | LM75: 0~7; DS18B20: 64-bit ROM hexadecimal address |
| alarm_min | OSD blinks when temperature is below this value (unit: 0.1°C) |
| alarm_max | OSD blinks when temperature is above this value (unit: 0.1°C) |
| osd_symbol | OSD icon ID (0 means use label) |
| label | Text label with up to 4 characters (e.g., ESC, BATT) |
4.3 OSD Icon ID Reference Table
| ID | Meaning |
|---|---|
| 1 | General temperature icon |
| 2 | ESC temperature |
| 3 | VTX temperature |
| 4 | Motor temperature |
| 5 | Battery temperature |
| 6 | External ambient temperature |
V. CLI Configuration Examples
- Set sensor 0 to use ESC temperature icon:
temp_sensor 0 1 0 -200 600 2- Set sensor 3 (DS18B20) to use label BATT, minimum alarm 0.5°C, maximum alarm 45°C:
temp_sensor 3 2 7d01186838f2ff28 5 450 0 BATTVI. OSD Display Label Alignment Method
The temperature label alignment on OSD can be set through parameter osd_temp_label_align:
| Value | Display Method |
|---|---|
| LEFT | Left alignment: T1 xxx°C |
| RIGHT | Right alignment: T1 xxx°C |
VII. Additional Information
- Use the temp_sensor command to view all configured sensors;
- Use temp_sensor reset to clear all settings;
- DS18B20 address needs to be obtained through detection method, it is recommended to connect first and then run temp_sensor to view automatic recognition output.
————This article is referenced from the INAV official website: https://github.com/iNavFlight/inav/blob/master/docs/Temperature%20sensors.md