IocTober Day 5 - Marsuipial nesting box occupancy sensors

The 5th day of IocTober brings a project that arose from one of the IoTBNE Sunday (mad) Science workshops hosted by Accelerando.

SmS attendee “Rob”* (*actually his real name) creates nesting boxes for Wambengers, a native weasel-like marsupial related to Quolls and Dunnarts (Non-Australians, I swear I am not making these names up!). He wanted a way to know if the boxes were occupied, and how frequently the tenants were moving about.

He had gotten a good way into the project, sourcing ESP32 modules and LoRa radios from LilyGo’s AliExpress store. Having gotten beyond his expertise, Rob engaged Accelerando to complete the project. A recurring problem with off-the-shelf IoT modules is that their battery management is not up to the task of years-long runtime. We built our proof-of-concept by modifying a development board for loger runtime, removing the inefficient power supply components (linear regulator and always-on LED), substituting a dedicated power supply module suited for long-term battery power. Aggressive use of deep sleep modes in both the AVR ATMega microcontroller and AI Thinker LoRa module give us a predicted battery life of two years.

We used the phenomenal Perf+ prototyping board from Ben Wang to build the PoC modules. This proto board uses a clever combination of pad-per-hole board and double-sided stripboard to allow one-off circuits to be prototyped with no wires.

The sensor modules (featuring two infrared sensors to distinguish tenants entering and leaving each box) communicate via LoRa to a gateway module. The gateway sends data to Cesanta’s mDash which gives us a management console, failure alerts, data storage, over-the-air updates and even web hosting for a mobile Progressive Web App. For zero dollars (we subscribe anyway, because support what you love).

The gateway module also uses colour LEDs to indicate the status of each sensor (shades from green through red indicating the recency of activity).

The web application (written in two hours thanks to React’s great tooling ecosystem) shows a map of all nest boxes with information on usage.

We designed and 3D printed an enclosure that is inconspicuous, waterproof, and intended to discourage chewing by tenants.

We’ll try the sensors out on Rob’s chook shed, before their first battle deployment in the bushland of Kholo, Qld.