Skip to content

Commit 1f4cb46

Browse files
committed
fix: typos and other minor things
1 parent a24848d commit 1f4cb46

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

content/blog/2025/03/esp32h2-knob/index.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "ESP-KnobA multifunctional smart controller with the ESP32-H2"
2+
title: "ESP-Knob: A multifunctional smart controller with the ESP32-H2"
33
date: 2025-03-27T18:37:17+08:00
44
showAuthor: false
55
featuredAsset: "Esp_knob_featured2.webp"
@@ -61,7 +61,7 @@ The ESP-Knob connects to the [Home Assistant](https://www.home-assistant.io/) sm
6161

6262
{{< youtubeLite id="SznMNu9SA14" label="ESP32-H2 Knob Working" >}}
6363

64-
### Matter Control Function
64+
### Matter Control Function
6565
The ESP-Knob is also compatible with the Matter-Over-Thread protocol, allowing for easily connect with smart devices such as Apple [HomePod](https://www.apple.com/homepod/) and [Amazon Echo](https://www.dxomark.cn/amazon-echo-4th-gen-speaker-review-wider-than-meets-the-eye/) simultaneously. This enables users to seamlessly manage and control various smart home devices in their homes through the Matter protocol, facilitating a cross-platform smart home control system that enhances the coherence and convenience of the user experience.
6666

6767

@@ -116,17 +116,17 @@ The circuit blocks annotated in the drawing are as follows:
116116

117117
- **`Main MCU`**: [ESP32-H2-MINI-1-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2-mini-1_mini-1u_datasheet_en.pdf) module
118118

119-
- **`EC11 (Rotary Encoder):`** Used for user input, capable of detecting both rotation and press operations. The press signal from the EC11 controls `VCC_EN`, which is used for power switching or mode switching.
119+
- **`EC11 (Rotary Encoder):`** Used for user input, capable of detecting both rotation and press operations. The press signal from the EC11 controls `VCC_EN`, which is used for power switching or mode switching.
120120

121-
- **`5V → 3.3V (Power Module):`** Uses the XC6206P332MR-G low-dropout linear regulator to step down the USB power supply (5V) to the 3.3V required by the [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf).
121+
- **`5V → 3.3V (Power Module):`** Uses the XC6206P332MR-G low-dropout linear regulator to step down the USB power supply (5V) to the 3.3V required by the [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf).
122122

123-
- **`VBAT → 3.3V (Power Module):`** Utilizes the TPS61291 boost converter to accommodate a wide input voltage range, supplying 3.3V to the [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) during operation. When the [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) is in sleep mode, it is directly powered by the battery, and supporting low-power on sleep mode for wake-up functionality.
123+
- **`VBAT → 3.3V (Power Module):`** Utilizes the TPS61291 boost converter to accommodate a wide input voltage range, supplying 3.3V to the [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) during operation. When the [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) is in sleep mode, it is directly powered by the battery, and supporting low-power on sleep mode for wake-up functionality.
124124

125-
- **`USB-C Interface:`** Use a USB-C port connect to the ESP32-H2 and used for data transmission and power supply.
125+
- **`USB-C Interface:`** Use a USB-C port connect to the ESP32-H2 and used for data transmission and power supply.
126126

127-
- **`LED (LED Module):`** Uses `GPIO2` and `GPIO3` of the [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) to control a dual-color LED for lighting and off, and used indicating different operating states of the ESP-Knob.
127+
- **`LED (LED Module):`** Uses `GPIO2` and `GPIO3` of the [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) to control a dual-color LED for lighting and off, and used indicating different operating states of the ESP-Knob.
128128

129-
- **`BATTERY (Battery Management Module):`** Connects an external lithium battery (VBAT) through BT1 and monitors the battery voltage. The voltage is divided to BAT_ADC, allowing the ESP32-H2 to monitor the battery level.
129+
- **`BATTERY (Battery Management Module):`** Connects an external lithium battery (VBAT) through BT1 and monitors the battery voltage. The voltage is divided to BAT_ADC, allowing the ESP32-H2 to monitor the battery level.
130130

131131
- **`DEBUG (Download & Debug Interface):`** A reserved test point for the download interface and hardware reset interface of the ESP-Knob device. By connecting to the ESP32-H2’s UART0 interface `(TXD0 and RXD0`), it supports firmware flashing and debugging. Pulling the `ESP_EN` pin low allows for a hardware reset of the ESP-Knob.
132132

@@ -137,9 +137,9 @@ The complete open-source hardware documentation for ESP-Knob can be found at [ES
137137

138138
The example projects for the ESP-Knob available at the time of writing are detailed below. Once you flash the corresponding firmware, the ESP-Knob can be connected to different smart home systems. You can also directly download the three kinds of ESP-Knob firmware from the [ESP-LAUNCHPAD](https://espressif.github.io/esp-launchpad/?flashConfigURL=https://dl.espressif.com/AE/AE-Demo/ESP32-H2-Knob/config.toml).
139139
The examples are
140-
* **BLE-HID**: A BLE-HID implementation based on the [ble_hid_device_demo](https://github.com/espressif/esp-idf/tree/release/v5.4/examples/bluetooth/bluedroid/ble/ble_hid_device_demo). You can adjust the volume by turning the knob and change the bonded device through a long press.
141-
* **BTHome firmware**: It integrates `Button`and `Dimmer`components, broadcasting the data in BTHome protocol. It supports Home Assistant and automatic deep sleep.
142-
* **Matter universal switch**: It implements a simple matter switch, which can be provisioned using the network qr-code.
140+
* **BLE-HID**: A BLE-HID implementation based on the [ble_hid_device_demo](https://github.com/espressif/esp-idf/tree/release/v5.4/examples/bluetooth/bluedroid/ble/ble_hid_device_demo). You can adjust the volume by turning the knob and change the bonded device through a long press.
141+
* **BTHome firmware**: It integrates `Button`and `Dimmer`components, broadcasting the data in BTHome protocol. It supports Home Assistant and automatic deep sleep.
142+
* **Matter universal switch**: It implements a simple matter switch, which can be provisioned using the network qr-code.
143143

144144

145145
## Conclusion

content/blog/2025/04/ulp-lp-core-get-started/index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ summary: "In this article, we’ll start with a quick overview of Ultra Low Powe
88
tags: ["ESP32-C6", "ULP", "ESP-IDF", "Low Power", "LP-Core"]
99
---
1010

11-
Imagine this scenario: you have finished programming your application, designed your PCB with a battery circuit, and you are finally ready to set it free by disconnecting the umbilical cord--the USB cable. But to your great disappointment, you find too soon that your small LiPo battery drains in a matter of hours.
11+
Imagine this scenario: you have finished programming your application, designed your PCB with a battery circuit, and you are finally ready to set it free by disconnecting the umbilical cord --- the USB cable. But to your great disappointment, you find too soon that your small LiPo battery drains in a matter of hours.
1212

1313
If you plan to run your application on a battery, it is of utmost importance to know how to design your hardware and software so that the application does not gobble up the power like a vacuum cleaner. Even something as simple as polling a GPIO can have a drastic impact on power consumption. Doing it the easiest way vs. using the chip's low-power features can result in an average difference of 22 mA vs. 22 µA. In other words, with your 350 mAh LiPo battery, it is the difference between it lasting 16 hours vs. 2 years.
1414

1515
In this article, we'll introduce one of the features that Espressif chips provide to achieve low-power consumption: the Ultra-Low-Power coprocessor (ULP), a processor separate from the main CPU. In a nutshell, if we run parts of our application on the ULP while the rest of the system sleeps, we can achieve much lower power consumption.
1616

17-
This article will focus on the latest iteration of the ULP--the LP-Core--available on the ESP32-C6 and a range of other new chips. For building the application, we will use ESP-IDF v5.4.
17+
This article will focus on the latest iteration of the ULP --- the LP-Core --- available on the ESP32-C6 and a range of other new chips. For building the application, we will use ESP-IDF v5.4.
1818

1919
## Low-power on Espressif chips
2020

@@ -35,21 +35,21 @@ What the ULP brings to the table in a low-power context is the ability to run ev
3535

3636
## ULP
3737

38-
The ULP is a coprocessor that operates independently from the main CPU. Its main advantage is that it is powered and clocked by a power domain controlled seperately from the rest of the system. This allows it to continue operating even while the rest of the system is in deep sleep. For more information about power domains on the ESP32-C6 see the [TRM - Low-Power Management](https://www.espressif.com/sites/default/files/documentation/esp32-c6_technical_reference_manual_en.pdf#lowpowm).
38+
The ULP is a coprocessor that operates independently from the main CPU. Its main advantage is that it is powered and clocked by a power domain controlled seperately from the rest of the system. This allows it to continue operating even while the rest of the system is in deep sleep. For more information about power domains on the ESP32-C6, see the [ESP32-C6 TRM](https://www.espressif.com/sites/default/files/documentation/esp32-c6_technical_reference_manual_en.pdf#lowpowm) &rarr; _Low-Power Management_.
3939

4040
This enables us to offload certain tasks to the ULP, such as sensor readings, while waking up the main CPU only when it is necessary for some more complex task.
4141

42-
Imagine this scenario: you're designing a smart plant-watering IoT device that measures soil humidity and waters the plant when needed. For a simple task like this, you could use the ULP to further reduce power consumption. While the rest of the system is powered down and sleeping, the ULP can periodically wake up, take measurements, as well as trigger watering action if necessary. Only when it is strictly necessary will the ULP wake up the main CPU and the rest of the system to perform actions that it cannot do--for example, to update the cloud with the latest device status over Wi-Fi.
42+
Imagine this scenario: you're designing a smart plant-watering IoT device that measures soil humidity and waters the plant when needed. For a simple task like this, you could use the ULP to further reduce power consumption. While the rest of the system is powered down and sleeping, the ULP can periodically wake up, take measurements, as well as trigger watering action if necessary. Only when it is strictly necessary will the ULP wake up the main CPU and the rest of the system to perform actions that it cannot do --- for example, to update the cloud with the latest device status over Wi-Fi.
4343

4444
To summarize what the ULP is suitable for:
4545

4646
* :white_check_mark: Save power by performing simple tasks while the rest of the system sleeps
47-
* :x: Help you achieve lower power-consumption during Wi-Fi or bluetooth connections
47+
* :x: Help you achieve lower power-consumption during Wi-Fi or Bluetooth connections
4848
* :white_check_mark: Assist main CPU by offloading simpler tasks
4949

5050
### Three generations of ULP coprocessor
5151

52-
As Espressif chips have evolved, so has the ULP. This article mainly focuses on the latest iteration of the ULP at the time of writing--the ESP32-C6's LP-Core. Some of the older chips had previous iterations. All in all, the ULP iterations are as follows:
52+
As Espressif chips have evolved, so has the ULP. This article mainly focuses on the latest iteration of the ULP at the time of writing --- the ESP32-C6's LP-Core. Some of the older chips had previous iterations. All in all, the ULP iterations are as follows:
5353

5454
![Three Generations](ulp_eval.webp)
5555

@@ -174,12 +174,12 @@ To explain a bit more what is happening:
174174
175175
[`ulp_lp_core_load_binary()`](https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32c6/api-reference/system/ulp-lp-core.html#_CPPv423ulp_lp_core_load_binaryPK7uint8_t6size_t) copies the LP-Core binary from flash into LP-RAM, which is the memory area we have reserved for the LP-Core.
176176
177-
[`ulp_lp_core_run()`](https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32c6/api-reference/system/ulp-lp-core.html#_CPPv415ulp_lp_core_runP17ulp_lp_core_cfg_t) then finally configures the LP-Core according to our config parameters. The [`wakeup_source`](https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32c6/api-reference/system/ulp-lp-core.html#_CPPv4N17ulp_lp_core_cfg_t13wakeup_sourceE) is what will trigger the LP-Core to start running, in this case we choose the LP timer, which will make the LP-Core app be re-ran periodically. This is a common use-case when we want to monitor something with the LP-Core, but we don't want it to be active all the time in order to further reduce power consumption. For more information about other wake-up sources see [ulp-lp-core-program-flow](https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32c6/api-reference/system/ulp-lp-core.html#ulp-lp-core-program-flow).
177+
[`ulp_lp_core_run()`](https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32c6/api-reference/system/ulp-lp-core.html#_CPPv415ulp_lp_core_runP17ulp_lp_core_cfg_t) then finally configures the LP-Core according to our config parameters. The [`wakeup_source`](https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32c6/api-reference/system/ulp-lp-core.html#_CPPv4N17ulp_lp_core_cfg_t13wakeup_sourceE) is what will trigger the LP-Core to start running, in this case we choose the LP timer, which will make the LP-Core app be re-ran periodically. This is a common use-case when we want to monitor something with the LP-Core, but we don't want it to be active all the time in order to further reduce power consumption. For more information about other wake-up sources, see [ulp-lp-core-program-flow](https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32c6/api-reference/system/ulp-lp-core.html#ulp-lp-core-program-flow).
178178
179179
The LP-Core now has everything it needs to run, if you selected a wake-up source which has an immediate effect (e.g. `ULP_LP_CORE_WAKEUP_SOURCE_HP_CPU`) then the LP-Core will already be running. In our example we choose the `LP_Timer` with a sleep duration of 1 second, so the first run of the LP-Core app will occur one second after calling [`ulp_lp_core_run()`](https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32c6/api-reference/system/ulp-lp-core.html#_CPPv415ulp_lp_core_runP17ulp_lp_core_cfg_t).
180180
181181
182-
### Interacting with the LP-Coe
182+
### Interacting with the LP-Core
183183
184184
We now have an app running on the LP-Core, but since the app is just an empty `main()`, it doesn't do anything and we haven't seen any proof that it is actually running.
185185
@@ -267,7 +267,7 @@ if (my_counter >= 5) {
267267
}
268268
```
269269

270-
Since we configured the LP timer to wake-up the LP-Core with a period of 1 sec, then this condition means that we will wake up the main processor on the 5th iteration, i.e., after 5 seconds.
270+
Since we configured the LP timer to wake up the LP-Core with a period of 1 sec, then this condition means that we will wake up the main processor on the 5th iteration, i.e., after 5 seconds.
271271

272272
If you now rebuild and re-flash your project, you'll see that the HP-CPU resets once every 5 second with the reset reason `rst:0x5 (SLEEP_WAKEUP)`.
273273

0 commit comments

Comments
 (0)