Home › Forums › Environmental Sensors › Sensor reading errors using Meter Teros modular library
Tagged: meter teros 12, modular sensors, SDI-12
- This topic has 3 replies, 2 voices, and was last updated 2024-01-02 at 3:57 PM by Sara Damiano.
-
AuthorPosts
-
-
2024-01-02 at 2:39 PM #18285
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!
-
2024-01-02 at 2:54 PM #18286
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. -
2024-01-02 at 3:03 PM #18287
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?
-
2024-01-02 at 3:57 PM #18289
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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.