Difference between revisions of "Environmental sensor"
(update description.) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
* Relative Humidity | * Relative Humidity | ||
* Barometric Pressure | * Barometric Pressure | ||
+ | * packet sequence number | ||
* Number of retransmits needed for previous transmission to be acknowledged | * Number of retransmits needed for previous transmission to be acknowledged | ||
Line 18: | Line 19: | ||
* radio retry limit and interval | * radio retry limit and interval | ||
* radio link mode (nrf24 bandwidth) | * radio link mode (nrf24 bandwidth) | ||
+ | |||
+ | Sensor units receive a confirmation packet in response to data packets as part of the nrf24 protocol, and this confirmation packet can be preloaded on the receiver end to contain custom data. The telemetry units check for their unit ID in this response packet and will respond to a small subset of configuration commands in it; for instance this allows changing the reporting interval without needing physical access to the unit. | ||
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. | 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. | ||
Line 44: | Line 47: | ||
|29923mS @ 6.5 uA | |29923mS @ 6.5 uA | ||
|195 uA*sec | |195 uA*sec | ||
+ | |- | ||
+ | |Total | ||
+ | |302.6 uA*sec | ||
|- | |- | ||
|} | |} | ||
− | Total 302.6 uA * 2880 | + | 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. | 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 - | + | {| class="wikitable" |
− | + | |+Worst case - maximum retransmits | |
− | + | |- | |
+ | |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. | ||
− | + | == Schematic and Layout == | |
+ | [[File:board.png|450px]] | ||
+ | [[File:schematic.png|450px]] |
Latest revision as of 21:46, 23 July 2019
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
- packet sequence number
- 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)
Sensor units receive a confirmation packet in response to data packets as part of the nrf24 protocol, and this confirmation packet can be preloaded on the receiver end to contain custom data. The telemetry units check for their unit ID in this response packet and will respond to a small subset of configuration commands in it; for instance this allows changing the reporting interval without needing physical access to the unit.
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.