You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/sensors/power_measure/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Overview
4
4
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.
6
6
7
7
This example supports the **BL0937** power measurement chip, which is capable of measuring:
8
8
@@ -23,7 +23,7 @@ The primary goal is to demonstrate how to configure the hardware pins, initializ
23
23
24
24
## Hardware Requirements
25
25
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):
Copy file name to clipboardExpand all lines: examples/sensors/power_measure/README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Overview
4
4
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.
6
6
7
7
This example supports the **BL0937** power measurement chip, which is capable of measuring:
8
8
@@ -23,7 +23,7 @@ The primary goal is to demonstrate how to configure the hardware pins, initializ
23
23
24
24
## Hardware Requirements
25
25
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):
@@ -41,33 +41,33 @@ Make sure that these GPIO pins are correctly connected to the respective pins on
41
41
42
42
## How It Works
43
43
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:
45
45
46
46
1.**Initialization of Calibration Factors** :
47
47
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.
49
49
* Default calibration factors (`DEFAULT_KI`, `DEFAULT_KU`, `DEFAULT_KP`) are used for the measurement.
50
50
51
51
2.**Configuration of Power Measurement System** :
52
52
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.
54
54
* Specific thresholds for overcurrent, overvoltage, and undervoltage are set, and energy detection is enabled.
55
55
56
56
3.**Fetching Measurement Data** :
57
57
58
58
* The application enters a loop where it repeatedly fetches and logs the following parameters every second:
* If fetching any of the measurements fails, an error message is logged using `ESP_LOGE`.
67
67
68
68
5.**De-initialization** :
69
69
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().
71
71
72
72
## Configuration
73
73
@@ -94,4 +94,4 @@ Example log output:
94
94
## Troubleshooting
95
95
96
96
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.
0 commit comments