Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here
  1. Home
  2. Knowledge Base
  3. EnviroDIY Monitoring Station Manual
  4. 5. Programming and Activating an EnviroDIY Monitoring Station

5. Programming and Activating an EnviroDIY Monitoring Station

Print this page

5.1 Uploading the EnviroDIY Monitoring Station Sketch

This manual provides instruction for building, deploying, and maintaining an EnviroDIY Monitoring Station with a CTD sensor. The sketches described in this section enable the Mayfly Data Logger to control a Meter Hydros 21 CTD sensor which measures conductivity (μS/cm), temperature (degrees C), and depth (mm). The Mayfly Data Logger also has an internal air temperature sensor (within the logger box) and records battery level; see Appendix B: Example Data). The Mayfly Data Logger is typically programmed to record data every five minutes to the microSD card. Additionally, the EnviroDIY Monitoring Station can report data to a website like MonitorMyWatershed.org if cellular service is available at the deployment location. The current standard method for transmitting data to the portals is via 4G LTE cell signal.

The sketches needed to run this particular combination of sensors can be found in the EnviroDIY ModularSensors GitHub library.

For EnviroDIY Monitoring Stations without cellular service, copy and paste the contents of the ino file DRWI_NoCellular.ino into a new (blank) sketch. More details on this program are available in the DRWI_NoCellular examples on GitHub.

If, instead, the user intends to connect the EnviroDIY Monitoring Station to the internet via 4G LTE cellular signal and have data automatically reported to MonitorMyWatershed.org, then the sketch used will depend on which LTE cellular module is being used.

Edit the sketch with the logger ID, calibration coefficients (for turbidity if used), Universally Universe Identifiers, and the Sampling Feature. Instructions for obtaining the Registration Token, Universally Universe Identifier, and Sampling Feature that describe a site and associated sensors are provided below (see Registering a Station on MonitorMyWatershed.org).  If you station does not have a Campbell OBS3+ turbidity sensor, then you should remove the sections of the code that relate to the turbidity sensor.

After uploading the program to the Mayfly Data Logger, you should use the IDE’s Serial Monitor to ensure that the Mayfly Data Logger is correctly detecting the sensors and making an internet connection (if enabled for cellular connection). The initial “setup” portion of the program after the board is powered or reset takes up to two minutes. Once the setup is finished, you can press the black D21 button (labeled D, Figure 3.1.1) at any time to enter a sensor testing mode where the current sensor values will be printed to the serial port monitor.

5.2 Registering a Station on MonitorMyWatershed.org

