This node is based on the Adafruit Feather 32u4 board.
An ultra-sound sensor measures distance to a target (2-350cm range).
Measured distance, battery voltage and some optional I/Os are then periodically published to the TTN servers over LoraWan protocol.
In deep-sleep the Feather board consumption is 300uA, ie. too high for our purpose. Low power / long battery life is therefore achieved by shutting down the Feather board completely between measurements.
This is done by using the Adafruit TPL5110 breakout board.
A potentiometer on the TPL5110 enables the adjustment of the measurement periodicity between 0.1sec to 2 hours.
Code execution takes roughly 100ms.
Power consumption is approx. 20mA during that time and a negligible residual current of 50nA is drawn from the battery when the board is off.
Theoretical battery lifetime with a 500mAh LiPo is over a year for a periodicity of 60 seconds between measurements (http://www.of-things.de/battery-life-calculator.php).
Home automation integration example (JEEDOM)