meshtastic/docs/configuration/device-config/power.mdx

224 lines
7.7 KiB
Plaintext
Raw Normal View History

2022-06-24 19:42:37 -07:00
---
id: power
title: Power Configuration
2022-11-02 11:46:54 -07:00
slug: /settings/config/power
2022-06-24 19:42:37 -07:00
sidebar_label: Power
---
2023-01-19 05:01:57 -08:00
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import calculateADC from "@site/src/utils/calculateADC";
2022-06-24 19:42:37 -07:00
2023-01-19 05:01:57 -08:00
The power config options are: Power Saving, Shutdown after losing power, ADC Multiplier Override Wait Bluetooth Interval, Mesh Super Deep Sleep Timeout, Super Deep Sleep Interval, Light Sleep Interval and Minimum Wake Interval. Power config uses an admin message sending a `Config.Power` protobuf.
2022-06-24 19:42:37 -07:00
2022-08-03 08:14:18 -07:00
Power settings are advanced configuration, most users should choose a role under Device Config to manage power for their device and should never need to touch any of these settings.
2022-06-24 19:42:37 -07:00
## Power Config Values
### Power Saving
2023-01-30 08:50:11 -08:00
If set, Bluetooth, Wifi, and screen (if applicable) are turned off. When using the Router device role, this setting is on by default. The assumption for a Router is that the device will be used in a standalone manner where these features are not needed, and will be shut off to conserve power. This is especially useful when a device is powered from a low-current source (i.e. solar).
2022-06-24 19:42:37 -07:00
### Shutdown after losing power
Automatically shut down a device after a defined time period if power is lost.
2023-01-19 05:01:57 -08:00
### ADC Multiplier Override `Fixes issues on Heltec v2`
2022-06-24 19:42:37 -07:00
2022-10-05 06:25:07 -07:00
Ratio of voltage divider for battery pin e.g. 3.20 (R1=100k, R2=220k)
2022-06-24 19:42:37 -07:00
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 Li-Polymer 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.
:::tip ADC Calculator
<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>
:::
:::info
It's important to note that this calibration method only maps 4.2V to Battery Charge Percent 100%, and does not address the potential non-linearities of the ADC.
:::
2022-06-24 19:42:37 -07:00
### Wait Bluetooth Interval
How long wait before turning off BLE in no Bluetooth states
`0` for default of 1 minute
### Mesh Super Deep Sleep Timeout
2023-01-19 05:01:57 -08:00
While in Light Sleep if this value is exceeded we will lower into super deep sleep
2022-06-24 19:42:37 -07:00
or Super Deep Sleep Interval (default 1 year) or a button press
`0` for default of two hours, MAXUINT for disabled
2023-01-19 05:01:57 -08:00
### Super Deep Sleep Interval
2022-06-24 19:42:37 -07:00
While in Light Sleep if Mesh Super Deep Sleep Timeout Seconds is exceeded we will lower into super deep sleep or this value (default 1 year) or a button press
`0` for default of one year
2023-01-19 05:01:57 -08:00
### Light Sleep Interval `ESP32 Only Setting`
2022-06-24 19:42:37 -07:00
In light sleep the CPU is suspended, LoRa radio is on, BLE is off an 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
## Power Config Client Availability
<Tabs
groupId="settings"
2022-07-15 19:57:03 -07:00
defaultValue="cli"
2022-06-24 19:42:37 -07:00
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
2022-06-29 22:33:26 -07:00
{label: 'CLI', value: 'cli'},
2022-06-24 19:42:37 -07:00
{label: 'Web', value: 'web'},
]}>
<TabItem value="android">
:::info
2022-12-04 13:13:26 -08:00
Power Config options are available for Android.
1. Open the Meshtastic App
2. Navigate to: **Vertical Ellipsis (3 dots top right) > Device Settings > Power Config**
2022-06-24 19:42:37 -07:00
:::
</TabItem>
<TabItem value="apple">
:::info
Power config is not available on Apple OS's.
:::
</TabItem>
<TabItem value="cli">
2023-01-19 05:01:57 -08:00
:::info
2022-08-03 08:14:18 -07:00
All Power config options are available in the python CLI.
2022-06-24 19:42:37 -07:00
:::
2023-01-19 05:01:57 -08:00
| 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.mesh_sds_timeout_secs | `integer` (seconds) | Default of `0` is 2 hours |
| power.sds_secs | `integer` (seconds) | Default of `0` is 1 year |
| power.ls_secs | `integer` (seconds) | Default of `0` is 1 hour |
| power.min_wake_secs | `integer` (seconds) | Default of `0` is 10 seconds |
2022-06-24 19:42:37 -07:00
:::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
```
:::
2022-06-24 19:42:37 -07:00
2022-06-25 08:44:03 -07:00
```shell title="Enable / Disable Power Saving"
meshtastic --set power.is_power_saving true
meshtastic --set power.is_power_saving false
2022-06-24 19:42:37 -07:00
```
2022-06-25 08:44:03 -07:00
```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
2022-06-24 19:42:37 -07:00
```
2022-06-25 08:44:03 -07:00
```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
2022-06-24 19:42:37 -07:00
```
2022-06-25 08:44:03 -07:00
```shell title="Set Mesh Super Deep Sleep Timeout (Default of 0 is 2 hours/7200 seconds)"
meshtastic --set power.mesh_sds_timeout_secs 0
meshtastic --set power.mesh_sds_timeout_secs 120
2022-06-25 08:44:03 -07:00
// Disable using MAXUINT
meshtastic --set power.mesh_sds_timeout_secs 4294967295
2022-06-24 19:42:37 -07:00
```
2022-06-25 08:44:03 -07:00
```shell title="Set Super Deep Sleep (Default of 0 is 1 year)"
meshtastic --set power.sds_secs 0
meshtastic --set power.sds_secs 120
2022-06-24 19:42:37 -07:00
```
2022-06-25 08:44:03 -07:00
```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
2022-06-24 19:42:37 -07:00
```
2022-06-25 08:44:03 -07:00
```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
2022-06-24 19:42:37 -07:00
```
2023-01-19 05:01:57 -08:00
2022-06-24 19:42:37 -07:00
</TabItem>
<TabItem value="web">
2022-06-24 19:42:37 -07:00
:::info
2022-08-03 08:14:18 -07:00
All power config options are available in the Web UI.
2022-06-24 19:42:37 -07:00
:::
2023-01-19 05:01:57 -08:00
2022-06-24 19:42:37 -07:00
</TabItem>
2023-01-19 05:01:57 -08:00
</Tabs>