Another Desk Motorized Controller

I was researching community for similar or exact manufacturers, but I discovered that mine desk is quite different from others (Uplift, Desky, Jiecang, etc.)

Here are some images from my desk motors (black box) and desk controller (display height with buttons)






And apparently this is the manufacturer (found on the Internet based by first digits of the desk motor):
https://www.natekj.com/NT33-2B2-2-pd48446372.html

I have readings from my esp32 console debug, and I can read some hexdecimal values, but at this point I stuck.

Please refer to this thread

Any hints will be helpful. Thanks

1 Like

Posting some UART debug messages would be a good next step for sure.

Following a similar process to what @MhouneyLH did here is probably a good way to go…

You can probably just rest some dupont cables in the T And R for testing.

I would try one a time with the G also connected to the esp. but the ESP powered by usb.

I would also confirm voltages with a multimeter.

I soldered wires on this top pins T,R,and GND
I connected all three wires to my esp32
and here is the yaml file for it:

uart:
  - id: desk_uart
    baud_rate: 9600
    rx_pin: GPIO25  # R pin
    debug:
      after:
        timeout: 10ms
      dummy_receiver: true
      sequence:
        - lambda: UARTDebug::log_hex(UART_DIRECTION_RX, bytes, ':');
  - id: desk_uart1
    baud_rate: 9600
    rx_pin: GPIO27  # T pin
    debug:
      after:
        timeout: 10ms
      dummy_receiver: true
      sequence:
        - lambda: UARTDebug::log_hex(UART_DIRECTION_TX, bytes, ':');

also here is the video:

Regarding the voltage its steady 1.80v, on button press it drops to 1.4v

Best to post sample logs as code like you did with config. Easier for people to see and analyze.

I would post logs for various actions/stages. On boot. Up. Down. Other buttons.

I would initially analyse one wire at a time and focus on finding the desk height stream first. It’s probably the R wire.

See if you can find a pattern similar to the Desky height protocol…

Or the desktronic protocol.

Once you identify the height messages you can move in to decoding them.

1 Like

Thanks for suggestions @Mahko_Mahko !

Here are the hexdecimal values from my debugger in state of “idle” (Im not pressing any buttons) with all three wires attached (R,P, GND)

Here is the log output for all three wires hooked up when I push button “Down” (desk is lowering while Im holding this button):

Here is the log output for all three wires hooked up when I push button “Up” (desk is rising while Im holding this button):

Here is the log output for all three wires hooked up when I push button “Position 1” (desk is setting up to Position1 on click of this button):

I will try later only to connect R pin and GND and to make logs for that also!
Thanks!

I made a summary of parts of this.

5A:07:ED:7F:73
5A:07:ED:7F:73
5A:07:ED:07:FB
5A:07:ED:07:FB
5A:07:ED:7D:71
5A:07:ED:7D:71
5A:07:ED:6D:61
5A:07:ED:6D:61
5A:07:ED:66:5A
5A:07:ED:66:5A
5A:07:ED:4F:43
5A:07:ED:5B:4F
5A:07:ED:5B:4F
5A:07:ED:06:FA
5A:07:ED:06:FA
5A:07:ED:3F:33
5A:07:ED:3F:33
5A:07:E6:6F:5C
5A:07:E6:6F:5C
5A:07:E6:7F:6C
5A:07:E6:7F:6C
5A:07:E6:07:F4
5A:07:E6:07:F4
5A:07:E6:7D:6A
5A:07:E6:6D:5A
5A:07:E6:6D:5A
5A:07:E6:66:53
5A:07:E6:66:53
5A:07:E6:4F:3C
5A:07:E6:4F:3C
5A:07:E6:5B:48
5A:07:E6:5B:48

I would try to clean up your logs like this and see if logging it as integers helps you spot the height values… it’s probably those last three (?) bytes.

uart:
  - id: xx
    tx_pin: xx
    rx_pin: xx
    baud_rate: 9600
    debug:
      direction: RX
      dummy_receiver: true
      after:
        bytes: 5
      sequence:     
        - lambda: UARTDebug::log_int(direction, bytes, ',');

I tried this code, but I have no readings in my debug console on button press.
But I noticed that my height display is “broken”. It shows whole digits like this:

I just reversed it GPIO pins for tx and rx, and now my display is blinking, but I have some kind of readings:
this two arrays are repetitive:
165,0,0,255,255
255,165,0,0,255

But I dont know what is the height because my display shows whole digits as I posted on post above, but now its just blinking.

test#1: 255,165,0,32,223 should refer to 88-89cm height
test #2: 165,0,64,191,255 => should refer to height 78.0 cm
test#3: 165,0,32,223,255 => should refere somewhere arround 90 cm

I’m not sure if we have quite narrowed in on the right messages and packet structure just yet.

@ssieb has seen quite a few of these desks now and is way more experienced than me with UART decoding. Perhaps he may give you some more pointers in the right direction;) .

Simplistically, you’re trying to guess a packet structure by looking at the messages and configuing your debug values until they clean up, then you’re looking for specific data bits which are most likely the desk height. Then you may need to guess how the relevant bits convert to your desk height using what’s proabably simple arithmetic or combining them.

First job is probably to find and read desk height. So I would focus on only having one wire connected to your ESP at a time (eg only T wire or R wire, plus ground).

You are pretty close I think…

image
https://www.google.com/search?q=uart+packet&rlz=1C1CHBF_en-GBAU859AU859&sxsrf=AJOqlzU7wSARGxTVDkgu-eSLZLqqCeG_lg:1679297691470&source=lnms&tbm=isch&sa=X&ved=2ahUKEwj82Pyy_-n9AhVbzTgGHV4JAFUQ_AUoAXoECAIQAw&biw=1745&bih=852&dpr=1.1