Home › Forums › Other Data Loggers › Arduino datalogger only gives data for last connected sensor
Tagged: 5TM, arduino, datalogger, sensors
- This topic has 2 replies, 2 voices, and was last updated 2021-08-03 at 1:56 PM by Rick Vogel.
-
AuthorPosts
-
-
2021-07-13 at 2:44 PM #15667
Hello,
I am trying to set up a datalogger for continuous measurements of twelve 5TM moisture sensors. Eventually I want to read this data into LabView to sync with data from some other sensors. For right now I’m just having trouble getting the sensors to read properly.
I’m currently testing four sensors using the sample code k_concurrent_logger. I’m using a Mega2560 clone with the sensors on an external power source. The code works fine to find all of the sensors’ addresses, but when it takes measurements it will only report the last connected sensor. Any one of the sensors will connect and read individually, it’s just when I connect more than one that it only reports the last one. For example, the serial monitor reads:
Timeout value:
-9999
Scanning all addresses, please wait…
Protocol Version, Sensor Address, Sensor Vendor, Sensor Model, Sensor Version, Sensor ID
A, 1.30, DECAGON , 5TM , 400, ,
B, 1.30, DECAGON , 5TM , 400, ,
C, 1.30, DECAGON , 5TM , 400, ,
D, 1.30, DECAGON , 5TM , 400, ,
Total number of sensors found: 4Time Elapsed (s), Address, Measurement 1, Measurement 2, … etc.
——————————————————————————-
12, A, , , , , , , , , , ,
13, B, , , , , , , , , , ,
14, C, , , , , , , , , , ,
15, D, 1.0500001000, 24.9000000000
26, A, , , , , , , , , , ,
27, B, , , , , , , , , , ,
28, C, , , , , , , , , , ,
29, D, 1.0500001000, 24.9000000000
40, A, , , , , , , , , , ,
41, B, , , , , , , , , , ,
42, C, , , , , , , , , , ,
43, D, 1.0500001000, 24.9000000000I’m fairly new to datalogging and Arduino, so I’m not really sure where to start debugging. Any ideas what might be causing the issue?
Thanks in advance
-
2021-07-14 at 12:05 PM #15675
I noticed in a different example file (I think it was e_continuous_measurement) the getResults function used an “R” command instead of the “D” command and that seemed to fix the problem.
I changed
123command += "D";to
123command += "R";and now it’s getting data from all of the sensors. However, I can’t find an “R” command in the 5TM documentation anywhere. Can anyone tell me what the “R” command does?
-
2021-08-03 at 1:56 PM #15782
See page 16 4.4.8.1
http://www.sdi-12.org/current_specification/SDI-12_version-1_4-Jan-30-2021.pdf
-
-
AuthorPosts
- You must be logged in to reply to this topic.