Go Down

Topic: Decrypting the Vado Identity wired shower controller (Read 766 times) previous topic - next topic

Monkey3

Hi

So, I'm attempting to use a waterproof shower controller to control something other than the mixer it was intended for. I was looking to use a wireless controller (see here) but that may be a little beyond this first attempt.

Instead I'm attempting to use a wired version instead.

So the controller I want to hack is the Vado Identity IDE-147A-C/P or now called the Vado SENSORI
Identity IDE-147C-C/P
.
So far I've passed a multi meter across all of the pins of the mixer to see what it's outputting and the attached is what I found.

Basically the controller is 5v DC and the power is on pins 3 (-ve) and 2 (+ve). I've connected 5v to it and, sure enough, it lights up and shows the default screen. It then displays E1 which is to be expected I guess as it's not connected to the mixer.

I'm thinking that pins 1 and 4 are likely to be tx / rx but I'm not sure which is which or what the next step would be to work that out.

I've tried to read digital values on pins 1 and 4 from the controller and they set to 1 as soon as I add power and stay there.
I've also tried reading analog on pins 1 and 4 from the controller and not much happens there either other than they both go to a particular voltage and stay there.

So the next step is going to be reading the same from the mixer to see if it shows up anything.
Then I'll start looking into serial reads from the mixer and try replaying that to controller to see what happens.

So, assuming it is serial then I need to work out which baud rate to use but I think that rather than attempt to work it out it may be quicker / easier to just try the standard rates and see if I can read anything.

I only have an uno at moment with a mega coming tomorrow so I'll hopefully be able to read from serial1 and write to the serial monitor then.

Nothing much to ask right now other than any advice on where to go next and I'll continue to update this thread with my findings...

Cheers,

Russell.

Monkey3

So, it turns out that pin 1 is the tx pin so I assume pin 4 is the rx.

Using this code:
Code: [Select]
long baudRate = 9600;
byte serialConfig = SERIAL_8N1;

const long cycle = 1000;

void setup() {
  Serial.begin(9600);
  Serial1.begin(baudRate, serialConfig);
}

void loop() {
  int inByte; 
  while (Serial1.available()) {
    inByte = Serial1.read();
    Serial.print(inByte, DEC);
  }
  Serial.println();
}


This was the output:
Code: [Select]
025525525525525525500
025525525525525525525200
01280128024025500
0255255150000
025525525525525525500
025525525525525525525400
25401280192128255255000
255311280000
0255255255255255630
025525525525525525525400
01281280251255255000
255600000
025525525525525570
025525525525525525525400
012822425525525524800
1500128000
02552552552553100
025525525525525525525400
0128025525525525525400
6000000
0255255255127000
025525525525525525525400
019225525525525525525400
25200128128224000
2552552557000
025525525525525525500
025525525525525525525200
012800128224255000
255255311280000
255255255255255255000
255255255255255255254000001281282552550
00255255630000
25500
2552552552552552550002552552552552552552550
000012819225525500
0255150000
00
2552552552552551500
25525525525525525525400012801282552552552400
03100000
00
25525525525531000
2552552552552552552550001281922552552552552520
0700000
02550255255255255140
002552552552552552552540
001282552552552552552540
0254000012800
025525525571280
002552552552552552550
001922552552552552552520
0128128012819225500
0255255310000
025525525525525525502550
025525525525525525525200
000128224255255025500
25525570000
025525525525525525500
255025525525525525525525400
01281280192255255000255
25515000000
255255255255255310
0255255255255255255255002540
012825525525512800
25519212800000
2552552552552551400
2552552552552552552550001281282552552552552480
2550254700000
002552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
25525525525525525502552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
2552552552552552550
25525525525525525502552552552552552550
2552552552552552550
...


and the line "25525525525525525502552552552552552550" repeats every 37 lines.

It looks to me as though the baud might be too slow for starters.
Secondly, it looks as though "2552552552552552550" might be a heartbeat of sorts with 0 being the termination character.
I also wonder if the data or stop bits are the wrong length as there is a line in there ending in 5 (assuming the 0 is the termination character) although I guess that could also be because of incorrect framing.

Any ideas on how to tailor the config?

Also, any ideas on how to interpret the data?

Paul_KD7HB

Interpreting would be much easier if you printed in HEX! Then 3 digit numbers and 1 digit numbers would not be jammed together. Leave at least a space between what you are printing.

The 255 is obviously a x'FF.

Pau;

Monkey3

Interpreting would be much easier if you printed in HEX! Then 3 digit numbers and 1 digit numbers would not be jammed together. Leave at least a space between what you are printing.

The 255 is obviously a x'FF.

Pau;
Yeah, I found that really awkward as well so I've been working with HEX since. Will post more shortly.

So, firstly, some more information. I've opened the mixer to have a look at the components.
In the attachment you'll see 4 of them highlighted:
  • connection to the controller
  • 3152EIBZ - datasheet (pdf) - this is connected directly to item 1
  • PIC16F818 - webpage
  • JFR8.000 - wondered whether this was for timing? - probably of no importance in this thread though


