Skip to content

Commit a27478b

Browse files
Miaojianyuespressif-bot
authored andcommitted
docs:fix docs errors in power_measure sensor
Remove incorrect links and ambiguous content from the README files
1 parent ede7f47 commit a27478b

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

components/sensors/power_measure/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
This example demonstrates how to use the **BL0937** power measurement chip to detect electrical parameters such as voltage, current, active power, and energy consumption. It is implemented for **ESP32** using FreeRTOS, and shows how to configure and interface with the BL0937 power measurement chip. The example initializes the power measurement system, fetches various parameters, and logs them at regular intervals.
5+
This example demonstrates how to use the **BL0937** power measurement chip to detect electrical parameters such as voltage, current, active power, and energy consumption. It is implemented for **ESP32 series chips** using FreeRTOS, and shows how to configure and interface with the BL0937 power measurement chip. The example initializes the power measurement system, fetches various parameters, and logs them at regular intervals.
66

77
This example supports the **BL0937** power measurement chip, which is capable of measuring:
88

@@ -23,7 +23,7 @@ The primary goal is to demonstrate how to configure the hardware pins, initializ
2323

2424
## Hardware Requirements
2525

26-
The example uses the **BL0937** power measurement chip. To connect it, the following pins must be configured on the ESP32:
26+
The example uses the **BL0937** power measurement chip and ESP32-C3(C2) for test. To connect it, the following pins must be configured on the ESP32-C3(C2):
2727

2828
| Variable | GPIO Pin | Chip Pin |
2929
| ------------------- | -------------- | -------- |

examples/sensors/power_measure/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
This example demonstrates how to use the **BL0937** power measurement chip to detect electrical parameters such as voltage, current, active power, and energy consumption. It is implemented for **ESP32** using FreeRTOS, and shows how to configure and interface with the BL0937 power measurement chip. The example initializes the power measurement system, fetches various parameters, and logs them at regular intervals.
5+
This example demonstrates how to use the **BL0937** power measurement chip to detect electrical parameters such as voltage, current, active power, and energy consumption. It is implemented for **ESP32 series chips** using FreeRTOS, and shows how to configure and interface with the BL0937 power measurement chip. The example initializes the power measurement system, fetches various parameters, and logs them at regular intervals.
66

77
This example supports the **BL0937** power measurement chip, which is capable of measuring:
88

@@ -23,7 +23,7 @@ The primary goal is to demonstrate how to configure the hardware pins, initializ
2323

2424
## Hardware Requirements
2525

26-
The example uses the **BL0937** power measurement chip. To connect it, the following pins must be configured on the ESP32:
26+
The example uses the **BL0937** power measurement chip and ESP32-C3(C2) for test. To connect it, the following pins must be configured on the ESP32-C3(C2):
2727

2828
| Variable | GPIO Pin | Chip Pin |
2929
| ------------------- | -------------- | -------- |
@@ -41,33 +41,33 @@ Make sure that these GPIO pins are correctly connected to the respective pins on
4141

4242
## How It Works
4343

44-
The `app_main()` function in the [power_measure_example.c](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) file is the entry point for the application. Here's how it works:
44+
The `app_main()` function in the power_measure_example.c file is the entry point for the application. Here's how it works:
4545

4646
1. **Initialization of Calibration Factors** :
4747

48-
* The application retrieves the default calibration factors for the power measurement chip using the [power_measure_get_calibration_factor()](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) function.
48+
* The application retrieves the default calibration factors for the power measurement chip using the power_measure_get_calibration_factor() function.
4949
* Default calibration factors (`DEFAULT_KI`, `DEFAULT_KU`, `DEFAULT_KP`) are used for the measurement.
5050

5151
2. **Configuration of Power Measurement System** :
5252

53-
* The [power_measure_init_config_t](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) structure is configured with the chip’s GPIO pins, resistor values, and calibration factors.
53+
* The power_measure_init_config_t structure is configured with the chip’s GPIO pins, resistor values, and calibration factors.
5454
* Specific thresholds for overcurrent, overvoltage, and undervoltage are set, and energy detection is enabled.
5555

