Home › Forums › Environmental Sensors › Please Help! Meter CTD Gen2 being blocked by Yosemitech 511-a › Reply To: Please Help! Meter CTD Gen2 being blocked by Yosemitech 511-a
The ModularSensors library is running the SDI-12 sensors in “concurrent” mode and the modbus communication only happens when initiated by the logger. So the two sensors really should not be trying to talk to the logger at the same time. ModularSensors first asks each sensor to start taking a reading, then goes back and asks each one for its results in the order that they’re expected to be ready. You can try using the build flag
-D MS_SDI12_NON_CONCURRENT in your PlatformIO.ini. That will tell it to start a reading and then wait the full time for a reading to finish before the starting the next sensor. Note that the flag only affects SDI-12 sensors.
If the same code is working in some places but not in others, I would suspect the problem is electrical, not code. That is, some combination of instantaneous voltage instabilities when both sensors are working is garbling the communication. The SDI-12 library is “bit-banged” so it’s very weak to interference. Shannon or Neil may have better ideas on ways you could try to electrically isolate the sensors from each other.