Environmental sensor
This is a small, lower power environment sensor based on Bosch's BME280 sensor, STM32L062 MCU, and Nordic NRF24L01+ short-range 2.4GHz radio. Multiple sensor boards transmit periodic readings to a local relay unit which packages received metrics and forwards them via TCP/IP to a data collection system via Wifi. The radio-to-internet relay is based on the ESP32 platform and uses both a NRF24L01+ radio and the ESP32's onboard Wifi.
Telemetry includes:
- Battery voltage
- Temperature
- Relative Humidity
- Barometric Pressure
- Number of retransmits needed for previous transmission to be acknowledged
There is a configuration utility that can be flashed before installing the operating code which allows configuration of:
- battery measurement voltage divider coefficient
- unique unit identifier string
- telemetry transmission interval
- radio target address and channel number
- radio retry limit and interval
- radio link mode (nrf24 bandwidth)
The goal of the sensor board design was reliability and long-term unattended operation. In standard configuration metrics are sent around every 30 seconds, and when sleeping between readings it draws single-digit microamps. Energy consumption is dominated by the radio's current draw while transmitting, so to some degree it depends on the local RF environment and how often retransmits are necessary, but this can be offset by limiting the maximum retry count or using a different nrf24 bandwidth mode.
Measured energy consumption in actual use suggests long battery lifetimes such that there is essentially no need to provide for external charging, eg via solar or other scavenging.
Best case - packet received and acknowledged on first try.
- 66 mS at 1.1mA = 72.6 uA*sec
- 1 mS at 20mA = 20 uA*sec
- 10ms @ 1.5mA = 15 uA*sec
29923mS @ 6.5 uA = 195 uA*sec
Total: 302.6 uA * 2880 sec/day = 0.242 mAH/day
On a 2600 mAH AA-size primary lithium thionyl chloride cell, this suggests a runtime approaching 30 years, though of course in reality lifespan will be limited by the physical degradation of the battery and other components.
Worst case - every packet requires maximum retry count (e.g., due to no receiver present, or heavy RFI)
- 259 mS at avg 2.6mA = 673 uA*sec
- 29741 mS at 6.5 uA = 190 uA*sec
Total: 863 uA*sec * 2880 sec/day = 0.690 mAH/day, or about 10 years on a 2600 mAH AA-size primary lithium thionyl chloride cell.