Difference between revisions of "Environmental sensor"
Line 73: | Line 73: | ||
== Schematic and Layout == | == Schematic and Layout == | ||
+ | [[File:board.png|450px]] | ||
+ | [[File:schematic.png|450px]] |
Revision as of 23:17, 19 November 2018
Design
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.
Energy Consumption
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. Sleep current has a temperature component as well as a varying with battery voltage and can range from 4.5 to 6.5 uA under normal conditions.
Best case - packet received and acknowledged on first try.
Readings | 66 mS at 1.1mA | 72.6 uA*sec |
Transmit | 1 mS at 20mA | 20 uA*sec |
LED flash | 10ms @ 1.5mA | 15 uA*sec |
Sleep | 29923mS @ 6.5 uA | 195 uA*sec |
Total | 302.6 uA*sec |
Total 302.6 uA*s/cycle * 2880 cycles/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.
Read & transmit | 259 mS @ avg 2.6mA | 673 uA*sec |
Sleep | 29741 mS at 6.5 uA | 190 uA*sec |
Total | 863 uA*sec |
Total: 863 uA*sec/cycle * 2880 cycles/day = 0.690 mAH/day, or about 10 years on a 2600 mAH AA-size primary lithium thionyl chloride cell.