5656
3. **Fetching Measurement Data** :
5757

5858
* The application enters a loop where it repeatedly fetches and logs the following parameters every second:
59-
* **Voltage** ([power_measure_get_voltage](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html))
60-
* **Current** ([power_measure_get_current](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html))
61-
* **Active Power** ([power_measure_get_active_power](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html))
62-
* **Energy** ([power_measure_get_energy](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html))
59+
* **Voltage** (power_measure_get_voltage)
60+
* **Current** (power_measure_get_current)
61+
* **Active Power** (power_measure_get_active_power)
62+
* **Energy** (power_measure_get_energy)
6363

6464
4. **Error Handling** :
6565

6666
* If fetching any of the measurements fails, an error message is logged using `ESP_LOGE`.
6767

6868
5. **De-initialization** :
6969

70-
* After exiting the loop, the power measurement system is de-initialized using [power_measure_deinit()](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html).
70+
* After exiting the loop, the power measurement system is de-initialized using power_measure_deinit().
7171

7272
## Configuration
7373

@@ -94,4 +94,4 @@ Example log output:
9494
## Troubleshooting
9595

9696
1. **Failed Initialization** : If the initialization fails, ensure that all GPIO pins are correctly defined and connected to the **BL0937** chip.
97-
2. **Measurement Failures** : If the measurements fail (e.g., voltage, current), verify that the **BL0937** chip is properly powered and communicating with the ESP32.
97+
2. **Measurement Failures** : If the measurements fail (e.g., voltage, current), verify that the **BL0937** chip is properly powered and communicating with your ESP32 series chips.

examples/sensors/power_measure/README_CN.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## 概述
44

5-
本示例演示了如何使用**BL0937**功率测量芯片来检测电压、电流、有功功率和能耗等电气参数。使用 FreeRTOS 在 **ESP32** 上实现,展示了如何配置**BL0937**功率测量芯片并与开发芯片连接。该示例初始化功率测量系统、获取各种参数并定期记录。
5+
本示例演示了如何使用 **BL0937** 功率测量芯片来检测电压、电流、有功功率和能耗等电气参数。使用 FreeRTOS在 **ESP32系列芯片** 上实现,展示了如何配置 **BL0937** 功率测量芯片并与开发芯片连接。该示例初始化功率测量系统、获取各种参数并定期记录。
66

7-
本示例目前支持**BL0937**功率测量芯片,它能够测量以下参数
7+
本示例目前支持 **BL0937** 功率测量芯片,它能够测量以下参数
88

99
1. **电压**
1010
2. **电流**
@@ -16,22 +16,22 @@
1616
## 功能
1717

1818
* 测量**电压****电流****有功功率****能量**
19-
* 配置**BL0937**功率测量芯片。
19+
* 配置 **BL0937** 功率测量芯片。
2020
* 支持过流、过压和欠压保护。
2121
* 启用能量检测以获得准确读数。
2222
* 每秒定期获取功率读数并记录。
2323

2424
## 硬件要求
2525

26-
本示例使用**BL0937**功率测量芯片。要连接该芯片,须在 ESP32 上配置以下引脚:
26+
本示例使用 **BL0937** 功率测量芯片和 ESP32-C3(C2) 测试。要连接该芯片,须在 ESP32-C3(C2) 上配置以下引脚:
2727

2828
| 变量 | GPIO 引脚 | 芯片引脚 |
2929
| ------------------- | -------------- | -------- |
3030
| `BL0937_CF_GPIO` | `GPIO_NUM_3` | CF 引脚 |
3131
| `BL0937_SEL_GPIO` | `GPIO_NUM_4` | SEL 引脚 |
3232
| `BL0937_CF1_GPIO` | `GPIO_NUM_7` | CF1 引脚 |
3333

