OpenESPTemp is an open-source, battery-powered temperature and environmental monitoring sensor built using an ESP32-C6 and a BME280 sensor. It is designed for integration into IoT systems.
The PCB is designed to operate with a rechargeable LiFePo4 AA battery. This repository includes the PCB design, a 3D-printable case, and basic firmware.
- Temperature Monitoring: Provides readings using the BME280 sensor.
- Environmental Sensing: Includes humidity and pressure measurements.
- Low Power: Optimized for battery-powered operation (under 200nA power consumption while sleeping).
- Battery Monitoring: Allows monitoring of the battery voltage.
- ESP32-C6 Microcontroller: Handles wireless communication and processing.
- Customizable PCB: Features a Qwiic connector and the option to use an LDO when not using a LiFePo4 battery.
- Open Source: Fully customizable for specific use cases.
- OTA updates: Possibility to update the firmware over the air using ElegantOTA
The PCB can be ordered from any PCB manufacturer (e.g., JLCPCB). It can be ordered as single boards or in panels of 5.
- Manufacturing Files & BOM: Included in the latest release. The Interactive HTML BOM (iBOM) is recommended for manual assembly.
- SMT Assembly: If using an SMT service, you will need to generate the BOM and position files yourself.
π‘ Note: You will need two Keystone 53 battery contacts; the BOM only mentions one.
| Part | Quantity | Recommendation / Link | Note |
|---|---|---|---|
| LiFePo4 AA (14500) battery (!Normal AA batteries won't work!) | 1 | LiFePo4 battery | Any 3.2V LiFePo4 battery should work |
| 3D Printing Filament (PETG) | ~50g | White PETG Filament | |
| UART to USB Adapter | 1 | CP2102 Adapter | |
| Pogo Pin Adapter (Optional) | 1 | 4-Pin Prototyping Clamps | Avoids soldering to test points. |
-
Prepare the PCB: Solder the components onto the PCB (if not using an SMT service).
βΉοΈ Info: The LDO Solder Jumper is pre-closed for LiFePO4 battery use. If you choose to install an LDO, ensure you cut/open the jumper first.
π‘ Note: If using a Pogo Adapter to flash the firmware, it should be flashed before mounting the battery holders, as the battery holder blocks access to the pins with the adapter.
-
Print the Case: Print using standard settings with a 0.2 mm layer height - no supports needed.
- The case does not require any screws, it holds together with snap connections
-
Flash the Firmware: Follow the instructions below to flash, and configure Wi-Fi/REST endpoint.
-
Insert the Battery:
π Warning: Check the polarity carefully. Never connect the USB to UART adapter and the battery at the same time.
-
Wake: Press the WAK button for about a second. The sensor will start sending data periodically.
By default, the sensor connects to a specified Wi-Fi network and sends data to a REST API endpoint every 15 minutes.
The firmware also allows to update itself using Over The Air updates using ElegantOTA. Read more about that here.
π‘ Note: Newer releases include a pre-compiled
.binfile. If you use this, you can skip the compilation step.
The firmware can be compiled and flashed with PlatformIO. You can build in debug mode (to get Serial debug information) or release mode:
# Debug mode
platformio run --environment esp32-c6-debug
# Release mode
platformio run --environment esp32-c6The firmware has to be flashed via the Serial Interface once. Afterwards it can be updated with OTA updates.
Wiring: Connect the UART to USB adapter to the PCB:
| UART Adapter | Direction | PCB | Note |
|---|---|---|---|
| 3V3 | β· | 3V3 | Use 3.3V only (do not use 5V) |
| GND | β· | GND | Common ground is required |
| TX | βΆ | RX | Connect Transmit to Receive |
| RX | β΅ | TX | Connect Receive to Transmit |
βΉοΈ Info: Remember to cross the data lines! The TX (Transmit) pin on the adapter must connect to the RX (Receive) pin on the PCB, and vice versa.
π Warning: You must disconnect the battery before connecting the UART to USB adapter!
Run the following command:
platformio run --target upload --environment esp32-c6When Looking for upload port... appears in the console, put the ESP32 into boot mode:
- Push the Reset and Boot buttons at the same time.
- Release the Reset button while keeping the Boot button pressed.
- The upload will start; release the Boot button.
Flash the binary using esptool:
python -m esptool --chip esp32-c6 --port <your-port> --baud 460800 write_flash -z 0x1000 firmware.bin(Put the ESP32 into boot mode as described above, and replace <your-port> with the correct serial port.)
The firmware allows to update itself via OTA updates. For that to work the firmware has to be flashed via UART initially.
This is how to trigger a OTA update.
- Follow steps 1 and 2 of Reconfigure the device
- Open
http://192.168.4.1/updatein a browser. - Here you can upload a new binary (Either get it from the releases page or compile it yourself as described here).
- When uploading while powered by battery you should press and hold the WAK button during the update
After flashing, press the Reset button once to start the firmware. If unconfigured, the device will create a Wi-Fi network for setup:
- Connect to the
OpenESPTemp ConfiguratorWi-Fi network. - Open
http://192.168.4.1in a browser. - Configure the following fields in the form:
- SSID: Target Wi-Fi network name.
- Password: Target Wi-Fi network password.
- Post URL: The URL for the POST request.
- Authorization: The Bearer token for authentication (do not include "Bearer", only the token).
- Click submit. The configuration will be saved, and the device will restart.
- The sensor will now operate as expected.
To reconfigure the OpenESPTemp after it has already been configured once, you need do the following:
- Bring the OpenESPTemp in config mode:
- When connected to UART: Press and hold FCT button and press RST shortly. Release FCT after ~6 seconds
- When running with battery: Press and hold FCT button and press WAK for around a second. Release FCT after ~6 seconds
- The OpenESPTemp will create a network called
OpenESPTemp Configurator. Connect to it. - Open
http://192.168.4.1in a browser an reconfigure the fields. Refer to βοΈ Configuration
The OpenESPTemp aims to have a very low power consumption.
During sleep, the power consumption is below 200nA (200nA is the limit of the PPK 2, it is probably at around 50nA according to the RV3028-C7 datasheet):
The power consumption for a whole cycle (15 min with sending data once) looks like this:
The power consumption for active mode (sending data) looks the following:
The PCB was created using KiCad 9.0, the project files are located under /electronics.
The power latch used in this design was inspired by this article.
To generate a panel yourself using the provided script:
- Install KiKit.
- Execute
/electronics/panelize.sh.
The panel with the existing config looks like this:
The case was created using Onshape. To edit the case yourself click here and copy the project.
The current STL files are included in the repo under /cad.
TBD
- Include mounting bracket for the case
- Include HomeAssistant integration
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Various libraries were used to create the PCB. Copies of most libraries are included in /electronics/libs/ to ensure the KiCad project works without manual installation.
Some of these libraries are licensed under their respective licenses. Please review the README.md file in the library folders.








