This Arduino library gives environmental sensors a common interface of functions for use with Arduino-compatible dataloggers, such as the EnviroDIY Mayfly. The ModularSensors library is specifically designed to support wireless, solar-powered environmental data logging applications, that is, to:
- Retrieve data from many physical sensors;
- Save that data to a SD memory card;
- Transmit that data wirelessly to a web server; and
- Put the processor, sensors and all other peripherals to sleep between readings to conserve power.
The ModularSensors library coordinates these tasks by "wrapping" native sensor libraries into a common interface of functions and returns. These wrapper functions serve to harmonize and simplify the process of iterating through and logging data from a diverse set of sensors and variables. Using the common sensor and variable interface, the library attempts to optimize measurement timing as much as possible to reduce logger "on-time" and power consumption.
Although this library was written primarily for the EnviroDIY Mayfly data logger board, it is also designed to be compatible with a variety of other Arduino-based boards as well.
Data can currently be sent to these web services:
These sensors are currently supported:
- Apogee SQ-212: quantum light sensor, via TI ADS1115
- AOSong AM2315: humidity & temperature
- AOSong DHT: humidity & temperature
- Bosch BME280: barometric pressure, humidity & temperature
- Campbell Scientific OBS-3+: turbidity, via TI ADS1115
- Meter Environmental ECH2O 5TM (formerly Decagon Devices 5TM): soil moisture
- Meter Environmental Hydros 21 (formerly Decagon Devices CTD-10): conductivity, temperature & depth
- Decagon Devices ES-2: conductivity
- External I2C Rain Tipping Bucket Counter: rainfall totals
- External Voltage: via TI ADS1115
- Freescale Semiconductor MPL115A2: barometric pressure and temperature
- Keller Submersible Level Transmitters: pressure and temperature
- MaxBotix MaxSonar: water level
- Maxim DS18: temperature
- Maxim DS3231: real time clock
- Measurement Specialties MS5803: pressure and temperature
- TI INA219: current, voltage, and power draw
- Yosemitech: water quality sensors
- Y502-A or Y504-A: Optical DO and Temperature
- Y510-B: Optical Turbidity and Temperature
- Y511-A: Optical Turbidity and Temperature
- Y514-A: Optical Chlorophyll and Temperature
- Y520-A: Conductivity and Temperature
- Y532-A: Digital pH and Temperature
- Y533: ORP, pH, and Temperature
- Y550-B: UV254/COD, Turbidity, and Temperature
- Y4000 Multiparameter Sonde
- Zebra-Tech D-Opto: dissolved oxygen
- Processor Metrics: battery voltage, free RAM, sample count
Open an issue to suggest and discuss potential changes/additions. Feel free to open issues about any bugs you find or any sensors you would like to have added.
If you would like to directly help with the coding development of the library, there are some tips here on how to set up PlatformIO so you can fork the library and test programs while in the library repo. Please take time to familiarize yourself with the terminology, classes and data structures this library uses. This library is built to fully take advantage of Objecting Oriented Programing (OOP) approaches and is larger and more complicated than many Arduino libraries. There is extensive documentation in the wiki and an enormous number of comments and debugging printouts in the code itself to help you get going.
Software sketches and code are released under the BSD 3-Clause License -- See LICENSE.md file for details.
Documentation is licensed as Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) copyright.
Hardware designs shared are released, unless otherwise indicated, under the CERN Open Hardware License 1.2 (CERN_OHL).
EnviroDIY™ is presented by the Stroud Water Research Center, with contributions from a community of enthusiasts sharing do-it-yourself ideas for environmental science and monitoring.
This project has benefited from the support from the following funders: