BLE temperature beacon

An ESP32-C3 on a Li-ion cell that advertises temperature over BLE and lasts months on deep sleep.

Climate & heating Board: ESP32-C3 SuperMini Level: ●●○ ⏱ 1–2 h

⚠ Caution

Batteries: watch polarity, use protected cells and a charger with protection, never charge damaged cells unattended.

A thermometer that sends no Wi-Fi at all

A BLE node wakes up, takes one measurement, advertises it for a fraction of a second, and goes back to sleep. No connection, no router, no IP address. This is why it can live for months on a single Li-ion cell, if the rest of the circuit is careful.

Making Home Assistant understand it

Put the values in the BTHome v2 format and Home Assistant discovers the sensor by itself through any Bluetooth adapter or an ESP32 acting as a proxy. Without BTHome you can still read the manufacturer data in a second ESP32 and forward it with MQTT.

  • Put the BME280 in forced mode: one measurement, then it sleeps on its own.
  • Wake every minute or two. Faster does not improve the data, only the battery bill.
  • A TP4056 module often has two LEDs that burn the battery even when the board sleeps. Desolder them. Choose the variant with protection or use a protected cell.
  • Lithium cells lose capacity in the cold, so for an outdoor sensor expect much less in winter.

Components

  • ESP32-C3 SuperMini
  • BME280 I2C module (3.3V)
  • 18650 Li-ion cell + holder
  • TP4056 USB-C Li-ion charger with protection

Wiring

Module Module pin ESP32 pin Note
BME280 SDA / SCL I2C GPIO8 / GPIO9 C3 SuperMini default I2C pins
VCC / GND 3V3 / GND

Libraries

  • Adafruit BME280

Code

#include <Wire.h>
#include <Adafruit_BME280.h>
#include <BLEDevice.h>
#include <BLEAdvertising.h>
Adafruit_BME280 bme;

void setup() {
  Wire.begin(8, 9);
  bme.begin(0x76);
  int16_t t = (int16_t)(bme.readTemperature() * 100);
  uint16_t h = (uint16_t)(bme.readHumidity() * 100);
  bme.setSampling(Adafruit_BME280::MODE_SLEEP);
  BLEDevice::init("ESP32-TH");
  BLEAdvertising* adv = BLEDevice::getAdvertising();
  BLEAdvertisementData ad;
  String payload; payload += (char)(t & 0xFF); payload += (char)(t >> 8); payload += (char)(h & 0xFF); payload += (char)(h >> 8);
  ad.setName("ESP32-TH");
  ad.setManufacturerData(String("xFFxFF") + payload);   // test company id 0xFFFF
  adv->setAdvertisementData(ad);
  adv->start();
  delay(3000);                                  // advertise for 3 seconds
  esp_sleep_enable_timer_wakeup(60ULL * 1000000ULL);   // then sleep 60 s
  esp_deep_sleep_start();
}
void loop() {}

Build tips

  • Use the nRF Connect app to see the 0x2A6E characteristic.
  • Lower the advertising interval for a longer battery life.

What you need

Buy the parts kit · Estimated total: $10.30

ESP32-C3 SuperMini × 1
$2.50
Buy at AliExpress Buy at Amazon.com
BME280 I2C module (3.3V) × 1
$3.00
Buy at AliExpress Buy at Amazon.com
18650 Li-ion cell + holder × 1
$4.00
Buy at AliExpress Buy at Amazon.com
TP4056 USB-C Li-ion charger with protection × 1
$0.80
Buy at AliExpress Buy at Amazon.com
🇺🇦 Ukraine🌍 Other countries

Ukraine: we buy and sell these parts ourselves, order them on this site.

Some links are affiliate links: we may earn a commission at no extra cost to you.

Related ideas

⚠ Caution

Batteries: watch polarity, use protected cells and a charger with protection, never charge damaged cells unattended.

Solar-powered weather node

A small outdoor station on a Li-ion cell and a solar panel that reports temperature, humidity and pressure trend every few minutes.

  • Board ESP32-C3 SuperMini
  • Level ●●○ Intermediate
  • Build time 2–3 h
Pick parts / kit
⚠ Caution

Batteries: watch polarity, use protected cells and a charger with protection, never charge damaged cells unattended.

Orchard and greenhouse frost alert

A battery sensor that wakes up rarely and sends an alert when the temperature falls toward freezing.

  • Board ESP32-C3 SuperMini
  • Level ●○○ Beginner
  • Build time 1–2 h
Pick parts / kit
⚠ Caution

Batteries: watch polarity, use protected cells and a charger with protection, never charge damaged cells unattended.

ESP-NOW sensor network with one gateway

Several battery nodes send readings over ESP-NOW without joining Wi-Fi, and one gateway forwards them to MQTT or Home Assistant.

  • Board ESP32-C3 SuperMini
  • Level ●●● Advanced
  • Build time 2–4 h
Pick parts / kit

← All module ideas →

Comments

No comments yet. Share your experience or ask a question.

Comments are moderated.