LoctekMotion_IoT icon indicating copy to clipboard operation
LoctekMotion_IoT copied to clipboard

Miswired, still works

Open sharkzor opened this issue 3 years ago • 11 comments

ED9CA906-3B39-4D21-A5EB-D425C2BD38B7 Not really an issue, but i accidentally wired my CB38M2B(IB)-1 / HS13A-1

with the other wiring scheme. Still worked! How can this be? According to the scheme it should have zapped the board with 23v and rx/tx doesnt line up. Does the control box switch or has some handshake protocol ? Uploading 71A73EAE-CECF-4294-938D-9EB0BCF22594.jpeg…

sharkzor avatar Sep 19 '21 08:09 sharkzor

This is interesting! We had a discussion on the Discord a while ago about this, and we were wondering how multiple control panels could have different wirings. Perhaps the control box is able to recognize and switch the signal.

iMicknl avatar Sep 19 '21 21:09 iMicknl

@sharkzor could you perhaps share your wiring? It is hard to define that from the cable color.

Perhaps you can use the numbers from this image:

iMicknl avatar Dec 16 '21 15:12 iMicknl

I have the same controller and control panel CB38M2L(IB)-1 and HS13A-1. I measure 5V between pin 8 and 7, and between 8 and 4 (what is Pin20 i think). So it makes no sense for me to use the pinout from https://github.com/iMicknl/LoctekMotion_IoT/blob/main/README.md#hs13a-1

mad2xlc avatar Dec 18 '21 16:12 mad2xlc

Hey @iMicknl, I have done the same mistake as @sharkzor and wired my desk (CB38M2L(IB)-1 and HS13B-1) with the HS01B-1 scheme. So in my case the following pins are connected:

RJ45 pin Name Ethernet cable color (T568B) Wemos D1
8 +5V (VDD) Brown 5V
7 GND White-Brown GND
6 TX Green D5
5 RX White-Blue D6
4 PIN 20 Blue D2

Everthing works as expected. The Wemos D1 gets its 5V from the Brown & White-Brown cable. The Desk gets the commands, so i assume the Rx and TX is correct too. The only problem is that the Desk Height Sensor sometimes changes its state to "Unknown" and the desk doesn't accept commands. So I assume the Pin 20 wiring is wrong, right?

MEfinger avatar Dec 28 '21 23:12 MEfinger

@sharkzor could you perhaps share your wiring? It is hard to define that from the cable color.

Perhaps you can use the numbers from this image:

Its the default wiring scheme B

294394F9-0D38-440D-8FF3-5E42FDC2EF6F

sharkzor avatar Dec 29 '21 06:12 sharkzor

In my setup the 5v drops to 4.8v and the wemos is getting unstable. I think you have similar problems. i will try it with an barebone esp8266 and a 3.3v ldo voltage regulator. Otherwise i will need an external power supply.

mad2xlc avatar Dec 29 '21 06:12 mad2xlc

Out of curiosity I tested the other wiring scheme (HS13A-1) and it did not work. The Wemos wouldn't turn on and the physical Keypad was stuck (The display turned on but I couldn't press any keys). I also tested the other RJ-45 Port to see if that would change something and even disconnected the physical keypad. But the result stayed the same. The moment I plug in a Wemos D1 with the HS13A-1 wiring scheme the Desk gets stuck and wont respond to the physical or the digital keypad. Even powering off the whole desk and then reconnecting the Wemos to the Port wouldn't help. Do you guys have any idea on why only the other scheme works?

MEfinger avatar Dec 30 '21 16:12 MEfinger

Hey @iMicknl, I think I found the issue with the wrong wiring scheme. In the Readme the Pin Layout for the HS13A-1 is wrong. I opened up my Control Box and compared the values on the PCB and saw that there are actually 10 cables connected to it. So the Table in the Readme File should be changed (also the ethernet cable colors in the HS13A-1 table are swaped)

