mirror of
https://github.com/meshtastic/meshtastic.git
synced 2024-12-26 22:19:46 -08:00
33b42e8af9
As described in meshtastic/firmware#3743 , some users were discovering that their devices unexpectedly powered down after setting "Shutdown on battery delay", despite their devices being connected to USB. This was due to the devices not correctly detecting that they were connected to USB. This can be resolved by altering the ADC_MULTIPLIER per existing instructions. This commit adds a note to encourage users to check the power status before enabling "Shutdown on battery delay". fixes meshtastic/firmware#3743
258 lines
9.2 KiB
Plaintext
258 lines
9.2 KiB
Plaintext
---
|
|
id: power
|
|
title: Power Configuration
|
|
sidebar_label: Power
|
|
description: Settings for advanced users who want to adjust the power configuration on their Meshtastic device.
|
|
---
|
|
|
|
import Admonition from "@theme/Admonition";
|
|
import Tabs from "@theme/Tabs";
|
|
import TabItem from "@theme/TabItem";
|
|
import calculateADC from "/src/utils/calculateADC";
|
|
|
|
:::info Use Device Config first
|
|
Power settings are advanced configuration, most users should choose a role under [Device Config](/docs/configuration/radio/device) to manage power for their device and shouldn't ever need to adjust these settings.
|
|
:::
|
|
|
|
The power config options are: Power Saving, Shutdown after losing power, ADC Multiplier Override, Wait Bluetooth Interval, Light Sleep Interval, Minimum Wake Interval, and Device Battery INA2xx Address. Power config uses an admin message sending a `Config.Power` protobuf.
|
|
|
|
## Power Config Values
|
|
|
|
### Power Saving
|
|
|
|
:::warning
|
|
If enabled, modifications to settings can be made by waking the device through pressing the user button, resetting, or through the [admin channel](/docs/configuration/remote-admin/) for remote administration.
|
|
:::
|
|
|
|
When activated, this feature disables Bluetooth, Serial, WiFi, and the device's screen to conserve power. This is particularly beneficial for devices relying on low-current power sources, like solar panels. For details on which device roles have this feature enabled by default, please check the [Device Config](/docs/configuration/radio/device) section.
|
|
|
|
### Shutdown after losing power
|
|
|
|
Automatically shut down a device after a defined time period if power is lost.
|
|
|
|
Before setting this, ensure your board correctly detects when it is connected to external power (the "🔌" icon in the app). Otherwise, your device could shut down even when power is present.
|
|
Many devices detect power status correctly, however for some devices, you will need to modify the ADC Multiplier (below).
|
|
|
|
### ADC Multiplier Override
|
|
|
|
Ratio of voltage divider for battery pin e.g. 3.20 (R1=100k, R2=220k)
|
|
|
|
Overrides the ADC_MULTIPLIER defined in the firmware device variant file for battery voltage calculation.
|
|
|
|
Should be set to floating point value between 2 and 6
|
|
|
|
#### Calibration Process ([Attribution](https://wiki.uniteng.com/en/meshtastic/nano-g1-explorer#calibration-process))
|
|
|
|
1. Install the rechargeable battery.
|
|
2. Charge the battery until full. Indication of this state may vary depending on device. At this point, the battery voltage should be 4.2V +-1%.
|
|
3. Input the "Battery Charge Percent" displayed on the screen or in your connected app into the calculator below.
|
|
4. If "Battery Charge Percent" (e.g., B 3.82V 60%) is not displayed on the screen, it means that the default value of "Operative Adc Multiplier" is too high. Lower the "Operative Adc Multiplier" to a smaller number (it is recommended to decrease by 0.1) until the screen displays "Battery Charge Percent". Enter the current "Operative Adc Multiplier" in use into the "Operative Adc Multiplier" field in the calculator. Also, input the "Battery Charge Percent" displayed on the screen into the calculator.
|
|
5. Click the "Calculate" button to compute the "Calculated New Operative Adc Multiplier", and set it as the new "Operative Adc Multiplier" for the device.
|
|
|
|
<div class="no-print">
|
|
<details>
|
|
<summary>ADC Calculator</summary>
|
|
<div>
|
|
<Admonition type="info">
|
|
<p>This calibration method only maps 4.2V to Battery Charge Percent 100%, and does not address the potential non-linearities of the ADC.</p>
|
|
</Admonition>
|
|
<table>
|
|
<tr>
|
|
<td> Battery Charge Percent: </td>
|
|
<td>
|
|
<input type="text" id="batteryChargePercent" defaultValue="65" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Current Adc Multiplier: </td>
|
|
<td>
|
|
<input type="text" id="operativeAdcMultiplier" defaultValue="2" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Calculated New Operative Adc Multiplier: </td>
|
|
<td>
|
|
<input
|
|
type="text"
|
|
id="newOperativeAdcMultiplier"
|
|
value="2"
|
|
disabled="disabled"
|
|
/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>
|
|
<button
|
|
className="button button--outline button--lg cta--button"
|
|
onClick={calculateADC}
|
|
>
|
|
Calculate
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
Default values for ADC Multipliers are:
|
|
|
|
| Device | Default ADC Multiplier |
|
|
| :-------: | :--------------------: |
|
|
| chatter2 | 5.0 |
|
|
| diy | 1.85 |
|
|
| esp32-s3-pico | 3.1 |
|
|
| heltec_v1 & heltec_v2 | 3.2 |
|
|
| heltec_v3 & heltec_wsl_v3 | 4.9 |
|
|
| heltec_wireless_paper | 2 |
|
|
| heltec_wireless_tracker 1.0/1.1 | 4.9 |
|
|
| lora_isp4520 | 1.436 |
|
|
| m5stack_coreink | 5 |
|
|
| nano-g1-explorer | 2 |
|
|
| nano-g2-ultra | 2 |
|
|
| picomputer-s3 | 3.1 |
|
|
| rak4631 | 1.73 |
|
|
| rpipico | 3.1 |
|
|
| rpipicow | 3.1 |
|
|
| station-g1 | 6.45 |
|
|
| station-g2 | 4 |
|
|
| tlora_v2_1_16 | 2 |
|
|
| tlora_v2_1_18 | 2.11 |
|
|
| tlora_t3s3_v1 | 2.11 |
|
|
| t-deck | 2.11 |
|
|
| t-echo | 2 |
|
|
|
|
</div>
|
|
</details>
|
|
</div>
|
|
|
|
### Wait Bluetooth Interval
|
|
|
|
How long to wait before turning off BLE in no Bluetooth states
|
|
|
|
`0` for default of 1 minute
|
|
|
|
### Light Sleep Interval
|
|
|
|
:::info ESP32 Only
|
|
This setting only applies to ESP32-based boards, it will have no effect on nRF52/RP2040 boards.
|
|
:::
|
|
|
|
In light sleep the CPU is suspended, LoRa radio is on, BLE is off and GPS is on
|
|
|
|
`0` for default of five minutes
|
|
|
|
### Minimum Wake Interval
|
|
|
|
While in light sleep when we receive packets on the LoRa radio we will wake and handle them and stay awake in no Bluetooth mode for this interval
|
|
|
|
`0` for default of 10 seconds
|
|
|
|
### Device Battery INA2xx Address
|
|
|
|
If an INA-2XX device is auto-detected on one of the I2C buses at the specified address, it will be used as the authoritative source for reading device battery level voltage. Setting is ignored for devices with PMUs (e.g. T-beams)
|
|
|
|
:::tip[Convert hexadecimal to decimal]
|
|
I2C addresses are normally represented in hexadecimal and will require conversion to decimal in order to set via Meshtastic clients. For example the I2C address of 0x40 converted to decimal is 64.
|
|
:::
|
|
|
|
## Power Config Client Availability
|
|
|
|
<Tabs
|
|
groupId="settings"
|
|
defaultValue="cli"
|
|
values={[
|
|
{label: 'Android', value: 'android'},
|
|
{label: 'Apple', value: 'apple'},
|
|
{label: 'CLI', value: 'cli'},
|
|
{label: 'Web', value: 'web'},
|
|
]}>
|
|
<TabItem value="android">
|
|
|
|
#### Android
|
|
|
|
:::info
|
|
|
|
Power Config options are available for Android.
|
|
|
|
1. Open the Meshtastic App
|
|
2. Navigate to: **Vertical Ellipsis (3 dots top right) > Radio Configuration > Power**
|
|
|
|
:::
|
|
|
|
</TabItem>
|
|
<TabItem value="apple">
|
|
|
|
#### Apple
|
|
|
|
:::info
|
|
|
|
Select Power config options are available on iOS, iPadOS and macOS at Settings > Deivce Configuration > Power.
|
|
|
|
:::
|
|
|
|
</TabItem>
|
|
<TabItem value="cli">
|
|
|
|
#### CLI
|
|
|
|
:::info
|
|
|
|
All Power config options are available in the python CLI.
|
|
|
|
:::
|
|
|
|
| Setting | Acceptable Values | Default |
|
|
| :----------------------------------: | :--------------------------------: | :---------------------------------: |
|
|
| power.is_power_saving | `true`, `false` | `false` |
|
|
| power.on_battery_shutdown_after_secs | `integer` (seconds) | Default of `0` is off |
|
|
| power.adc_multiplier_override | `2-4` (floating point value) | Default of `0` uses firmware values |
|
|
| power.wait_bluetooth_secs | `integer` (seconds) | Default of `0` is 1 minute |
|
|
| power.ls_secs | `integer` (seconds) | Default of `0` is 5 minutes |
|
|
| power.min_wake_secs | `integer` (seconds) | Default of `0` is 10 seconds |
|
|
| power.device_battery_ina_address | `integer` (I2C address as decimal) | Default of `0` is no address set |
|
|
|
|
:::tip
|
|
|
|
Because the device will reboot after each command is sent via CLI, it is recommended when setting multiple values in a config section that commands be chained together as one.
|
|
|
|
```shell title="Example:"
|
|
meshtastic --set power.is_power_saving true --set power.on_battery_shutdown_after_secs 120
|
|
```
|
|
|
|
:::
|
|
|
|
```shell title="Enable / Disable Power Saving"
|
|
meshtastic --set power.is_power_saving true
|
|
meshtastic --set power.is_power_saving false
|
|
```
|
|
|
|
```shell title="Enable / Disable Shutdown after losing power"
|
|
meshtastic --set power.on_battery_shutdown_after_secs 120
|
|
meshtastic --set power.on_battery_shutdown_after_secs 0
|
|
```
|
|
|
|
```shell title="Set Wait Bluetooth Interval (Default of 0 is 60 seconds)"
|
|
meshtastic --set power.wait_bluetooth_secs 0
|
|
meshtastic --set power.wait_bluetooth_secs 120
|
|
```
|
|
|
|
```shell title="Set Light Sleep to default (Default of 0 is 5 minutes)"
|
|
meshtastic --set power.ls_secs 0
|
|
meshtastic --set power.ls_secs 120
|
|
```
|
|
|
|
```shell title="Set Minimum Wake Interval (Default of 0 is 10 seconds)"
|
|
meshtastic --set power.min_wake_secs 0
|
|
meshtastic --set power.min_wake_secs 120
|
|
```
|
|
|
|
</TabItem>
|
|
<TabItem value="web">
|
|
|
|
#### Web
|
|
|
|
:::info
|
|
All power config options are available in the Web UI.
|
|
:::
|
|
|
|
</TabItem>
|
|
</Tabs>
|