Home › Forums › Environmental Sensors › Hydros 21/Decagon CTD: reading error
- This topic has 7 replies, 4 voices, and was last updated 2022-06-16 at 5:19 PM by
Shannon Hicks.
-
AuthorPosts
-
-
2020-07-27 at 1:42 PM #14387
This being our first year implementing our EnviroDIY unit, we are trying to keep it simple and are only using one sensor: the Hydros 21 (which, if I am not mistaken, is also known as the Decagon CTD). Since it is so simple, compared to other units, I am slightly embarrassed to admit that I cannot seem to get any readings from the sensor. Each time it returns the error reading of -9999.0. I had this happen with some of the sensors used in learnEnviroDIY (e.g. the DS18B20) but after some fiddling with the connection I got it to return data successfully. With the Hydros, I have quickly run out of ideas of ways to fiddle around with it.
Here are my details:
- I am using the code from the DRWI_LTE example because it used the Hydros 21. I removed all of the parts relating to the Campbell turbidity meter. The code can be found here: https://github.com/EnviroDIY/ModularSensors/blob/master/examples/DRWI_LTE/DRWI_LTE.ino
- My hardware has the XBee connection and battery but I do not have my solar up and running yet. My last battery reading was 4.882 volts. MY hydros 21 has the 3.5mm stero plug and is connected to pin 7. See attached pictures of my setup.
- Snippet jpeg images of the code script and output are also attached. While not in the photos, I will mention that I made sure to check that my variable list and UUID are in the correct order. Everything is uploading to MMW successfully.
Any ideas?
-
2020-07-27 at 4:02 PM #14392
Are you sure you’re SDI-12 address is set correctly? You can use this program to check/change it: https://github.com/EnviroDIY/ModularSensors/blob/master/tools/sdi12_address_change/sdi12_address_change.ino
-
2020-07-27 at 4:22 PM #14393
As Sara suggested, the issue is probably related to the SDI-12 address of the sensor. Meter Group ships all of their sensors with a default SDI-12 address of “0” (zero). They do this because it’s the channel their sensors need to be programmed to for working with their own brand of dataloggers. But Meter group sensors don’t respond to SDI-12 commands unless they are programmed to anything other than 0. The DRWI_LTE example sketch you’re using is looking for the sensor on channel 1, so the easiest thing is to use the address changing sketch Sara linked to change the sensor channel to 1. Then reprogram your Mayfly with the logging sketch and it should work.
-
2020-07-27 at 5:08 PM #14394
It worked! Thank you, thank you! I very much appreciate all the help.
-
2022-06-02 at 12:11 PM #17065
Hello all. I have recently been delivered two of the newest versions of the Hydros 21 CTD sensors. They are replacing two that were destroyed after a year in the field. Anyway, with these new sensors, I am having issues with the SDI12 address. I have run the SDI12 check code (posted earlier) and have used that to try and program the sensor so that the SDI12 address is 1 and not 0. That works great. However, each time I restart the Mayfly or try and upload the logging sketch, the sensors revert back to address 0. As such they fail to transmit the data and I get -9999 results. Thoughts?
-
2022-06-02 at 12:26 PM #17066
We’ve seen this behavior with some of the new CTD sensors as well. It seems that when you give it a new address using the b_address_change sketch, the sensor needs to be told the new address more than once in order for it to actually make the change. Meaning, run the sketch and observe the text on the Serial Monitor. For a new sensor it will say sensor found at address “0”. Type “1” into the text box and press Send. It’ll then say the sensor is now found at address “1”. However, you should do it at least a few more times. Enter “1” into the text box again and press Send. It should say sensor found at address “1” again. Try it at least 3 or 4 times, and then you should be able to unplug the sensor, upload your logging sketch, and the sensor will be found at address 1.
You should also make sure you’ve updated you libraries files recently. The new version of the CTD sensors required a slight change in the SDI-12 protocol instruction timing, and those changes are incorporated in the latest version of the EnviroDIY SDI-12 library. You can either update just that one folder, or all of them using the EnviroDIY Libraries zip file found at https://github.com/EnviroDIY/Libraries
If you’re still using an SDI-12 library version from prior to April of this year, it won’t work with the new CTD sensors and you’ll get -9999 for all parameters even if you’ve got the correct address programmed to the sensor.
-
2022-06-16 at 5:10 PM #17103
We’ve just had a failure to communicate with our newest Hydros 21 sensors (likely Gen 2). While I’ve had success setting the address with the b_address_change sketch, my standard Mayfly code can’t talk to the sensor and returns values of -9999. It looks to me like the SDI-12 library has not changed since May 2021 (https://github.com/EnviroDIY/Arduino-SDI-12/).
However, MeterHydros21.h within ModularSensors was updated last month (https://github.com/EnviroDIY/ModularSensors/tree/master/src/sensors) for the new timing requirements of the Gen 2 Hydros 21, and updating that library was what fixed the communication problems I was having.
-
2022-06-16 at 5:19 PM #17104
Yes, it’s just one line (currently line 107) of the MeterHydros21.h file that contains the most important change, which is this line: define HYDROS21_MEASUREMENT_TIME_MS 1000
The previous setting was 500 milliseconds but it turns out the new Gen 2 CTD sensors need a full second for measurement time, so changing that line will allow you to use the Gen 2 Hydros21 sensors.
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.