The data sheet for item 2 states:
Part NumberDuplexData Rate (Mbps)Rise/Fall Time (ns)Tx/Rx Skew (ns)Bus ESD (kV)Pin Count
ISL3152EHalf0.115110012/4±168

So I guess that confirms the baud rate, 115200 it is. Unless that's the max rate.
The other thing is that it states half-duplex... Err, that adds some complexity, doesn't it? or does it? or???

Is there anything else that the components could tell me about how to interpret the signal?

Monkey3

So, here's what I'm doing:
  • There are no connections between the mixer and the arduino mega. The mixer is plugged into the wall but not switched on
  • Switch the arduino on and open the serial monitor - no output as expected
  • Connect the tx pin from the mixer to the rx pin on the mega - output starts slowly
  • Wait for 5 lines of output then switch the mixer on - output comes fast
  • Wait for the mixer to complete start up noises then turn the mixer off - after 3 lines the output slows down
  • Wait for 5 lines of output then turn the arduino off


And here's the code:
Code: [Select]
long baudRate = 115200;
byte serialConfig = SERIAL_8N1;

const int lineLength = 100;
int curLength = 0;

void setup() {
  Serial.begin(baudRate);
  Serial1.begin(baudRate, serialConfig);
}

void loop() {
  int inByte; 
  while (Serial1.available()) {
    inByte = Serial1.read();
    Serial.print(inByte, HEX);
    Serial.print(" ");
   
    if (curLength++ > lineLength) {
      curLength = 0;
      Serial.println();
    }
  }
}


The arduino is connected to a laptop which is not connected to a power supply so how am I receiving any signal without a ground connected? Am I therefore just receiving interference?
And when I do connect the ground between the mixer and the arduino I get no output at all.

Is this a step backwards? How can I shield from interference and be sure I'm only getting a signal from the mixer?
Any help appreciated...

The output looked like this anyway:

Arduino turned on
Code: [Select]
0 0 FC 0 0 0 0 0 0 0 0 FC 0 E0 0 1C 0 0 0 0 FC 0 0 0 0 E0 0 0 1C 0 0 0 0 0 0 0 0 0 0 FC 0 0 0 0 E0 0 FC 0 0 0 0 0 FC 0 0 0 3 3 0 0 0 FC 0 0 0 0 0 FC 0 0 0 0 FC C 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 E0 0 0 E0 1C 0 0 0 0 0 0 0 0
0 0 0 3 0 0 0 0 0 0 FC 3 0 8 0 0 0 1C 0 0 0 0 0 0 0 0 E0 0 0 0 F0 0 FC 0 0 F0 0 0 0 0 0 FC 0 0 0 0 0 0 0 0 70 FC 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 F0 0 0 0 0 0 0 0 0 0 0 0 0 0 1E 0 0 0 0 0 1C 0 0 0 0 0 0 FC
0 0 FC 0 0 0 FC 0 0 FF 0 0 2 0 0 0 0 0 0 0 0 0 0 FC 0 0 0 1C 0 0 0 0 0 0 FC 0 0 0 0 0 0 FC FC 0 0 0 0 0 FE 0 0 0 0 0 0 0 0 0 FC 0 0 0 0 0 0 0 0 1C 0 0 0 0 0 0 0 0 FC 0 0 E0 0 1F 0 0 0 0 0 0 0 FC 1C 0 0 0 0 0 0 0 FC 1C 0 0
0 0 0 0 0 0 0 0 0 C 0 FE 0 0 0 4 0 0 0 0 0 1C 0 0 0 0 0 FC 0 0 1C 0 0 0 0 0 0 0 0 0 0 1C 0 C 0 0 0 0 1C 0 0 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E0 0 0 0 0 0 0 0 FC 0 0 0 0 E0 E0 0 0 0 0 0 0 0 0 0 0 E0 0 0 0 0 0 0 0 0 0 0 0 0 0 FC 0 0 0 0 0 0 0 0 0 0 0 0 1C 0 0 0 0 0 0 0 0 FC 0 0 0 0
0 0 0 0 0 0 0 0 E0 0 0 0 0 0 0 0 0 0 0 FC 0 FC 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 E0 E0 0 0 0 0 0 0 3 C 0 FC FC FC 0 0 0 0 0 0 0 0 0 0 1C 0 0 0 0 0 0 0 0 0 0 0 0 FC 0 0 0 0 0 0 0 0 0 0 0 FC FC 0 0 FC 7C E0 0 0
0 0 0 0 0 0 FC FC 0 0 0 0 0 0 0 0 0 0 0 0 1C 0 0 0 0 0 0 0 0 0 0 0 0 FC 0 0 0 0 1C 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FC 3 F8 1C 0 0 0 0 0 0 0 0 0 7F 0 0 0 0 0 0 0 0 0 0 0 0 0 FC 0 0 0 0 0 0 1C 0 0 0 0 FC 0 0 0 0 0 0 0

