Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

8 serial inputs on CR1000?


AndyWatson May 23, 2011 01:21 AM

I successfully got 4 Decagon soil moisture probes (model 5TM) to interface with the com ports of the CR1000, but now I need to connect 8 of them. I connected the TTL outputs of the probes to the inputs of Com1 through Com4. All of the probes get powered by the SW12 line of the CR1000. After reading the CR1000 manual it appears that all 8 of the digital I/O pins can be configured to be inputs. Is that true? And if so, how would I go about doing that?

The relevant portion of my current code, which works fine for 4 probes, is below:

BeginProg
Scan(4,Min,1,0)

serialopen(Com1,1200,19,0,10000)
serialopen(com2,1200,19,0,10000)
serialopen(com3,1200,19,0,10000)
serialopen(Com4,1200,19,0,10000)

serialflush(Com1)
serialflush(Com2)
Serialflush(Com3)
serialflush(Com4)
Delay (0,1,Sec)
portset (9,1)
Delay (0,1,Sec)
serialin (TMout(1),Com1,100,0,13)
serialin (TMout(2),Com2,100,0,13)
serialin (TMout(3),Com3,100,0,13)
serialin (TMout(4),Com4,100,0,13)

do some parsing of captured strings, omitted to save space...

portset(9,0)
calltable (TMData)
NextScan


Sam May 23, 2011 04:09 AM

"it appears that all 8 of the digital I/O pins can be configured to be inputs"

They can all be configured for high/low inputs. Only 4 of the eight can be used for Serial Tx. Only 4 of the eight can be used for Serial Rx. The 8 "C" ports can be configured as 4 TX/RX pairs, i.e. Com1, Com2, Com3, and Com4.

In your situation, two options come to mind

1) By far the easiest method for connecting 8 5TM probes to a single logger -- Have the 5TM's configured for SDI-12 communication. From Decagon's 5TM website under specifications -> Output "SDI-12 (contact Decagon for information on SDI-12 mode"). SDI-12 is an addressable, multi-drop communication protocol. Therefore, depending on sensor cable lengths, you could potentially connect all 8 5TM's to a single, odd-numbered "C" port. Each sensor would need a unique SDI-12 address and you would use the SDI12Recorder instruction.

2) Add 15 more serial ports to the datalogger using the SDM-SIO1. SDM-SDIO1s are addressable, multi-drop devices. Up to 15 can be bussed on C1,C2, and C3.

Again, #1 is the easiest, cleanest, and most cost effective option.

-- edit

A third option would be to use a AM16/32B multiplexer and multiplex the sensors across a control port pair.

* Last updated by: Sam on 5/22/2011 @ 10:11 PM *


AndyWatson May 23, 2011 12:57 PM

I actually have a AM16/32B, so that would be easiest to implement. However, using the ShortCut program, it only give me the options of differential voltage or thermocouple measurements with the AM16/23B, so how would I configure it to have multiple com ports?


Sam May 23, 2011 01:55 PM

It might be more convenient in terms of available equipment, but it is certainly not easier. Using the sensors with SDI-12 output is by far the easiest solution.

It doesn't get much easier than this:

https://www.metergroup.com/environment/articles/sdi-12-example-programs/

You are not going to be able to do the serial multiplexing with ShortCut as it is shipped from CSI. However, you might check out the following ShortCut files from Decagon:

https://www.metergroup.com/environment/articles/using-scwin-short-cut-read-sensors/

https://www.metergroup.com/environment/campbell-scientific-programs-5te-5tm-gs3/


AndyWatson May 23, 2011 02:35 PM

It looks like to use SDI-12, I would have to buy a ProCheck readout device to be able to program a unique address to each probe. Maybe I'll have a go at modifying Decagon's multiplexing example.


Sam May 23, 2011 03:02 PM

Unless Decagon is doing something non-standard to the SDI-12 protocol (which I doubt), the SDI-12 address can be easily changed using the aAb! command.

http://www.sdi-12.org/sdi-12/SDI-12_version1_3 January 12 2009.pdf

You can use the datalogger as a SDI-12 interface. When changing the addresses, hook one sensor up at a time. It will simplify things.
Check out the CR1000 manual, Section 11.3.1, "SDI-12 Transparent Mode". Then see Table 49 for useful commands. Specifically,

* "?!", query the current SDI-12 address of the sensor - probably zero

* "aAb!", where "a" = current address and "b" = the new address - for example use "0A2!" to change the address from zero to two. Confirm change with "?!"

I sounds like you have a bit of reading to do in regards to SDI-12 and/or multiplexers.


LynnM13 May 23, 2011 09:11 PM

I work with 5TM sensors and the SDI-12 address can be changed very easily in Terminal Emulator using the commands listed above


JessicaCardoso Jun 18, 2018 10:53 PM

Hi Sam, Can all 8 C work as output? I want to connect 8 SDI-12 sensors in each C port. Would be that possible?


GaryTRoberts Jun 18, 2018 11:16 PM

No, only the odd C ports can do SDI-12 (with the exception of the CR300 which can do SDI-12 on C1 and C2).


JessicaCardoso Jun 19, 2018 02:31 AM

Thank you Gary!

Log in or register to post/reply in the forum.