Arduino-SDI-12 icon indicating copy to clipboard operation
Arduino-SDI-12 copied to clipboard

Can not read measurements

Open ErezFeuer opened this issue 2 years ago • 8 comments

Hi

I am trying to use this library to interface Acclima soil sensors (TDT and with TDR315H) with Arduino/ESP32. When connecting the sensors and using the d_simple_logger.ino example sketch (after changing the DATA_PIN to fit my connections) I get communication with the sensors as their addresses and information show up. It seems that they immediately respond to the M! command with the time and number of measurements, but no measurements are retrieved after D0!. I have tried a few other examples with no success. I used different boards as well - ESP32 (pin 32), Arduino nano (pin 7) and Arduino Mega 2560 (pin 11), with all I get the same behavior.

They are all powered with 12v from a bench power supply, the data wires are all connect to the same pin on the microcontroller and the grounds are all connected.

In the image below, you can see the serial print that I get (using Arduino Mega 2560): image Thanks Erez

ErezFeuer avatar May 22 '22 19:05 ErezFeuer

That's strange. The sensors are giving clear responses to the information requests, so the library is working. I have no idea why it would fail for the data commands.

Have you tried adjusting the "extra wake time" parameter when you send the commands? Per specifications, sensors are allowed to have up to 100ms "extra" time after a break before they have to be ready to receive a command. I doubt it would help you in this case, since the sensors are responding to non-data commands, but you might try it.

Are the results the same for the concurrent measurement requests?

SRGDamia1 avatar May 24 '22 19:05 SRGDamia1

Thanks for the suggestions. I have tried now:

  • sendCommand(command,100) for both M! and/or D0!
  • k_concurrent_logger.ino example with and without the extra time after a break

Still same results...

ErezFeuer avatar May 25 '22 02:05 ErezFeuer

Have you tested it with a non-Arduino logger? Does it work with that?

SRGDamia1 avatar May 27 '22 13:05 SRGDamia1

That's strange. The sensors are giving clear responses to the information requests, so the library is working. I have no idea why it would fail for the data commands.

Have you tried adjusting the "extra wake time" parameter when you send the commands? Per specifications, sensors are allowed to have up to 100ms "extra" time after a break before they have to be ready to receive a command. I doubt it would help you in this case, since the sensors are responding to non-data commands, but you might try it.

Are the results the same for the concurrent measurement requests?

That's strange. The sensors are giving clear responses to the information requests, so the library is working. I have no idea why it would fail for the data commands.

Have you tried adjusting the "extra wake time" parameter when you send the commands? Per specifications, sensors are allowed to have up to 100ms "extra" time after a break before they have to be ready to receive a command. I doubt it would help you in this case, since the sensors are responding to non-data commands, but you might try it.

Are the results the same for the concurrent measurement requests?

Hi,

I have encountered the similar issue. Three Acclima sensors of different models (TDR 315H, TDR315L and TDT) were tested with both Arduino Uno and ESP32. All of them seems responded to the command but the it was unable to retrieve sensor response of TDR 315L. while the other two were working well. I tried both adjusting the extra wake time to 100ms, but no luck for both Uno and ESP32. I tested them with Apogee USB-SDI12 adapter, and the TDR 315L was working well. Any clues? Screenshot 2022-10-08 192834 Screenshot 2022-10-08 194610

duojianghuji avatar Oct 08 '22 22:10 duojianghuji