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

Sensor reading errors using Meter Teros modular library

Home Forums Environmental Sensors Sensor reading errors using Meter Teros modular library

Viewing 3 reply threads
  • Author
    Posts
    • #18285
      Braedon
      Participant

        I have installed several monitoring stations targeting environmental variables of interest for snow hydrology using the Mayfly as the data logger. One issue in particular that I have encountered is with logging data from my Meter Teros 12 sensors. I have three of these sensors connected to the SDI-12 pins on the Mayfly board, buried at three different depths. The code I am using is the handy modular sensors library. When I go back to look at what has been logged from the soil sensors at each station, the data shows the default error value (-9999) for all measurements from the first two sensors and reasonable/expected results for the last sensor. I have encountered this issue using both the modular sensor Meter Teros 11 library and using my own modifications to the same library to accommodate the extra reading the Teros 12 sensors collect that the 11 does not. I have taken up an extra Mayfly to my sites on a field visit to separately test the sensors using a basic SDI-12 sketch, leaving the wiring completely the same, and the sensors all read correctly. I am not sure where the issue is exactly, but I think it is in the programming. Like I mentioned, I am using the cpp and header files already created for the Teros 11 sensors, but I’ve modified it slightly to accommodate the extra reading. It should be noted that I have had similar issues solely using the Teros 11 library, not just with my modified cpp and header files for the Teros 12. a I’m not sure exactly where to start on this problem, so any help would be greatly appreciated!

      • #18286
        Sara Damiano
        Moderator

          Have you tried using the -D MS_SDI12_NON_CONCURRENT build flag: https://envirodiy.github.io/ModularSensors/group__sdi12__group.html.  Some SDI-12 sensors don’t properly support the concurrent mode that ModularSensors uses by default.  That could by why they work individually, but not all together.

        • #18287
          Braedon
          Participant

            Thanks for the quick response Sara. I have not used the build flag. Flags are not something I am familiar with, and I don’t know how to use or adjust them properly. Where would be the appropriate place to make this adjustment in the library?

          • #18289
            Sara Damiano
            Moderator

              Are you using PlatformIO or the Arduino IDE?  In PlatformIO, you can add it to the build_flag section of your platformio.ini file. Add -DMS_SDI12_NON_CONCURRENT right below the -DSDI12_EXTERNAL_PCINT line in the example ini file.  If you’re using the Arduino IDE, you need to open up SDI12Sensors.h and add the line #define MS_SDI12_NON_CONCURRENT around line 67, right below the header guard.

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.