34-
确保这些 GPIO 引脚正确连接到硬件设置中**BL0937**芯片上的相应引脚。
34+
确保这些 GPIO 引脚正确连接到硬件设置中 **BL0937** 芯片上的相应引脚。
3535

3636
## 软件要求
3737

@@ -44,7 +44,7 @@ power_measure_example.c文件中的 `app_main()` 函数是应用程序的入口
4444

4545
1. **校准因子初始化**
4646

47-
* 应用程序使用 [power_measure_get_calibration_factor()](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) 函数获取功率测量芯片的默认校准因子。
47+
* 应用程序使用 power_measure_get_calibration_factor() 函数获取功率测量芯片的默认校准因子。
4848
* 测量时使用默认校准因子 (`DEFAULT_KI`, `DEFAULT_KU`, `DEFAULT_KP`)。
4949

5050
2. **功率测量系统配置**
@@ -55,30 +55,30 @@ power_measure_example.c文件中的 `app_main()` 函数是应用程序的入口
5555
3. **获取测量数据**
5656

5757
* 应用程序进入一个循环,每秒重复获取并记录以下参数:
58-
* **电压** ([power_measure_get_voltage](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html))
59-
* **Current** ([power_measure_get_current](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html))
60-
* **有功功率** ([power_measure_get_active_power](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html))
61-
* **Energy** ([power_measure_get_energy](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html))
58+
* **电压** (power_measure_get_voltage)
59+
* **Current** (power_measure_get_current)
60+
* **有功功率** (power_measure_get_active_power)
61+
* **Energy** (power_measure_get_energy)
6262

6363
4. **错误处理**
6464

65-
* 如果获取任何测量值失败,将使用 `ESP_LOGE`记录错误信息。
65+
* 如果获取任何测量值失败,将使用 `ESP_LOGE` 记录错误信息。
6666

6767
5. **释放**
6868

69-
* 退出循环后,功率测量系统将使用 [power_measure_deinit()](vscode-file://vscode-app/snap/code/176/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) 去初始化。
69+
* 退出循环后,功率测量系统将使用 power_measure_deinit() 去初始化。
7070

7171
## 配置
7272

7373
您可以根据具体设置修改以下参数:
7474

75-
* **GPIO引脚定义**:如果 **CF****SEL****CF1** 使用不同的 GPIO 引脚,请修改相应的 `#define`值。
75+
* **GPIO引脚定义**:如果 **CF****SEL****CF1** 使用不同的 GPIO 引脚,请修改相应的 `#define` 值。
7676
* **校准系数** :更新默认校准因子,使其与所连接硬件的规格相匹配,以实现更精确的测量。
7777
* **阈值** :调整 “过流”、“过压 ”和 “欠压 ”设置,以适应应用的安全限制。
7878

7979
## 日志
8080

81-
应用程序使用 `ESP_LOGI`记录信息日志,使用 `ESP_LOGE`记录错误日志。日志信息将显示在串行监视器或日志控制台中。
81+
应用程序使用 `ESP_LOGI` 记录信息日志,使用 `ESP_LOGE` 记录错误日志。日志信息将显示在串行监视器或日志控制台中。
8282

8383
日志输出示例:
8484

@@ -92,5 +92,5 @@ power_measure_example.c文件中的 `app_main()` 函数是应用程序的入口
9292

9393
## 故障排除
9494

95-
1. **初始化失败** : 如果初始化失败,请确保所有 GPIO 引脚都已正确定义并连接到 **BL0937**芯片。
96-
2. **测量失败** : 如果测量失败(如电压、电流),请检查 **BL0937** 芯片是否正确供电并与 ESP32 通信。
95+
1. **初始化失败** : 如果初始化失败,请确保所有 GPIO 引脚都已正确定义并连接到 **BL0937** 芯片。
96+
2. **测量失败** : 如果测量失败(如电压、电流),请检查 **BL0937** 芯片是否正确供电并与 ESP32系列芯片 通信。

0 commit comments

Comments
 (0)