0

I'm working with an old irrigation controller that is connected to a PC via the DB9 serial port. I was able to capture that data (tapped into the appropriate TX wire) on a separate laptop, but now I'm stuck translating it into meaningful information.

When idle, the controller continuously broadcasts the line current to the PC and because variable data stands out among static values, this seemed like a logical place to start deciphering the data. Below is an excerpt of the serial data while the system is idle:

ff 3a 30 32 34 49 30 30 38 34 3b 30 30 30 30 0d 0a
ff 3a 30 32 34 49 30 30 38 36 3b 30 30 30 30 0d 0a
ff 3a 30 32 34 49 30 30 38 35 3b 30 30 30 30 0d 0a
ff 3a 30 32 34 49 30 30 38 34 3b 30 30 30 30 0d 0a
ff 3a 30 32 34 49 30 30 37 45 3b 30 30 30 30 0d 0a
ff 3a 30 32 34 49 30 30 37 43 3b 30 30 30 30 0d 0a
ff 3a 30 32 34 49 30 30 37 43 3b 30 30 30 30 0d 0a

The bytes that I suspect of carrying the line current information are indicated with __ below, as all of the other bytes remain static when system is idle:

ff 3a 30 32 34 49 30 30 __ __ 3b 30 30 30 30 0d 0a

There is a test cycle that can be run to check current before, during, and after activation of a particular sprinkler head. Here is an excerpt of that:

ff 3a 30 32 34 49 30 30 38 31 3b 30 30 30 30 0d 0a  (system idle, typical current ~130 mA)
ff 3a 30 34                                  0d 0a  (system wait)
ff 3a 30 32 34 49 30 30 38 36 3b 30 30 30 30 0d 0a  (system active, typical current ~550 mA)
ff 3a 30 34                                  0d 0a  (system wait)
ff 3a 30 32 34 49 30 30 38 35 3b 30 30 30 30 0d 0a  (system idle, typical current ~210 mA)

There are two pairs of wires leaving the controller, but I suspect the controller reports the total combined current rather than reporting them separately.

Current values approximately 130 mA while idle, and around 550 mA while active, but I'm struggling to find a way to translate "38 34", "37 45" etc. into meaningful values.

This is my first foray into this sort of puzzle, so any related advice/tips/suggestions for deciphering serial data would be welcome.

Edit: Omitting the leading "ff", below is the appearance in ASCII form.

idle state:

:024I007D;0000
:024I0082;0000
:024I0080;0000
:024I0084;0000
:024I0086;0000
:024I0082;0000
:024I0081;0000
:024I0080;0000
:024I0082;0000
:024I0086;0000
:024I0084;0000
:024I007E;0000
:024I007E;0000
:024I0080;0000
:024I0081;0000
:024I0080;0000
:024I007E;0000
:024I0081;0000
:024I0085;0000
:024I0085;0000
:024I0086;0000
:024I0081;0000

running:

:024I0081;0000  (system idle)
:04             (system wait)
:024I0086;0000  (system running) 
:04             (system wait)
:024I0085;0000  (system idle)
:04
:04
:04
:024I0080;0000
:04
:024I0081;0000
:04
:024I007E;0000
6
  • 1
    There's not enough change in those 3 records to convey that much information about the current. Are you sure you are including all the relevant records ? Also, apart from the initial FF, all the characters are printable ascii. e.g. :024I0085;0000. It'll probably be easier to see what's going on like this. I would have guessed that 'I' stands for current and 0085 is the mA value in hex (132mA) - but this doesn't work for your non-idle examples.
    – Ian Cook
    Jul 6 at 22:26
  • Yes - the packets all look like the above example, with the same bits changing.
    – CragMonkey
    Jul 7 at 3:25
  • Added ASCII representation above in case someone else can see a pattern.
    – CragMonkey
    Jul 7 at 4:02
  • So the message being sent during 'system running' also appears in the idle state data. Unfortunately, I don't think you are going to get very far with with this data/approach. Perhaps try to reverse engineer the program that is translating these messages to the displayed mA values ?
    – Ian Cook
    Jul 7 at 11:26
  • Correct - while the system is running the program uses the current draw to infer whether the solenoids responded. It's possible they're using a lookup table of some sort, but I was hoping there was just some simple translation that I was overlooking.
    – CragMonkey
    Jul 7 at 13:50
0

So I managed to work it out... most importantly I needed to view it in ASCII as suggested in the comments.

Turns out the samples I shared didn't contain examples of the 500+ mA readings like I expected after all.

At any rate, it turns out that given the format....

:024IXXXX;YYYY

... then XXXX converted from hex to decimal + YYYY converted from hex to decimal = current displayed by software.

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .