Forum Replies Created
-
AuthorPosts
-
2020-09-01 at 5:07 AM in reply to: Campbell Scientific CS-215 SDI-12 communication issues w/ Mayfly #14548
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.
2020-07-22 at 9:38 AM in reply to: Campbell Scientific CS-215 SDI-12 communication issues w/ Mayfly #14358That 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.
2020-07-16 at 4:14 AM in reply to: Campbell Scientific CS-215 SDI-12 communication issues w/ Mayfly #14337I 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.
Attachments:
2020-04-28 at 5:16 AM in reply to: Campbell Scientific CS-215 SDI-12 communication issues w/ Mayfly #14103Hi,
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.
-
AuthorPosts