Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Nikeaulas

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Nikeaulas
    Participant

      I can confirm Sara’s idea to wait before the marking and not during seems to be more reliable, I had an issue where (rarely) the sensors did not answer to a measurement request, this seems to fixed this.

      It is hard to be 100% sure about this since it doesn’t happen often but it seems to be better this way, and since it is also SDI-12 spec compliant this is certainly the way to go.

      Nikeaulas
      Participant

        That is true, I missed this in the spec. I did not try to add it while at at “break level”.

        I’m guessing most (if not all) SDI-12 sensors wake up on a rising edge then start their timers from there. I think it will work all the same while respecting the SDI-12 spec.

        I’ve actually got a few sensors now. As soon as I’ve got the hardware to drive them, I’ll try changing the “waiting level” to a break, see if that changes anything.

        Nikeaulas
        Participant

          I left it at the “marking” level. Here is your typical CS215 SDI-12 frame with said modification to the lib. I think this is an ADDR request (I decoded it but can’t find my notes anymore).

          You can see part of the wake up frame at the beginning then the “long” 100ms wait period.

           

           

          Nikeaulas
          Participant

            Hi,

            As it seems the Enviro lib still have the same problem with the CS215, I think I actually found a fix, so i wanted to share it with you guys.

            I’ve updated the Arduino thread linked in the first post. But I’ll put the same explanation here:

            The Enviro lib does not fully respect the SDI-12 protocol. There is one important timing aspect which is completely missing from the lib. In the spec we can find the following statement:

            “A sensor must wake up from a low-power standby mode and be capable of detecting a start bit from a valid command within 100 milliseconds after detecting a break”

            In the Enviro library a SDI-12 command is directly sent after a wake up frame which is consisted of a 12ms spacing + 8.3ms marking (see sendCommand functions). I believe in most cases cases, sensors are implemented in such a way that they actually do wake up “just” after the detection of 12ms spacing (or not sleeping at all). The 8.3ms marking being more than enough time for them to wake up. The CS212 doesn’t seem to belong in that category. It takes A LOT of time for it to wake up (at least 60ms to consistently answer from what i have found out).

            Adding (in my case) a 100ms delay, between a wake up frame and a SDI-12 command , as per requested in the spec, fixed the problem, for me.

            Hope this can be helpful. If it is, I guess someone should update the lib =)

             

            Have a good day, stay safe.

          Viewing 4 posts - 1 through 4 (of 4 total)