Forum Replies Created
-
AuthorPosts
-
This code still works for me. Are you sure you have your start and end dates set within the range that your sensor has data?
The list Shannon shared for ModularSensors should be up-to-date. But the Mayfly itself can interface with many, many more sensors that are supported by libraries other than ModularSensors. We couldn’t make a comprehensive list – almost any sensor that can work in an Arduino environment can be used with the Mayfly.
Are you sure your serial port monitor is set to the same baud rate as the serial baud rate in your program? Usually when there are nothing but junk characters, it’s a baud rate mis-match. I would suggest using a serial baud rate of 57600. Make sure you have that set in your program and on your serial port monitor. The baud rate between the sensor and the Uno is different than the baud rate between the Uno and your PC.
Do your Uno and sensor have a common ground? If you are powering the sensor from a separate power source than you are powering the Uno from, you need to connect the grounds. No sharing a common ground can mess up the data signaling.
The full specifications for SDI-12 are here: https://www.sdi-12.org/current_specification/SDI-12%20Specification%201.4%20February%2020%202023.pdf Voltage specs are in table 1.
@bibhutibikramaditya Exactly what output are you getting? You’re not asking for data in your script, so you should only be getting a response like “00013” not any data values.
Suggestions:
- Confirm that the data pin of the Hydros 21 sensor is plugged into the correct pin
- Confirm the sensor has power
- Confirm that you’re serial port monitor is monitoring at the correct baud rate. (Your program uses 9600; many of the SDI-12 library examples use 115200 or 57600.)
- Use the SDI-12 example program B (https://github.com/EnviroDIY/Arduino-SDI-12/tree/master/examples/b_address_change) to change the Hydros-21’s SDI-12 address from 0 to 1 or some other valid address. (Not required, but strongly recommended in Meter’s documentation: https://library.metergroup.com/Integrator%20Guide/18281_HYDROS21(CTD)_GEN1.pdf .)
- Try the SDI-12 example program D (https://github.com/EnviroDIY/Arduino-SDI-12/tree/master/examples/d_simple_logger) to see if you can get data from that.
- Rewrite your program to both request that a measurement is started (aM!) and request data from that measurement (aD0!) – where ‘a’ is the sensor’s SDI-12 address.
Are you using PlatformIO or the Arduino IDE? In PlatformIO, you can add it to the build_flag section of your platformio.ini file. Add
-DMS_SDI12_NON_CONCURRENT
right below the-DSDI12_EXTERNAL_PCINT
line in the example ini file. If you’re using the Arduino IDE, you need to open up SDI12Sensors.h and add the line#define MS_SDI12_NON_CONCURRENT
around line 67, right below the header guard.Have you tried using the
-D MS_SDI12_NON_CONCURRENT
build flag: https://envirodiy.github.io/ModularSensors/group__sdi12__group.html. Some SDI-12 sensors don’t properly support the concurrent mode that ModularSensors uses by default. That could by why they work individually, but not all together.I finally dug into this. As I commented on GitHub, I think this loss must be related to a server update or hotfix. The server did get the data, so it might be recoverable. I doubt it’s related to the older issue.
If you can create a POST request, you can get data to Monitor My Watershed. There’s information about the POST format here:
https://github.com/ODM2/ODM2DataSharingPortal/blob/main/doc/example_rest_requests.md
I’m sorry; I’m stumped. There’s something wrong with the way the battery voltage is being read. But I don’t understand what. As soon as I turn on the debugging for it.. it works. It also works if I upgrade to the current ModularSensors master branch. But I cannot figure out for the life of me what change makes it work.
So my two suggestions to get it working (pick one):
– Add-D MS_PROCESSORSTATS_DEBUG
to the build flags in your platformio.ini
– Upgrade to the latest master branch of ModularSensors on GitHub by changing your lib_deps toenvirodiy/EnviroDIY_ModularSensors@0.33.3
I’m looking into it. I would have said “of course they should work together” but I’d never tried it, so I hooked it up and tried it out. And I got the same result as you. I haven’t figured it out yet, though.
-
AuthorPosts