Skip to content
ivanwick edited this page Feb 9, 2023 · 3 revisions

BEKANT Firmware

Position memory diagram

Control firmware for IKEA BEKANT adjustable-height desk with lower and upper memory positions. Can be flashed onto the OEM controller, without changing any hardware.

Pre-program a sitting and standing position for your desk and move between them with a single button press.

Firmware Image

Download Latest Release

The firmware image was built in MPLAB X with the XC8 compiler. The microcontroller (PIC16LF1938) can be programmed through ICSP using a PICkit or other PIC programmer.

Installation Guide

User's Guide

Gesture Action
Move up
+ Move up to upper memory position
Move down
+ Move down to lower memory position
(hold 3 sec) Save current position

"+" means press the first button, and while holding it, press the second button, then release both. Just like Ctrl + X.

Automatic movement to a stored position can be canceled by pressing either button or cutting power.

For the Save gesture, press both buttons at the same time and hold for 3 seconds, until the desk clicks. The firmware will overwrite either the lower or upper stored position, whichever is closer to the current position. The table should not be moving during the hold, otherwise one of the other gestures was triggered.

Memory Positions

Memory positions are stored in the PIC EEPROM. These are 16-bit little-endian integers for the encoder values of the motorized table legs.

Offset Length Default Description
0x00 2 bytes 0x0636 Lower position encoder value, default about 70cm
0x02 2 bytes 0x1600 Upper position encoder value, default about 110cm

Disclaimer

Use at your own risk.

The real reason that position memory is not built into the OEM firmware is for safety and liability. Requiring a human to hold a button while the table is moving keeps a human in the control loop.

Ensure that the path of the table is clear during all movement.

Clone this wiki locally