Hacking an office desk

Ever since I bought this electrically adjustable desk from IKEA, I was annoyed by the fact that it didn’t have a memory for positions. I was always forced to bend over the table, finding a certain point in my room using the desktop as an aiming tool.aiming-position My perfect standing position spot was the top of one of the drawers in my wife’s office shelf, which happens to stand just opposite to my workplace. That’s not really a way to go, if you want to change positions multiple times a day. So I looked at that desk and thought: “Well, two buttons and a height.” I can control buttons using a relay and I can measure height using an ultrasonic sensor. All that properly connected to an Arduino mixed with a couple of lines of code and everything should be fine. I thought …

I got one of my breadboards and made up a prototype before modifying the real table. Ignore the little breadboard with the Arduino Nano in the picture below. I even connected an LCD display in order to see the height that the sensor would report.first-attempt

That all worked perfectly, so I though it’s time to hack the desk. I unscrewed the little controller with the up- and down-button and tried to open it up. Unfortunately, the thing is really, really glued together. first-open-attempt So my first attempt using a heat-gun to open it, resulted in a completely screwed up device. Thanks to IKEA, I had a spare one because when I bought the desk, the first one had an issue and needed to be replaced. For whatever reason, I forgot to include the controller device when I returned it to IKEA.

The greater surprise came when I looked into the little device. I was expecting some wires that kind of switched the motors in the desk’s legs using polarity. Like negative polarity, desk goes down, positive polarity, desk goes up. bekant-controller

In reality, that all was much more complicated. The height is controlled by this little guy and my dream of just soldering some relays to the button wires vanished into thin air. You just don’t solder wires to an SMD-mounted flex foil cable socket with a household soldering iron.

While seeing myself confronted with all sorts of problems, I started searching the web for that topic. To my surprise, I found several people who also wanted to have automatic control over that desk. Some of them had their own attempts on how to do that. One solution which finally became the base to my work, was the one from Robin Reiter (see project here https://github.com/robin7331/IKEA-Hackant, see video of his work here https://www.youtube.com/watch?v=AB75AxprXqQ). He found out, that the legs of the desk and the controller communicate on the so called LIN-bus. He didn’t go as far as sending the the movement commands via the Arduino, but at least he implemented to read the height from the LIN-bus, hence, I would not have to use the ultrasonic sensor to get the current height. To control the desk, he removed the flex foil cable socket and soldered wires to the appropriate pins. button-wiresAs I already fried two controllers and was on IKEA’s grace to being provided with replacement parts, I didn’t do that and instead soldered my wires to the little metal plates sitting under the button cover.

Other than that, I pretty much did what Robin did. Please see his instructions on his Github page.

In order to have everyhting nicely attached to the table, I made a PCB layout which I used as a base to bring the whole circuitry to a prototype PCB. protype-pcb-with-connectors

Here is the first version, the Arduino Nano and the connectors are still missing.

second-attempt-2-raw-without-arduino

After I soldered the connectors and the Nano to board, I had to find out that the Nano I was using was broken. So I had to take it out again and deciced not to go with soldered but with a socketed chip the second time. You cannot see it from the perspective I have taken the photo below, but the Arduino sits on a socket. Here is final result, now put into a box together with a step-down buck converter. As you can see, I used flex foil wire connected flat buttons to control my device.

second-attempt-3-boxed

In the next step, I connected my device with the desk’s controller. The desk controller has a security switch that allows you to take out the plastic pin in order to prevent usage of the desk (child-proof lock or Kindersicherung). As the pin can be plugged in from both sides, I decided to use one of holes to bring my cable into the device.

second-attempt-4-cabled-and-boxed

After that I mounted all of that underneath the desktop.

table-mounted-bottom

and put a button panel description onto the front of the board.

table-mounted-front

I really enjoyed the work on that. I took a couple of weeks alltogether – most of it was waiting for replacement controllers from IKEA Sweden ;-). I can now move my desk to the sit and stand position with one finger press and that makes my usage of the table much more comfortable. I usually change work positions two or three times a day.

 

Leave a comment