Last updated on 2024-03-07
3.1 Mayfly Data Logger
View the EnviroDIY Monitoring Station Parts List
The Mayfly Data Logger (Figure 3.1.1) is a powerful, user-programmable microprocessor board that is fully compatible with open-source Arduino software. The memory card socket, real-time clock (RTC), and solar charging features make it easy to use the Mayfly Data Logger for recording data and low-power operation. The Mayfly can be powered by a 3.7 V lithium battery or through the USB port. Programming can be done through the USB port or via the FTDI header.
The Mayfly Data Logger v1.0 & v1.1 features:
- Atmel AVR ATmega 1284p processor
- 128K Flash memory, 16K RAM
- 28 digital I/O pins, eight analog pins, plus
- Two hardware serial UART ports
- Maxim DS3231 I2C connected high precision Real-Time Clock (RTC)
- Independent CR1220 battery socket to power RTC
- Texas Instruments ADS1115 I2C connected 16-bit Analog-Digital Converter for four additional high-resolution ADC pins
- MicroSD memory card socket
- Solar LiPo battery charging
- Low power consumption (6.5 mA when on and idle, 0.27-0.43 mA when in sleep mode)
- XBee module socket
- Two user-programmable LEDs, one user-programmable push button
- 3.3 V main board voltage, additional 5 V and 12 V boost circuitry for external devices
- Two 20-pin headers for accessing all available I/O pins
- Seven Grove-style sockets for easy connections to sensors and devices
- Dipswitches for deactivating the power LEDs
- Extra solar panel jack for using a quick-connect terminal
- 2 onboard sensors: digital humidity/temperature and analog light
- 8MB auxiliary onboard flash memory chip
3.2 Software
The Mayfly Data Logger runs a program defined and uploaded by the user. This program (or “sketch” as it is called in the Arduino platform) is generated by the user in an integrated development environment (IDE) with a graphical user interface (GUI). While other IDE options are available, this manual provides instructions for the use of the Arduino IDE. Arduino IDE can be installed on Windows, IOS, and Linux operating systems. Arduino is an open-source project supported by a community of users and developers. This manual provides instructions on using Arduino to program the Mayfly Data Logger, but users are encouraged to learn more about Arduino by starting with these links:
- What is Arduino?
- Basic knowledge about principles and techniques behind the Arduino ecosystem
- How the Arduino IDE v1 works
In addition to the Arduino software that runs on your computer and programs the Mayfly Data Logger, Arduino also offers a wide range of electronic hardware. The Mayfly Data Logger is a customized printed circuit board and microprocessor that are similar to other Arduino hardware products. While some Arduino hardware can be used to perform the same functions as the Mayfly Data Logger, Stroud Water Research Center created the Mayfly Data Logger to be a simple, inexpensive, and extendable alternative specifically designed for connecting and controlling environmental sensors. Nevertheless, the Mayfly Data Logger is compatible with the easy-to-use and community-supported Arduino IDE.
The programs that run a Mayfly Data Logger are diverse. Each combination of sensors, measurements, and data management requires a unique program. However, there are many programs written by Stroud Water Research Center and other Mayfly Data Logger users that can be copied and pasted into an Arduino sketch, and uploaded to the Mayfly Data Logger with no (or minimal) editing required. These programs can be found at EnviroDIY on GitHub, and are ideal for new users with little experience who want to get a Mayfly Data Logger up and running quickly, and for users who want to share their programs and associated files such as helpme documents and instructions for use. EnviroDIY relies on GitHub as a repository for programming files (sketches) and libraries, instructional documents, and further instructions.
3.3 Sensors
View the EnviroDIY Monitoring Station Parts List
A wide variety of environmental sensors can be connected to and controlled by the Mayfly Data Logger: sensors for atmospheric, soil matrix, groundwater, surface water, and other environments are available from commercial suppliers. Stroud Water Research Center does not develop sensors, only the Mayfly Data Logger to which sensors are connected. There are two main requirements for a sensor to be compatible with the Mayfly Data Logger:
- A known physical connection mechanism (i.e., labeled wires or a documented plug) and
- A known communication protocol (SDI-12, I2C, RS-485, SPI, Serial-UART, or simple Analog voltage out)
This manual instructs users on connecting and controlling two sensors:
- A combined conductivity, temperature, and depth sensor (CTD; available from Meter Group Hydros 21) – When ordering the HYDROS 21 CTD sensor, you must specify that you need the 3.5 MM STEREO PLUG on the sensor cable (because the default configuration is bare wires).
- A turbidity sensor (available from Campbell Scientific) (Figure 3.3.3). Note: The OBS3+ was discontinued in 2020, instructions in this manual for the OBS3+ sensors are for archival reference only and should not be followed unless you already have an OBS3+ sensor.
Both sensors are factory calibrated and can not be calibrated by the end user. However, for quality-control purposes it is recommended that separate calibrated handheld sensors (e.g., LaMotte PockeTester 1749) be used to cross-check the Hydros 21 CTD and Campbell OBS-3+ (see Monitoring Station Management: Quality Control).
Documentation and instructions for connecting a wide variety of sensors are available in the EnviroDIY ModularSensors GitHub library. The EnviroDIY forums and blogs are also useful resources for learning how other users have connected and controlled a wide variety of sensors.
*Note: To use a Hydros 21 CTD sensor with a mayfly data logger, you must first change the SDI-12 Address of the sensor to ‘1’ because the default address when shipped is ‘0’. To do this, follow the instructions provided in Example B: Changing the Address of your SDI-12 Sensor, then change the address to ‘1’ in the serial monitor where prompted.
3.4 EnviroDIY Monitoring Station
This manual provides instructions for making, deploying, and maintaining an EnviroDIY Monitoring Station that measures water temperature, conductivity, depth, and turbidity. This combination of sensors is one example of many different configurations that are possible for measuring surface water quality. In this example (and in many configurations of the Mayfly Data Logger and sensors), a deployed EnviroDIY Monitoring Station will consist of a waterproof box containing:
- A Mayfly Data Logger.
- A battery.
- A cellular modem and antenna.
- A solar panel to charge the battery.
- A series of sensors connected to Mayfly Data Logger.
3.5 EnviroDIY Monitoring Station Kit
View the EnviroDIY Monitoring Station Parts List
The EnviroDIY Monitoring Station Kit contains parts for building a solar-powered station that transmits real-time data across 4G LTE cellular networks to the web and is available for purchase at our online EnviroDIY shop. With proper programming, users can report their data to Monitor My Watershed or other IoT websites.
This do-it-yourself kit requires computer programming using the Arduino IDE and requires mechanical assembly. Please note:
- The kit does NOT include water sensors or a main lithium battery (we recommend this Adafruit 3.7V 4400 mAh Lithium Ion Battery Pack ), and additional installation equipment is required from your local hardware store.
- The kit does NOT come with any instructions, guides, or any other materials in the shipment because all needed information to program, build, and deploy the Monitoring Station Kit can be found within this manual.
Our instructional materials found within this manual demonstrate using the Monitoring kit with the Hydros 21 CTD sensor made by METER Group. You’ll need to order this yourself, and you must specify that you need the 3.5 MM STEREO PLUG on the sensor cable when ordering because the default configuration is with bare wire leads instead of the simple stereo plug. In Section 6 of this manual you will learn how to connect the Hydros 21 CTD to a Mayfly by first changing the address that the Hydros 21 communicates on. You will also need additional parts to install the station, and a list of suggested parts can be found later in this manual, along with a list of recommended tools.
The Monitoring Station Kit contains:
For more information and instructions on the sensor station installation process, please view the video tutorials provided under “Installing an EnviroDIY Mayfly Sensor Station” on the EnviroDIY videos page.
A step-by-step tutorial recording from our Virtual Workshop instructing how to program and assemble an EnviroDIY Monitoring station kit can be found at the links below:
- Building an EnviroDIY Monitoring Station: Virtual Workshop, Day1
- Building an EnviroDIY Monitoring Station: Virtual Workshop, Day 2
Please see the description for the EnviroDIY Monitoring Station Kit in the EnviroDIY shop for more information on shipping, payment, warranty, and returns. The EnviroDIY shop does not ship internationally.