RJ45 pin Name Original Cable Color Ethernet cable color (T568B)
1 RESET Brown White-Orange
2 SWIM White Orange
3 empty Purple White-Green
4 pin20 Red Blue
5 RX Green White-Blue
6 TX Black Green
7 GND1 Blue White-Brown
8 +5V (VDD) Yellow Brown

The two cable underneath the 5V are separated from the RJ45 cable and belong to the powerplug. they deliver the 29V which I assume are used to power the USB port. Thats why only the HS13B-1 has them.

HS13B-1

MEfinger avatar Dec 30 '21 21:12 MEfinger

@MEfinger I think you are correct! Would you be willing to do a PR to fix this? Or should I do this :).

Which YAML are you using? Do you set PIN20 to low or high?

iMicknl avatar Jan 24 '22 11:01 iMicknl

Does anybody got CB38M2L(IB)-1 with HS13U and ESP8266 working? @MEfinger @mad2xlc

Kienz avatar Feb 23 '22 12:02 Kienz

I too have a CB38M2B(IB)-1 but my buttons are on a HS11A-1.

I tested the pins on both combinations (i.e. for the HS01B-1 and for the HS13A-1), I also found that for my HS11A-1 the correct configuration was the same as the HS01B-1.

I've used a NodeMCU ESP8266 with the config below: RJ45 pin 8 as +5V going to Pin "VIN" RJ45 pin 7 as GND going to Pin "GND" RJ45 pin 6 as TX going to Pin "D5" RJ45 pin 5 as RX going to Pin "D6" RJ45 pin 4 going to Pin "D2"

Thanks to all those who've made this possible...works a treat!

dasmith83 avatar Sep 07 '22 16:09 dasmith83

I have CB38M2L(IB)-9 with HS13B-1 panel. The correct wiring for this combination is the same as for HS01B-1:

ESP32 pin RJ45 pin RJ45 cable color (T568B)
+5V 8 brown
GND 7 white-brown
17 (TX) 6 green
16 (RX) 5 white-blue
23 ("Pin20") 4 blue

Initially I used NodeMCU v3 (ESP8266) for this but I was experiencing some issues:

  • it was unstable, resetting frequently - maybe related to the voltage drop to 4.8 @mad2xlc brought up (I measured and I'm seeing similar value)
  • height readings had occasional glitches, showing 600.0 cm out of the blue

ESP8266 doesn't have hardware UART so it does it in software and it's not very robust (esphome docs on UART warn about that).

So now I'm using ESP32 DevkitC-32E for this, powering it from pin 8 +5V without any problems. It works flawlessly - always accurate height readings and super stable, never resets. ESP32 DevkitC-32E has LDO voltage regulator which to my knowledge converts it to 3.3V. Maybe that explains why it's stable with 4.8V or even 4.75 I measured on few occasions.

ku1ik avatar Jan 21 '23 16:01 ku1ik

Hey @iMicknl, I think I found the issue with the wrong wiring scheme. In the Readme the Pin Layout for the HS13A-1 is wrong. I opened up my Control Box and compared the values on the PCB and saw that there are actually 10 cables connected to it. So the Table in the Readme File should be changed (also the ethernet cable colors in the HS13A-1 table are swaped) RJ45 pin Name Original Cable Color Ethernet cable color (T568B) 1 RESET Brown White-Orange 2 SWIM White Orange 3 empty Purple White-Green 4 pin20 Red Blue 5 RX Green White-Blue 6 TX Black Green 7 GND1 Blue White-Brown 8 +5V (VDD) Yellow Brown

The two cable underneath the 5V are separated from the RJ45 cable and belong to the powerplug. they deliver the 29V which I assume are used to power the USB port. Thats why only the HS13B-1 has them.

HS13B-1

Can confirm, works on my CB38M2J and HS13B-1.

naresh97 avatar Feb 03 '23 17:02 naresh97

Good afternoon, query, is there another controller that can replace the model CB38M2B (IB) - 1

260885El avatar Mar 19 '24 18:03 260885El