OpenESPTemp is an open-source, battery-powered temperature and environmental monitoring sensor built using ESP32-C3 and a BME280 sensor. It can easily be integrated into IoT systems.
This repository includes a pcb design, a 3d printed case and basic firmware.
- Temperature Monitoring: Accurate readings with the BME280 sensor.
- Environment Sensing: Includes humidity and pressure measurements.
- Low Power: Optimized for battery-powered operation.
- Battery Monitoring: Allows to monitor the battery voltage.
- Open Source: Fully customizable for your specific needs.
- ESP32-C3 Powered: Leverages the capabilities of the ESP32-C3 for efficient wireless communication and processing.
To get started you first need a version of the pcb using the manufacturing files included in the latest release.
I got my pcb assembled from PCBWay.
I noticed JLCPCB has troubles assembling the pcb as the bme280 can only be assembled with their standard smt service which does not support such small pcbs.
- If you want to assemble the pcb yourself please lookup the files in the BOM from the latest release.
Part | Quantity | Link (recommendation) | Note |
---|---|---|---|
3D Printing Filament (PETG) | 40g | PETG Filament | |
TPU Filament | 2g | TPU Filament | |
M2.5 Heat Inserts | 7 | Heat Inserts | |
M2.5 x 12 Screws | 4 | M2.5 x 12 Screws | |
M2.5 x 6 Screws | 3 | M2.5 x 6 Screws | |
Keystone 204 Battery Clips | 2 | Battery Clips | |
JST PH 2-Pin Cable (Male) | 1 | JST PH 2-Pin Cable | |
CR123A battery | 1 | CR123A | |
UART to USB Adapter | 1 | Adapter |
- Get a PCB and prepare it by soldering the components onto it (if not already done through SMT assembly)
- Print the case (and the seal) with standard print settings and a layer height of 0.2 mm
- Insert the Heat Inserts into the holes provided using a soldering iron
- Solder both wires of the JST Cable onto a battery clip and press them into the space into the top part of the case
- Put the seal onto the top part of the case and the 4 small parts on the nubs where the pcb will go to protect it from scratches
- After flashing the firmware (described in the next chapter) you can screw the pcb into place
- Insert the battery (Check the polarity and never connect USB to UART and battery at the same time) and connect the battery cable to the pcb
- The sensor should start sending data
- You can screw the top part of the case onto the bottom part
- The firmware can be compiled and flashed with PlatformIO.
- By default the sensor connects to a given WIFI network and sends data every 15 minutes to a given api endpoint.
- To be able to build the firmware you need to configure the firmware first.
- For that you need to create a file called
SECRETS.h
under /firmware/generic/src/
The file should look like that:const char* wifi_ssid = "Your wifi ssid"; const char* wifi_pswd = "Your wifi password"; const char* post_url = "your api endpoint the data should be sent to"; const char* x_access_token = "your Bearer token for the Authorization header";
- You can build the project in debug mode to get debug information over UART or in release without debug information:
platformio run --environment esp32-c3-debug platformio run --environment esp32-c3
- First you have to connect the UART to USB Adapter to the Pcb.
- I use a Pogo Pin Adapter for that and don't solder the Pin header at all.
- The wiring should look like this:
NOTE: When connecting the UART to USB adapter your must disconnect the battery beforehand!
- To flash using PlatformIO use the following command:
- platformio run --target upload --environment esp32-c3
- When you see
Looking for upload port...
in the console you have to put the ESP32 in boot mode:- Push the Reset and the Boot button at the same time
- Release the Reset button while keep pressing the Boot button.
- The upload should now start and you can release the Boot button.
The PCB for OpenESPTemp includes the following features:
- Voltage Divider: Allows monitoring of battery health.
- Exposed UART Header: Facilitates flashing and serial communication.
- JST 2-Pin Connector: For connecting a battery.
- BME280 Environmental Sensor: Measures temperature, humidity, and pressure.
- ESP32-C3: Powers the sensor and handles wireless communication and processing.
The PCB for OpenESPTemp was designed using Flux. A copy of the project is included under electronics, but you can also view the current version here: Project Link.
Future versions of the OpenESPTemp hardware will transition to KiCad.
TBD
- Move pcb to KiCad
- Include mounting bracket for the case
- Include HomeAssistant integration
- Use ESP32-C6 to add ability to use Thread / Matter / Zigbee
- Use Low Power Timer with Power Latch to further reduce power consumption
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.