Difference between revisions of "Troubleshooting The Sonde Interface"

From Earlham CS Department
Jump to navigation Jump to search
(Created page with "==Introduction== The only way we can currently use the Sonde is through its native, YSI-650 display. The benefit of this interface is that it can both display values in real-tim...")
 
(No difference)

Latest revision as of 14:53, 9 February 2014

Introduction

The only way we can currently use the Sonde is through its native, YSI-650 display. The benefit of this interface is that it can both display values in real-time on the screen and log the values in its internal memory. The drawbacks to the YSI-650 are that it has no network connection and that it is expensive. At some point in history, HIP had a sonde-to-PMP board interface working with a self-written query script. We still have this code, but all recent attempts to use it have not worked. This page catalogs our efforts.

Sonde-Arduino Interfacing

  • We could upload simple programs, such as a light-blinking frequency specification, from a laptop to an Arduino, so the link between laptop and Arduino is established.
  • We successfully ran all sondes with the 650, so all sondes must be functional.
  • The sonde data transmission has no parity, 8 data bits, and 1 stop bit.
  • We wrote a high-level program, using the Arduino Software Serial library, which specifies logic of data transfer in a straightforward manner. I highly doubt there is a problem with the program, except maybe in the libraries it depends on. We plugged the Arduino Rx into the RS232 Tx, the Arduino Tx into the RS232 Rx, and the RS232 signal ground into an Arduino ground. We got junk data, so the link between Arduino and Sonde is not established. We confirmed the function of the cord, so the problem might be one of the following:
    • The Software Serial library does not use the same parity mode, number of stop bits, number of data bits, etc as the RS232 connection to the sonde. I cannot find a published description of the Software Serial's settings and it is impossible to override the defaults.
    • The Sonde does not power itself with the battery. We might need to give it power from an external source.
    • Despite our thoroughness, the sonde/Arduino connection needs more than an Rx, TX, and signal ground.
  • We wrote a low-level program, which draws heavily from example code on the Arduino website, that avoids possible errors in the Software Serial library. This program simply does not work and I cannot untangle it on my own (but perhaps its not the best approach).

Sonde-Laptop Interfacing

  • Zterm is a shell-like interface between a computer and a serial device. When sending transmissions via Zterm, the light on the
  • I installed the device::serial perl module and the drivers for the usb->RS232 interface. I tried running the script written by HIP, but found timeout errors. It was caught in a loop because thread associated with the connection is never "joinable". The problem might be one of the following:
    • The USB->RS232 interface is broken somehow, causing the timeout.
    • The sonde has some quirk that we don't know about that the 650 compensates for but which the perl and Arduino programs do not expect. For example, one of the sonde's many configuration options might allow communication with the YSI-650 but not another device. Another possibility is that the YSI-650 provides all 5 of the required pins connections {RX, TX, Ground, 12V Power, SDI-12}, but the laptop connection does not.

Sonde- Field Box (PMP) Interfacing

  • The wiring is a bit convoluted, but I drew a schematic to make things more clear. It is currently in the workspace next to the box.
  • There is a 12.7 V voltage difference across the two intersections of wires (where Sofia insulated them with tape). This is what we want. The PMP switch can set this voltage difference on or off. The SONDE switch has no bearing on the voltage difference here.
  • The Sonde's Tx and Rx pins connect with the PMP's RXD and TXD pins (2 and 3 on COM2). The sonde's output cable hooks into the field box in only one way, so we are fairly certain that we know which pins are which (unless the person designed the box incorrectly, which since it worked for a number of years is unlikely...).