EnviroDIY / Arduino-SDI-12

An Arduino library for SDI-12 communication with a wide variety of environmental sensors. This library provides a general software solution, without requiring any additional hardware.
https://github.com/EnviroDIY/Arduino-SDI-12/wiki
BSD 3-Clause "New" or "Revised" License
159 stars 100 forks source link

YSI 600 communication #10

Closed JDelesantro closed 8 years ago

JDelesantro commented 9 years ago

First off, thanks for your contribution with this library. I have recently started using Arduino based data loggers in my work for Duke University's River Center and it has been very helpful. While I have had no issues communicating with other sensors, I have not been able to successfully communicate with the YSI 600. I noticed that you mentioned testing the library with a YSI in a google group. Do you have any code you could share or general tips on communicating with the YSI 600 through Arduino?

I've also emailed you and I apologize for hassling you.

Thanks, Joseph

Kevin-M-Smith commented 9 years ago

Hi Joseph,

Happy to help if I can!

Sorry if you emailed me and didn't get a response. I'm currently working in Perú and I am admittedly not checking all of my email accounts.

I had no problems getting the YSI to work normally. It required 12v DC so I powered it off a separate power supply.

I don't know if it is the same for all YSI probes, but the one I was using had a MS8 connector where each of the electrical contacts were lettered.

I don't remember which letters correspond to which inputs, so take the following advise with caution, and refer to your user's manual if you have one.

This company published a list that suggests SDI-12 should be connected to F, power to A, and ground to B: http://www.nexsens.com/knowledge-base/isic-data-loggers/2100-isic/data-logger-connections.htm

You will want to verify that with any official information you can get from YSI - but it's a start!

Hope it helps - and good luck with everything!

Kevin


