Solar, Battery Temperature Logger
This was one of my first projects and the only battery powered one to date. This is actually build number three (V2.1).
As noted on my Weather Station project I will build the BME280 into that on the next build.
Build
Parts
My parts list was generally as follows:
Part | Description |
---|---|
ESP8266 | V3 NodeMcu 4M bytes development board based ESP8266 ESP-12E for arduino CP2102 |
Charger | DFRobot Solar Lipo Charger (3.7V) V1.0 |
Sensor | BME280 5V 3.3V Digital Sensor Temperature Humidity Barometric Pressure Sensor Module I2C |
Solar Panel | 5VDC Solar Panel Power bank 840 mA |
Battery | Lithium Ion Polymer Battery - 3.7v 2500mAh |
In adddition I have a voltage divider between the battery output and pin A0 so I can measure the battery voltage.
ESPHome Code
I use ESPHome within my Home Assistant envirionment.
As this device goes into sleep mode I have used my mqtt broker to transport the data in lieu of the Home Assistant API:
esphome:
name: e6_hillair
platform: ESP8266
board: nodemcuv2
wifi:
ssid: !secret esp_wifi_ssid
password: !secret esp_wifi_pword
manual_ip:
static_ip: 192.168.0.220
gateway: 192.168.0.1
subnet: 255.255.255.0
mqtt:
broker: 192.168.0.10
username: !secret mqtt_uname
password: !secret mqtt_pword
on_message:
topic: e6_hillair/ota_mode
payload: 'ON'
then:
- deep_sleep.prevent: deep_sleep_1
ota:
logger:
i2c:
# sda: D2
# scl: D1
# scan: True
deep_sleep:
run_duration: 15s
sleep_duration: 10min
id: deep_sleep_1
sensor:
- platform: adc
pin: A0
name: "Battery"
update_interval: 5s
filters:
- multiply: 13.6666667
- platform: bme280
temperature:
name: "BME280_temperature"
id: t1
pressure:
name: "BME280_pressure"
id: p1
humidity:
name: "BME280_humidity"
id: h1
address: 0x76
update_interval: 5s
Last update: April 2, 2021