Forum Replies Created
-
AuthorPosts
-
Does the red power light on the lower right of the modem turn on? If not, the modem isn’t getting power. Pin 18 should be the right pin number. I’m not sure why it wouldn’t be powering up. Have you ever messed with the solder jumpers?
If the modem is powering up, you might have a baud rate problem. Try setting the modemBaud to 57600 even 115200.
If neither of those work, then try dumping out debugging info. If you’re using PlatformIO, add this to your platformio.ini file within your default enviroment:
<div>
<div>INI123456build_flags =-D MS_SIMCOMSIM7080_DEBUG-D MS_SIMCOMSIM7080_DEBUG_DEEP-D MS_LOGGERMODEM_DEBUG-D MS_LOGGERMODEM_DEBUG_DEEP-D TINY_GSM_DEBUG=Serial</div>
</div>
If you’re using the Arduino IDE, add#define TINY_GSM_DEBUG Serial
to the very top of your logging program. Then navigate to the ModularSensors folder within your libraries. In that folder, open up The ModularSensors folder, then the src folder. Open LoggerModem.h and remove the comment slashes from lines 27 and 28 (lines start with #define MS_LOGGERMODEM_DEBUG). The go into the modems subfolder, open SIMComSIM7080.h and remove the comment slashes from lines 47 and 48 ((lines start with#define MS_SIMCOMSIM7080_DEBUG). Save all of the files.Re-program your board with the debugging on and you should get lengthy print-outs about the modem communication. With that, I can better help find what’s wrong.
According to the product change notification you attached, there shouldn’t need to be any software changes for “transparent” mode, so most of the examples for ModularSensors should still work.
The underlying cellular chipset on the board *has* changed from the ublox SARA R410M to the Telit ME310G1-WW on the global version or the Telit ME310G1-W1 on the low power version. Because the chip changed, any examples you see for using *bypass* mode will no longer work.
I’ve been swamped lately, so I’m behind on sensor requests.
<div>
<div>@fionasouthwell Are you sure you’re measuring *specific conductance*? From what I know of the Atlas sensors, they don’t measure specific conductance, they measure conductivity. I just very quickly skimmed their latest manual and it doesn’t look like that’s changed. To get specific conductance, you must also use a temperature probe and then calculate the specific conductance from the conductivity. I can add specific conductance, but I’m going to flag it as a calculated value, since the sensor doesn’t measure it.</div>
</div>You need to either upgrade your ModularSensors library from 0.34.0 to 0.35.0 or downgrade your SD fat library from 2.2.3 to 2.1.2.
All the dependent libraries are updated all of the time and not all versions match with each other. It’s best to download the libraries as a package from the ModularSensors releases page on GitHub. That zip file should have *exactly* the version of each library you need for all the pieces to work together.
I know nothing about rosserial. Are you using Hardware Serial with it? Serial or Serial1? Are you using some type of software serial (SoftwareSerial, AltSoftSerial, NeoSWSerial)? Very quickly skimming the rosserial docs and code, it looks like it has some specific boards that are supported and the 1284p in the Mayfly may not be 100% compatible.
The power cycling done by modular sensors is based on the power pin you used to set up the Hydros21. If you have your other serial peripheral on the same pin, it’s possible that the power cycling could be throwing it off. Try putting them on different power pins, or re-running the Serial.begin() after the power cycle.
The Hydros21 is an SDI-12 sensor using the SDI-12 library under the hood. That library does make use of and changes the settings for Timer2. Any other library that would use Timer2 (Tone, NeoSWSerial, etc) will conflict with it without showing compiler errors. See this: SDI-12 ReadMe. ModularSensors runs a begin() and end() on the SDI-12 objects whenever it talks to them, which *should* set and unset the timers and prevent conflicts, but it’s possible there’s still a problem with them.
As a side note, instead of using getValueString() and then toFloat() and then converting back to a String, you should just use the string value in your hydros_data String. If you need the float for some reason, use getValue(). The getValueString() is designed to not only give the value as a string, but to also give it in with the appropriate number of significant figures based on the specifications of each sensor. Converting to a float and back to a String completely negates that.
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. -
AuthorPosts