From: JDelesantro [notifications@github.com] Sent: Thursday, July 31, 2014 4:06 PM To: StroudCenter/Arduino-SDI-12 Subject: [Arduino-SDI-12] YSI 600 communication (#10)

First off, thanks for your contribution with this library. I have recently started using Arduino based data loggers in my work for Duke University's River Center and it has been very helpful. While I have had no issues communicating with other sensors, I have not been able to successfully communicate with the YSI 600. I noticed that you mentioned testing the library with a YSI in a google group. Do you have any code you could share or general tips on communicating with the YSI 600 through Arduino?

I've also emailed you and I apologize for hassling you.

Thanks, Joseph

— Reply to this email directly or view it on GitHubhttps://github.com/StroudCenter/Arduino-SDI-12/issues/10.

JDelesantro commented 9 years ago

Hi Kevin,

Thanks for your reply. Hope your having fun in Peru. We log our YSIs to other data loggers via SDI12 (Campbell Scientific). So I know that the pin out is correct, I know that my addresses and commands are correct, and that the YSI is communicating in SDI12. My guess is that there is some sort of timing issue that does not allow the Arduino to recognize the YSI? When sending a "aM!" command, where I supply the address rather than scanning, I can get the YSI to come out of sleep, initiate the wiper and turn on the optics. Presumably the measurement has been initiated. However, while(mySDI12.available()) is never true, so nothing is read back from the YSI either in terms of an acknowledgement or data from the "aD0!" command. All of my attempts to use scans to recognize the YSI, as per your examples, have been fruitless, but I intend to play around with the checkactive() command more this afternoon. Any suggestions would be greatly appreciated.

Thanks! Joseph

Kevin-M-Smith commented 9 years ago

Hi Joseph,

I'm afraid I don't have any other suggestions based on what you've told me so far.

So perhaps a little more info: * what is the Arduino model you are using? * what pin are you using? * what version of the ArduinoIDE are you using? * what is the full model number of the YSI device you are using?

Thanks! Kevin


From: JDelesantro [notifications@github.com] Sent: Friday, August 01, 2014 9:15 AM To: StroudCenter/Arduino-SDI-12 Cc: Smith, Kevin M. Subject: Re: [Arduino-SDI-12] YSI 600 communication (#10)

Hi Kevin,

Thanks for your reply. Hope your having fun in Peru. We log our YSIs to other data loggers via SDI12 (Campbell Scientific). So I know that the pin out is correct, I know that my addresses and commands are correct, and that the YSI is communicating in SDI12. My guess is that there is some sort of timing issue that does not allow the Arduino to recognize the YSI? When sending a "aM!" command, where I supply the address rather than scanning, I can get the YSI to come out of sleep, initiate the wiper and turn on the optics. Presumably the measurement has been initiated. However, while(mySDI12.available()) is never true, so nothing is read back from the YSI either in terms of an acknowledgement or data from the "aD0!" command. All of my attempts to use scans to recognize the YSI, as per your examples, have been fruitless, but I intend to play around with the checkactive() command more this afternoon. Any suggestions would be greatly appreciated.

Thanks! Joseph

— Reply to this email directly or view it on GitHubhttps://github.com/StroudCenter/Arduino-SDI-12/issues/10#issuecomment-50882280.

JDelesantro commented 9 years ago

Arduino Uno R3 pin 12 Arduino IDE 1.0.5 r2 YSI 600 OMS (the older version, not the V2)

Thanks

Kevin-M-Smith commented 9 years ago

Hmm. I'm stumped. It is interesting that the probe physically responds to the command, but does not reply.

It could certainly be a timing issue. Each vendor is responsible for implementing SDI-12 directly, and if the YSI 600 OMS is quite old, there's a chance the SDI-12 software might not be as fined tuned as a more modern YSI device.

Do you have a newer YSI device at your disposal to test on?

Also, do you have access to the code you are running on your Campbell loggers that it works with? That might give some insight into a timing that works.

Regards, Kevin


From: JDelesantro [notifications@github.com] Sent: Friday, August 01, 2014 10:26 AM To: StroudCenter/Arduino-SDI-12 Cc: Smith, Kevin M. Subject: Re: [Arduino-SDI-12] YSI 600 communication (#10)

Arduino Uno R3 pin 12 Arduino IDE 1.0.5 r2 YSI 600 OMS (the older version, not the V2)

Thanks

— Reply to this email directly or view it on GitHubhttps://github.com/StroudCenter/Arduino-SDI-12/issues/10#issuecomment-50890148.

JDelesantro commented 9 years ago

Kevin,

I just tried a newer YSI device. I used your sample logger code and a version with a user supplied address and neither worked. Do you have access to any code that you have used with a YSI device?

Thanks, Joseph

On Fri, Aug 1, 2014 at 11:48 AM, Kevin M. Smith notifications@github.com wrote:

Hmm. I'm stumped. It is interesting that the probe physically responds to the command, but does not reply.

It could certainly be a timing issue. Each vendor is responsible for implementing SDI-12 directly, and if the YSI 600 OMS is quite old, there's a chance the SDI-12 software might not be as fined tuned as a more modern YSI device.

Do you have a newer YSI device at your disposal to test on?

Also, do you have access to the code you are running on your Campbell loggers that it works with? That might give some insight into a timing that works.

Regards, Kevin


From: JDelesantro [notifications@github.com] Sent: Friday, August 01, 2014 10:26 AM To: StroudCenter/Arduino-SDI-12 Cc: Smith, Kevin M. Subject: Re: [Arduino-SDI-12] YSI 600 communication (#10)

Arduino Uno R3 pin 12 Arduino IDE 1.0.5 r2 YSI 600 OMS (the older version, not the V2)

Thanks

— Reply to this email directly or view it on GitHub< https://github.com/StroudCenter/Arduino-SDI-12/issues/10#issuecomment-50890148>.

— Reply to this email directly or view it on GitHub https://github.com/StroudCenter/Arduino-SDI-12/issues/10#issuecomment-50900244 .

Kevin-M-Smith commented 9 years ago

Hi Joseph,

The examples in the library (at least in the first commit) worked for the YSI sondes I was using.

Hopefully it wasn't just dumb luck that it worked with those models.

Unfortunately, I don't have access to any YSI devices at the moment.

I'm running out of ideas, but here's a few more questions:

There is a drag-and-drop image feature associated with the text box on the website.

Regards, Kevin

Kevin-M-Smith commented 9 years ago

Also - if you get fed up with my code - you may want to see if this other SDI-12 library works for you:

https://github.com/joranbeasley/SDISerial

Regards, Kevin

JDelesantro commented 9 years ago

The address is 0 I can change the address, but haven't tried that yet The data line only has the YSI on it

I'll be out of town for a week to sets up some new installations, but when I get back I can take a picture. Its just power straight from the battery that also powers the Arduino, ground to the Arduino and signal to the data pin.

Unfortunately I can't spend much more time on this so I've ordered a MAX3232 chip to allow me to communicate with the YSI through rs232. Eventually I'll give it another shot, but right now I just need to get em in the field.

Thanks for your help and I really appreciate the work you put into the library. It works great with everything else!

On Fri, Aug 1, 2014 at 7:02 PM, Kevin M. Smith notifications@github.com wrote:

Also - if you get fed up with my code - you may want to see if this other SDI-12 library works for you:

https://github.com/joranbeasley/SDISerial

Regards, Kevin

— Reply to this email directly or view it on GitHub https://github.com/StroudCenter/Arduino-SDI-12/issues/10#issuecomment-50944092 .

Kevin-M-Smith commented 9 years ago

Happy to help - sorry it didn't work out.

I asked about the address because many manufacturers usually default the devices to address 0.

It is a reasonable number to start with, but sometimes the sensors have alternate behavior when the address is 0.

For example many Decagon sensors have a different default communication protocol when on address 0.

Supposedly in these cases there is backwards compatibility of SDI-12, but I've had issues in the past.

The world of serial communications can get wonky pretty fast.

Regards, Kevin