FlexiSpot EN2 (HS51A-6 controller) with esphome (no rj ports)

I've really wanted to interface with my standing desk but almost all examples use the controllers with rj45 or similar ports and listen on UART.

The cheaper FlexiSpot (LokTek Motion) desks use controllers that are hardwired. I used pc817 optocouplers for button presses and am using an i2c interrupt handler to try and read the segment display.

This did require fine soldering, so I wouldn't recommend for users that don't have some experience in soldering. Specifically the 2 pins on the LED driver for i2c CLK and DATA. I used single core 30 AWG to tap into the LED driver.

BOM:

  • esp32-c3 super mini
  • 220 - 330 ohm resistors for pin 1 on pc817 to limit current x4
  • pc817 optocouplers x4 (up, down, stand, sit)
  • i2c logic level converter HW-024
  • 1n5817 Schottky diode to protect esp32 3.3v pin from back feeding from the HW-024. Cathode (stripe) towards the HW-024 low voltage VCC pin.

Note: the +5vdc pin for the momentary switch goes to pin 4 on the pc817.