EnviroDIY / Arduino-SDI-12

An Arduino library for SDI-12 communication with a wide variety of environmental sensors. This library provides a general software solution, without requiring any additional hardware.
https://github.com/EnviroDIY/Arduino-SDI-12/wiki
BSD 3-Clause "New" or "Revised" License
164 stars 100 forks source link

Corrupted data on SDI-12 interface #60

Open tsujido3r opened 4 years ago

tsujido3r commented 4 years ago

While trying SDI-12 library with 2 Arduino nano boards, one as an SDI-12 slave and another as a Datalogger, I am getting junk values on the device serial monitor while requesting for data (D0!)

I am using the default examples: Datalogger - f_basic_data_request Sensor - h_SDI-12_slave_implementation

image

Any idea on what could be causing these errors? I am not sure if it's on the SDI data line or data corruption or the serial print issues.

SRGDamia1 commented 4 years ago

Hm. Do you have any pull-ups on the data line? Maybe the internal pull-ups aren't enough to overcome noise. Do you have long cables between the two boards? Can you shorten them? Do you have any SDI-12 sensors you can test against? Does it work when talking to one of those?

tsujido3r commented 4 years ago

I suppose you meant the pulldown, its around 1M ohm. The cable is not long, it's just a jumper cable 10cm in length. That's why I suspect the memory overruns or excessive/incorrect use of String as the main culprit, rather than the line noise.

Currently, I don't have SDI-12 sensor to test against, sorry. Would it be possible for you to test these two applications against each other(as a sensor and datalogger) in two different arduino dev boards? If you could also verify this, it will be really helpful.

Thanks in advance.