ModularSensors
An Arduino library to give environmental sensors a common interface of functions for use with Arduino-framework dataloggers, such as the EnviroDIY Mayfly.
Install / Use
/learn @EnviroDIY/ModularSensorsREADME
ModularSensors<!--! {#mainpage} -->
The EnviroDIY ModularSensors Library<!--! {#mainpage_intro} -->
If you're new to EnviroDIY, I suggest you check out the Just Getting Started section of the documentation!
This Arduino library gives environmental sensors a common interface of functions for use with Arduino-compatible data loggers, 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.
There is extensive documentation available in the ModularSensors github pages including details of the class structures and example code.
<!--! @tableofcontents --> <!--! @m_footernavigation --> <!--! @if GITHUB --> <!--! @endif -->Supported Sensors<!--! {#mainpage_supported_sensors} -->
For some generalized information about attaching sensors to an Arduino style board, see the Sensor Notes page.
- Processor Metrics: battery voltage, free RAM, sample count
- Maxim DS3231: real time clock
- Analog Electrical Conductivity: conductivity
- ANB Sensors pH Sensor: pH
- AOSong AM2315: humidity & temperature
- AOSong DHT: humidity & temperature
- Apogee SQ-212: quantum light sensor, via TI ADS1115
- Atlas Scientific EZO Sensors
- Bosch BME280: barometric pressure, humidity & temperature
- Bosch BMP388 and BMP390: barometric pressure & temperature
- Campbell Scientific OBS-3+: turbidity, via TI ADS1115
- Campbell Scientific ClariVUE10: turbidity
- Campbell Scientific RainVUE10: precipitation
- Decagon Devices ES-2: conductivity
- Decagon Devices CTD-10: conductivity, temperature & depth
- Everlight ALS-PT19 Analog Light Sensor (via processor ADC)
- External Arduino I2C Rain Tipping Bucket Counter: rainfall totals
- Freescale Semiconductor MPL115A2: barometric pressure and temperature
- Geolux HydroCam
- GroPoint Profile GPLP-8 Eight-Segment Soil Moisture and Temperature Profiling Probe
- In-Situ RDO PRO-X: dissolved oxygen
- In-Situ SDI-12 TROLLs: pressure, temperature, and depth
- Keller Submersible Level Transmitters: pressure and temperature
- MaxBotix MaxSonar: water level
- Maxim DS18: temperature
- Measurement Specialties MS5803: pressure and temperature
- Meter Environmental Soil Moisture Probes: soil Ea and volumetric water content
- Meter Environmental Hydros 21: conductivity, temperature & depth
- Northern Widget Tally Event Counter: number of events
- PaleoTerra Redox Sensor: redox potential
- Sensirion SHT40: humidity & temperature
- TI ADS1115: external voltage with support for divided current
- TI INA219: current, voltage, and power draw
- Turner Cyclops-7F: various parameters
- Vega Puls 21: radar distance
- 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
- Y513-A: Self-Cleaning Blue-Green Algae Sensor
- Y514-A: Optical Chlorophyll and Temperature
- Y520-A: Conductivity and Temperature
- Y532-A: Digital pH and Temperature
- Y533: ORP, and Temperature
- Y551: UV254/COD, Turbidity, and Temperature
- Y560: Ammonium, Temperature, and pH
- Y700: Pressure and Temperature
- Y4000 Multi-parameter Sonde
- Zebra-Tech D-Opto: dissolved oxygen
Data Endpoints<!--! {#mainpage_data_receivers} -->
Within ModularSensors, the "dataPublisher" objects add the functionality to send data to remote web services. The currently supported services are the Monitor My Watershed data portal, ThingSpeak, the Ubidots IoT platform, Amazon Web Services IoT Core, and Amazon Web Services Simple Storage Service (S3).
- [Monitor My Watershed/EnviroDIY D