Users may want to share their data publicly via the Data Sharing Portal at MonitorMyWatershed.org. In addition to the benefits of sharing data publicly, Monitor My Watershed also allows users to visualize their data using the Time Series Viewer. Time Series Viewer is an interactive graphing program that allows comparison of sites and sensor data. In order for the data from an EnviroDIY Monitoring Station to be displayed online on Monitor My Watershed, the user must sign up and register a site. After a site has been established, data from a EnviroDIY Monitoring Station can be provided to the website automatically with a cellular connection or manually uploaded. In either case, the first step is to register a site by following these steps:

  1. Go to MonitorMyWatershed.org
  2. Click “Log In” in the upper right-hand corner or “Sign Up” and follow the instructions.
    1. Enter first and last names. Please note that your first and last name will be displayed publicly with your data; if you do not want your name to be visible, please do not sign up for an account.
    2. Enter email address.
    3. Choose a username.
    4. Choose a password.
    5. Enter your affiliated organization, creating a new organization if the group you belong to does not already exist in the drop-down list (optional).
    6. Click agree- “I agree to the Monitor My Watershed Terms of Use and that all data I post to this site will be made public according to the Creative Commons Attribution Share Alike License (CC-BY-SA).”
    7. Click “REGISTER USER.”
  3. After registering, click “Log In” and use the information just created in the sign-up section as your new login information.
  4. Click on “My Sites” next to the Monitor My Watershed logo at the top of the page.
  5. Scroll down to the blue box and click “REGISTER A NEW SITE.”
    1. Enter Site Code: a brief and unique text string to identify your site (e.g., “Del_Phil”).
    2. Enter Site Name: a brief but descriptive name for your site (e.g., “Delaware River near Phillipsburg”).
    3. Enter Site Type: select the type of site you are deploying from the drop-down menu (e.g, choose from site types such as: Atmosphere, House, Soil hole, Stream, Weather station, Other, and more).
    4. Enter the following optional information: stream name, major watershed, sub basin, closest town, notes, elevation, and elevation datum.
    5. Coordinates: Enter the latitude and longitude of your site location in decimal degrees (e.g., 40.02581, -75.82938). If you do not know the latitude or longitude of your site, you can zoom in on the map and select the location of your site on the map. Doing this will automatically populate the latitude, longitude and elevation fields.
    6. Check the box that says “Notify me if site stops receiving sensor data” if appropriate. When selected, you will receive an email if the server hasn’t received data from your station after 6 hours.
    7. Confirm the information you provided by clicking “REGISTER SITE”; a new page displays the details of your site.
  6. Scroll down to “Sensor Observations at This Site” and click “MANAGE SENSORS”.
    1. Click the blue “+” button to Add New Sensor.
      1. Select the appropriate drop-down for the sensor manufacturer, model, measured variable, units, and sampled medium.
      2. Optionally, add the height above or below the water surface in meters and notes about the sensor.
      3. If you do not see your sensor in the list of equipment models send an email to help@monitormywatershed.org with a request to add a new sensor. Please provide in this email the manufacturer and make/model information for the sensor, as well as a link to a website description if available.
      4. Click “ADD NEW SENSOR” after entering all of the information.
      5. Repeat these steps for each additional sensor being used at the site.

Once a site and its associated sensors has been generated at Monitor My Watershed, the user has two options for reporting data to that site.

Option 1: Automatic Reporting. Cellular-enabled EnviroDIY Monitoring Stations will automatically report data to Monitor My Watershed if configured with the appropriate tokens and UUIDs. On the Site’s page, click “VIEW TOKEN UUID LIST” at the top right corner. Copy and paste the registration token, sampling feature, and sensor UUIDs into the appropriate sections of the Mayfly Data Logger sketch as discussed at github.com/EnviroDIY/ModularSensors/tree/master/examples/DRWI_CitSci.

Option 2: Manual Upload. EnviroDIY Monitoring Stations that are not connected via cellular network will not automatically report data to Monitor My Watershed, however, the user can manually upload data stored on the Mayfly’s microSD card. Remove the card from the Mayfly Data Logger and insert into an SD card adapter that can be used with your computer. Follow these instructions on formatting the SD card’s data for upload to Monitor My Watershed.

5.3 Activating Cellular Service

If cellular LTE coverage is available at the location where the EnviroDIY Monitoring Station is deployed, the Mayfly Data Logger can automatically send data via cellular signal to the Monitor My Watershed website. A cellular data plan will need to be activated and paid for by the owner of the monitoring station. The cellular plans that are used for the EnviroDIY Monitoring Stations Kit are through Hologram because a Hologram SIM card is included with the station kit.  In order for the cell phone modules inside the Mayfly Data Logger monitoring station to access the internet, there must be an activated data plan for each station. Activating the cellular network plan prior to installation is important to assess the functioning of the monitoring station during initial installation. If the cell plan is activated, once the Mayfly Data Logger is turned on, data will start to transmit to Monitor My Watershed immediately (after the initial warmup) on every five-minute interval. The company we use for hosting our cellular data plans is called Hologram, and monthly costs are around $5-10 per station. Once a station is installed and cell coverage is confirmed, it is recommended that cell data plans be prepaid in advanced with enough funds to cover 6-12 months so there are no lapses in subscriptions and loss of service. Sign up for an account and activate the cellular network SIM card at Hologram, and use the Hologram Dashboard on their website for managing you SIM card subscriptions and payments.


Was this article helpful?

Can’t Find the Answer?

If you’ve searched the knowledge base and still need help, please post on the forum.
Go to the Forum