This repository contains top-level Arduino sketches for the Catena 4xxx family of LoRaWAN remote sensors made by MCCI based on the Adafruit LoRa Feather M0 LoRa, Adafruit Feather M0 Basic and so forth.
This repository is the top-level repository for the software. In order to build, you will have to download a number of additional repositories from the MCCI Catena github page; the repositories needed vary depending on the node image you want to build. A bash script is provided to simplify this process.
There are two kinds of apps here: test programs (catena4410_test1, catene4410_test2, catena4410_test3, catena4450_test1), and full sensor programs (catena4410_sensor1, catena4420_test1, catena4450_sensor1).
Most of the apps take advantage of the MCCI arduino-lorawan library to cleanly separate the application from the network transport. The application also uses the RTCZero library to sleep the CPU, and how to use a variety of sensors. It's also a worked example of handling OTAA provisioning without putting keys in your primary repository.
This is the application written for the Catena 4450 power monitoring node used in the Ithaca Power Project. It uses FRAM-based provisioning (so there is no need to edit code to change LoRaWAN keys or other settings).
This is the application written for the Tzu Chi University / Asolar Hualian research farm project. One firmware image is used for a variety of sensors. You can configure a given sensor as a general purpose device or as a specific subset, referencing back to the Atmel SAMD21 CPU's unique identifier. All provisioning is done at compile time, but the network keys and other sensitive information is placed in a special library that is outside the normal set of repositories.
This is the primary test app used when bringing up and provisioning Catena 4410 units for use with The Things Network.
These are simpler test programs. They were rarely used after test3 was ready, but they may be useful for test of future Catena 441x variants with different sensor configurations.
A number of libraries are required by this code. catena4450m101_sensor1
contains a Bash script git-boot.sh
that can be used to download all the libraries, using a simple database stored in git-repos.dat
.
- MCCI's Fork of Adafruit's ArduinoCore-SAMD has the minor changes needed to update the millisecond clock after resuming from deep sleep. These changes are important because some softawre depends on this to track real time. Instructions for installation are given in the README for the Catena 4450M101 Sensor app.
- MCCI's Fork of the RTCZero library has the somewhat more substantial changes needed to allow the various processor sleep modes to be accessed, and to allow for some debuggging of the sleep mode chosen.
- MCCI's Catena 4410 (and other) library has a hierarchical way of representing the hardware we're running on. It starts with a SAMD21, then adds successively more-specific objects.
- MCCI's Arduino-LoRaWAN library is a structured wrapper for the Arduino LMIC library.
- MCCI's Ardino LMIC library is MCCI's fork of The Things Network New York Arduino LMIC code.
- MCCI's ADK is MCCI's general-purpose cross-platform "XDK" library, ported to the Arduino environment.
- MCCI's Adafruit BME280 library is used to make temperature, humidity and barometric pressure measurements using the Adafruit BME280 breakout board, which we connect via I2C. It's based on the Adafruit library, but updated so that temperature, humidity and pressure are all read at the same time, to avoid data instability.
- The OneWire and Arduino Temperature Control Library are used for making measurements from Dallas-Semiconductor-based temperature sensors such as the immersible sensor from Adafruit.
- The Adafruit Sensor Library and the Adafruit TSL2561 Lux Sensor Library are used for making ambient light measurements with the Adafruit TSL2561 Lux Sensor
- The SHT1x library is used for measuring soil temperature and humidity using the Adafruit SHT10 sensor.
- MCCI's Fork of the Map The Things Arduino Sketch contains, on the MCCI-Catena branch, a port of that app supporting OTAA, using the Catena libraries.
- MCCI's Catena Hardware Repository contains hardware design information and schematics.
MCCI work is released under the MIT public license. All other work from contributors (repositories forked to the MCCI Catena github page) are licensed according to the terms of those modules.
Support inquiries may be filed at https:://portal.mcci.com or as tickets on github. We are very busy, so we can't promise to help; but we'll do our best.
Commercial support is also available; contact MCCI for more information via our support portal or our web site.
Thanks, Acknowledgments, Notes
Thanks to Amy Chen of Asolar, Josh Yu, and to Tzu-Chih University for funding the Hualian Garden project.
Further thanks to Adafruit for the wonderful Feather M0 LoRa platform, to The Things Network for the LoRaWAN-based infrastructure, to The Things Network New York and TTN Ithaca for the inspiration and support, and to the myriad people who have contributed to the Arduino and LoRaWAN infrastructure.
MCCI and Catena are registered trademarks of MCCI Corporation.
This document composed with StackEdit.