output slows
Code: [Select]
0 FC 0 1C 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 E0 0 0 0 FC 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FC 0 0 0 0 0 0 E0 0 0 0 0 1C 0 0 0 0 0 0 0 0 FC 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1C 0 0 0 0 FE 0 0 0

arduino turned off

Monkey3

Ok, another step forward...

I've now set the internal pullup on the mega's rx pin and worked out that the cable that connects the mixer to the controller "crosses over" such that the pins on the mixer's connector are the same as the pins on the controller. I'm now bypassing the cable the connects the 2 which was causing me an issue with the + / - round the wrong way.

When looking at the connector face on with the notch at the bottom working in a clockwise direction from the bottom left:
On the plugs, pin 2 is +ve, pin 3 is -ve
On the cable, pin 3 is +ve, pin 2 is -ve

Pin 1 on the mixer connected to Serial2 on the Mega, pin 4 connected to Serial1.

I now only get a signal when power is applied to the mixer and the ground pin is connected. Thumbs up.

So, I'm investigating the mixer and, with this code:

Code: [Select]

long baudRate = 38400;
byte serialConfig = SERIAL_6E2;

void setup() {
  Serial.begin(baudRate);
  Serial1.begin(baudRate, serialConfig);
  Serial2.begin(baudRate, serialConfig);
 
  pinMode(17, INPUT_PULLUP); //Serial2
  pinMode(19, INPUT_PULLUP); //Serial1
}

void loop() {
  int inByte;
  if (Serial1.available()) {
    Serial.print("S1 - ");
    while (Serial1.available()) {
      inByte = Serial1.read();
      Serial.print(inByte, HEX);
      Serial.print(" ");
    }
    Serial.println();
  }

  if (Serial2.available()) {
    Serial.print("S2 - ");
    while (Serial2.available()) {
      inByte = Serial2.read();
      Serial.print(inByte, HEX);
      Serial.print(" ");
    }
    Serial.println();
  }
}


My output is as follows:
Code: [Select]

S2 - 0
S1 - 38
S2 - 0
S1 - 38
S2 - 0
S1 - 38
S2 - 0
S1 - 38
S2 - 0
S1 - 38 38 0
S2 - 0 0
S2 - 0
S1 - 38
S2 - 0
S1 - 38
S2 - 0
S1 - 38
S2 - 0
S1 - 38
S2 - 0
S1 - 38 38 0
S2 - 0 0


This pattern then repeats.
I've changed the baud and config on the serials to 38400 / SERIAL_6E2 as 115200 / SERIAL_8N2 was only giving 0's.
So I'm still not convinced this is the correct baud and config but at least I'm getting consistent results now.
Next step is to try replaying the mixer's output to the controller and see what happens...

Monkey3

So, on to the controller...
If I send nothing to the controller then the screen displays E1 and there is no output to the rx pin on the mega.

HOWEVER...
I replayed "38" from the mega to the rx on the controller and it no longer goes into error. Rather it now displays "00" which is the normal "off" state. The backlight stays lit, however, which is not right but it's progress.

Also, it now starts singing like a bird.
So, with this code:

Code: [Select]
long baudRate = 38400;
byte serialConfig = SERIAL_6E2;

void setup() {
  Serial.begin(baudRate);
  Serial1.begin(baudRate, serialConfig);
 
  pinMode(18, INPUT_PULLUP); //Serial1 tx
  pinMode(19, INPUT_PULLUP); //Serial1 rx
}

void loop() {
  int inByte;
  bool addLine = false;
  if (Serial1.available()) {
    while (Serial1.available()) {
      inByte = Serial1.read();
      if (inByte != 0) {
        addLine = true;
        Serial.print(inByte, HEX);
        Serial.print(" ");
      }
    }
    if (addLine)
      Serial.println();
  }

  inByte = Serial1.write(38);
  inByte = Serial1.write(0);

  delay(100);
}


I get the following:

Code: [Select]
38 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
3C 38 38 38 38 38 38 38 38 38
1E 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38
F 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38


And on it goes.
Next I need to work out what else I should or shouldn't be sending it...

Monkey3

After putting this down for a little while, I did some further poking around with the controller and the transceiver chip uses RS-485 for its serial communications. So it's not quite as simple as a tx and an rx pin. This also necessitated the use of a couple of RS-485 modules for the arduino to convert the comms to something the arduino can use.

Furthermore, I'm still unsure of what the baud rate is as I seem to be able to retrieve apparently real data at a variety of bauds. I therefore thought it would be worth trying an oscilloscope to help detect the baud rate.

Using the instructions / code / app from here I managed to set up an oscilloscope using the arduino. It's certainly not perfect but it definitely appears to give some useful information.

From here it suggests measuring the shortest pulse and using a formula you can work out the baud.

I measured the shortest pulse at about 400 µs and that makes it really close to 2400 baud (allowing for errors in display and measurement).

I'm yet to test with this baud but, again, another step forwards perhaps...

Go Up