Experiments with running ESP32 on a upcycled [popular device] battery
In the UK there is a ready supply of 3.7v 700maH lithium cells discarded by the roadside after the [popular device] has run out of juice.
I want to see how long these things can power a ESP32 for as a simple temperature reader.
Then I want to see if I can improve on this...
Kit
1. ESP32 Lolin kit from AZDelivery with an in-built lithium charging circuit and connector.
https://www.az-delivery.uk/en/products/esp32-lolin-lolin32
2. Dallas waterproof temperature sensor (from ebay)
3. 700maH lithium cell found in the street
I connected a simple resistor divider between the battery terminals, and connected the middle to a analog in pin on the ESP32 so I can read the voltage with the device
ESPHome is the platform im using for these experiments, along with Homeassistant to read and graph the data
Notes
1. The battery polarity on the Lolin board disagrees with both the random ebay connector, and the spare 3.7v cell I bought on ebay.
2. Connecting 4.2v the wrong way causes the magic smoke to escape. The ESP side of things seems to survive, but obviously the charging circuit is dead. Lucky I bought 3 boards :)
3. ESPHome config file
Potential optimizations
- Reduce reading interval from 10s to more like 1m
- Only send updates on change
- Get a lower power board - ive heard the beatle boards are good.
- Use a mosfet or similar to disconnect the battery level sensor when not in use
- Use ESP32 deep sleep mode to sleep between readings
- On waking, use MQTT to send the data rather than a full API connection
- Use ESPNow or BLE to send the data to a partner device that then relays to ESPHome/HomeAssistant
Experiment 1 - with no thoughts toward power optimization
ESPConfig file containing a sensor that reads the battery voltage every 10s and reads the Dallas sensor every 10s and reports back to HomeAssistant via the API.
Reading the battery value (this is uncalibrated, but seems roughly correct. It drops [quite] quickly at first, probably due to me wirelessly flashing new firmware).
This will be done until it 'dies' a couple of times to get a starting point.
Initial results:
Temperature
Comments
Post a Comment