Author Topic: IKEA Bekant Desk, motorised hack?  (Read 31787 times)

0 Members and 1 Guest are viewing this topic.

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
IKEA Bekant Desk, motorised hack?
« on: August 24, 2015, 08:19:42 pm »
Hi All,

I got a IKEA BEKANT motorised desk. I was trying to hack the controller, so i could send my own signal (via USB) for moving up and down.  Basically controlling it via my computer. It seemed pretty simple, just 3 wires. But, you guess, its not. 

The remote control looks straight forward, 2 momentary push buttons, one moves it up, the other down. Added a photo of the PCB.

Th power supply is: DC 34V 200 watts (ROL ERGO). It delivers 24V DC.

The basic setup is like this:


LEFT  +----- (3 wires) Remote    Power (DC 24V) ----+ RIGHT
LEG   +-------------------- 3 wires ----------------+ LEG


After opening the remote control, i found a PIC16LF1938 inside and that explained  partly why its not that simple. There are 3 wires: Red, Blue and White. I measured the following DC voltages (without any buttons pressed):


Red   - White  = 24.62V (equals power supply output)
Red   - Blue   ~ 14-15V (fluctuates)
White - Blue   ~  9-10V (fluctuates)


To me to seems a bit of overkill to use a PIC16 for this pretty straight forward function?

The manual states the motors stop automatically when it reaches either end. Not sure if thats why they need a PIC16, maybe to measure some sort of overload?  It also states you need to wait 9 minutes after operating the motors for 1 minute (cool down).

Last thing, the circuit doesn't seem to be fully populated, so i'm guessing its some type of standard design. I was trying to google some numbers, but i got nothing.

These are the numbers on the other side of the PCB
  • CTI150
  • E157925
  • 14 19 94V-0
  • 68002420
  • BAB 2012-03-24

So, my question is, is there anybody that understand how (and why) it works? Somehow the motors need to get both (simultaneous) the signal to start turning, on top it needs to understand which side to turn (polarity?). I'm not thinking its just 'shirting to wires' like a simple switch. I couldn't open the legs, but im guessing there are a few components there as-well. I was also looking at h-bridges, but im not getting the idea that thats on the side of the remote. Maybe its inside the legs?

Im really interested to learn how this actually works! :-/O The goal is to make something so i can send/create the signals myself (even without the remote).

I saw one guys did this by opening the front-panel and shorten the push-buttons, but thats to simple! ;-)

Many thanks!
 

Offline sitandstand

  • Newbie
  • Posts: 2
  • Country: us
Re: IKEA Bekant Desk, motorised hack?
« Reply #1 on: August 24, 2015, 08:53:41 pm »
Hi, Onesixright,

I am not an electronics fan, only an IKEA consumer.  I am "glad" to know that I am not the only person finding the output being only 24v, not the labeled 35v.

Does your desk actually work?  Mine doesn't, and I suspect it is because the DC output is too low.

I've called IKEA twice already. They sent me two replacement power adapters, all with exactly the same issue.  Their phone service has been useless so far.  I may stop by their store (when I travel to a nearby attraction) to check out their display unit, which I know works. Sigh ...
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #2 on: August 24, 2015, 09:03:09 pm »
Does your desk actually work?  Mine doesn't, and I suspect it is because the DC output is too low.

Hi sitandstand,

Yea it works perfect, to be honest better then i would have thought! Its true the DC output is lower then it says on the adapter (and manual), but it works. Are you sure the remote is working? There is a little pin you need to put slide in the controller, otherwise it doesn't work! Maybe try to measure the DC output on the leg where you plug the remote in? My first guess is, it has to do with the 'pin', try the other pin?

Good luck!
 

Offline sitandstand

  • Newbie
  • Posts: 2
  • Country: us
Re: IKEA Bekant Desk, motorised hack?
« Reply #3 on: August 24, 2015, 09:29:06 pm »
Thanks for the quick response!  It is good to know the voltage is not an issue.

I did try playing with the pin, but then got side-tracked by the voltage observation.

I will give it some more tries.

 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8240
Re: IKEA Bekant Desk, motorised hack?
« Reply #4 on: August 25, 2015, 01:40:50 pm »
That PIC runs on 3.3V provided by the LDO (L00B, LP2980IM5-3.3) and so it looks like the rest of the circuitry might just be a buck switching regulator to bring the 24V down to something the LDO can handle. The blue wire will be for signaling, probably some sort of serial protocol.
 

Offline jeroen79

  • Frequent Contributor
  • **
  • Posts: 529
Re: IKEA Bekant Desk, motorised hack?
« Reply #5 on: August 25, 2015, 08:15:22 pm »
You could look at the blue wire with an oscilloscope and/or logic analyzer.
Or measure things like AC voltage, frequency and dutycycle.

A digital serial interface could be used.
Or perhaps PWM to tell servos in the legs the desired height.

Does this desk have an option to remember standing and sitting heights for easier changes?
That could explain why they use a PIC.
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #6 on: August 27, 2015, 08:21:49 pm »
Thanks for the input!

I hooked up my scope to the blue wire (see the scope-shots). And indeed, there is some type of signal, interesting! There is some type of pattern. It looks like 11 'lows' (negative -10V), then ~ 50ms its 0, then it repeats. I inverted the signal, and trued to decode it (9600,n,8,2).

If i would interpreted these as 11 'bits' (if they are) could be 1 start, 8 data + 2 stop = 11 bits?

When i'm pressing the buttons, i dont see much change. I also wonder why the PIC would send out this 'heartbeat'?

I disconnected the remote, so i could see if the signal is in- or outgoing (see image #4). And it seems its coming from the PIC.

Is there some type of 'industry' standard protocol that would be used for signalling the motor to start turning (and which direction)?

Any clues how i could (or should) continue?

Screenshots 1-3 the heartbeat being send, screenshot 4 is the signal coming from the 'leg' when remote is disconnected.

Thanks!
 

Offline jeroen79

  • Frequent Contributor
  • **
  • Posts: 529
Re: IKEA Bekant Desk, motorised hack?
« Reply #7 on: August 28, 2015, 10:09:20 am »
Does the width of the pulses change?

If your scope can freeze the image on a trigger then you try to catch the frame right after the button is pressed.

You could also use another microcontroller as a makeshift logic analyzer/logger.

My guess is that the PIC is constantly sending commands (position or movement) to the legs.

The 50 Hz in image 4 is the same as the mains AC.
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #8 on: August 28, 2015, 12:26:48 pm »
I can setup my scope for a trigger, you mean like a external trigger?

Anyway, i could hookup my Arduino. Good thought! Thanks!

You have any idea why it would keeping updating the legs (if i disconnect the remote, nothing changes...)? Could this have to do with some type of synchronisation? Of course the legs need to move together at the same time.

I figured out its just a AC frequency :-[
 

Offline jeroen79

  • Frequent Contributor
  • **
  • Posts: 529
Re: IKEA Bekant Desk, motorised hack?
« Reply #9 on: August 28, 2015, 06:37:37 pm »
I can setup my scope for a trigger, you mean like a external trigger?
More like a pause function that freezes the screen at the moment of the pause and that can be triggered externally.
Quote
Anyway, i could hookup my Arduino. Good thought! Thanks!
You can let it record the time between the risings and fallings of the signal so that you can record a longer period without needing a lot of space.
Quote
You have any idea why it would keeping updating the legs (if i disconnect the remote, nothing changes...)? Could this have to do with some type of synchronisation? Of course the legs need to move together at the same time.
Maybe just because because they can afford it? This is not an application that needs every bit of bandwidth or processing power so continuously sending commands would not hurt performance.

Likely the blue wire carrying the commands from the controller to the left leg is continued in the cable between the legs. That way both legs will get the same command at the same time.
 

Offline Chris C

  • Frequent Contributor
  • **
  • Posts: 259
  • Country: us
Re: IKEA Bekant Desk, motorised hack?
« Reply #10 on: August 28, 2015, 09:15:37 pm »
Ever looked at how a hobby servo works?  They have a motor, a potentiometer, and a little controller, all together in one box.

You control them by sending pulses over a single wire.  The pulse width determines the position you want the servo to turn to.  If the pulses stop, the servo stops too. 

I'm going to take a guess your legs are driven by servos too.  Just servos designed for linear movement, instead of rotation.  That would explain why the pulses you see don't change very much when you press buttons on the controller.  You'd have the same number of pulses, same spacing, only the width of the pulses changes.  And even that would change rather slowly, if you're pushing up/down buttons.

I Googled "linear servo", and some came right up.  Hobby servos have a standard input signal format, linear servos probably do too.  If I'm right about this, between the oscilloscope trace and the datasheet for a linear servo or two, you can easily replicate the control signal.  Maybe even with an existing Arduino servo control library!
« Last Edit: August 28, 2015, 09:21:09 pm by Chris C »
 

Offline JuKu

  • Frequent Contributor
  • **
  • Posts: 566
  • Country: fi
    • LitePlacer - The Low Cost DIY Pick and Place Machine
Re: IKEA Bekant Desk, motorised hack?
« Reply #11 on: September 07, 2015, 09:17:50 pm »
Can't you connect additional (PC controlled) switches across the existing switches?
http://www.liteplacer.com - The Low Cost DIY Pick and Place Machine
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6459
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #12 on: September 08, 2015, 09:33:40 am »
If you have two motors, one  in each leg it is ofcourse essential that both motors turn exactly together and synchronised or your desk will get out of level.
Simple things are often quite more difficult if you have to prevent all things that might go wrong  ;)
These days it is often easier and cheaper to use microcontrollers than dedicated hardware, esp. if there are a lot of exceptions in the equation.
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #13 on: September 10, 2015, 09:03:18 pm »
Hi All,

*UPDATE*

I soldered two wires to the PCB (on white and blue). Then hooked up the scope, set it to rolling mode. Its weird, since i see the bit pattern repeating, but when i press the up/down button, nothing seems to happen at all (!). So thats kind of curious, the pattern just keeps repeating itself.

@Juku, thanks, yes thats a option (when just looking at the result). I have actually seen somebody do it. But it doesn't seem te "correct" way, for me. I would like to understand how it actually works ! ;-)

@Kjelt, yes i thought of that as-well. It would bring some serious problems if one leg would be moving while the other doesn't.

Any (other) thoughts?
 

Offline darthsteven

  • Newbie
  • Posts: 1
  • Country: gb
Re: IKEA Bekant Desk, motorised hack?
« Reply #14 on: January 05, 2016, 10:32:41 am »
onesixright did you get anywhere with this? I want to make something that allows me to save a preset height for the bekant desk to go to. Ideally it would be done in a more elegant way than 'pushing' the buttons with a relay or something.
 

Offline ivaylo

  • Frequent Contributor
  • **
  • Posts: 661
  • Country: us
Re: IKEA Bekant Desk, motorised hack?
« Reply #15 on: January 11, 2016, 05:41:11 pm »
The engineers here did a prank on a coworker here. Wired a WiFi remote (https://www.sparkfun.com/products/13231) to her Bekant desk and added a link on the company intranet portal. Now everybody in office can "adjust" her desk whenever they want. Glad she has a good sense of humor...
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 6693
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #16 on: January 11, 2016, 08:23:34 pm »
Presumably they use steppers, simplest way to keep the legs in sync.
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #17 on: March 05, 2016, 12:25:34 pm »
@darthsteven!

No, unfortunately not really. Truth be told, i needed to let this project rest for a while. But its still high in my list! Its just that my knowledge isn't enough to "grasp the concept". Apparently the steering signal  is on top of a voltage. But how to figure out what are the signals (which can not be hard: up and down), there is also the "problem" the signals are multiplexed.

I didn't want to go the way of "soldering some wires on the buttons", that 2 easy. Anyone having experience with how something like this could work, im happy to hear!

@macro, steppers? You have any info on how that would work?

@ivaylo got a link to this "prank" ?


 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #18 on: March 05, 2016, 12:30:00 pm »
This guy try to figure it out as-well, they are running into similar problems.

https://plus.google.com/+GinaHäußge/posts/3U5k1qKdLxH
« Last Edit: June 08, 2016, 10:39:07 pm by onesixright »
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #19 on: June 08, 2016, 08:08:37 pm »
OK, someone got further  :clap:

Apparently its the LIN protocol. https://en.wikipedia.org/wiki/Local_Interconnect_Network

More info: http://blog.rnix.de/hacking-ikea-bekant/
 

Offline grifftech

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: us
    • youtube channel
Re: IKEA Bekant Desk, motorised hack?
« Reply #20 on: June 08, 2016, 10:32:44 pm »
Use servo motors to push the buttons ;)
 

Offline timofonic

  • Frequent Contributor
  • **
  • Posts: 904
  • Country: es
  • Eternal Wannabe Geek
Re: IKEA Bekant Desk, motorised hack?
« Reply #21 on: June 09, 2016, 01:48:24 am »
What's the difference between linear actuators and linear servos? This video mostly explained one of them. The geekier and the smartest guy gets ignored by that "cool guy" one :/



Who's the one with the hat? Can we invite him to EEvBlog? :D
 

Offline robin7331

  • Newbie
  • Posts: 4
  • Country: de
Re: IKEA Bekant Desk, motorised hack?
« Reply #22 on: January 29, 2017, 10:28:43 am »
Hey guys,

I've successfully hacked this table :)
It acutally worked fine but I've missed some memory buttons that I only have to trigger once to let the table move to that position.

Made a little video.
You might be interested  :)



Cheers!
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #23 on: January 29, 2017, 10:52:35 am »
I've successfully hacked this table :)

Awesome! Thanks for sharing!  :-+

Just a few remarks.

  • You should check the motor doesn't run for more then 10 seconds (top of my mind), as explained in the manual (because of overloading/heating). After x seconds you want a pause.
  • My thought was not to hack the remote, but -since its a bus- add second master. This master you can then command via USB. Basically you could control the height via some short-key on your computer.

 

Offline robin7331

  • Newbie
  • Posts: 4
  • Country: de
Re: IKEA Bekant Desk, motorised hack?
« Reply #24 on: January 29, 2017, 11:04:12 am »
Thanks!

Well, as I simply simulate a button press instead of driving the motors directly I might already utilize some built in protecting stuff.
I'm not sure but I think that if you use the motors for >10 seconds in a row there is a built in 60 seconds cool down time.

I was also thinking of adding a second bus node but then I thought that my main purpose is to add those memory buttons.
These buttons have to be put somewhere so why not replace the old console with a new 3D printed one. :)

My arduino is absolutely controllable via USB. I've made a simple command parser (similar to AT-Commands). There you can set a specific target, change the threshold, store a position, call a position etc..

Its on GitHub: https://github.com/robin7331/IKEA-Hackant



 
 

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #25 on: January 29, 2017, 11:27:59 am »
Well, as I simply simulate a button press instead of driving the motors directly I might already utilize some built in protecting stuff.
I'm not sure but I think that if you use the motors for >10 seconds in a row there is a built in 60 seconds cool down time.

This is i got from the manual:
Quote
The table must not be overloaded - maximum load is 70 kg. The motors may be run continuously for maximum 1 minutes. Afterward, the motors must stand by for approx.
9 minutes before they can be used again.

Because the way they write this, I'm not sure if it had built-in protection. Well you know, with maybe kids around (they love to press buttons) :P Bit of extra protection couldn't hurt.

I think you can flip your Arduino pretty easy into a LIN Master/Slave (?). Did you actually figured out which is the master? If you would unplug one leg, it could ruin your day. I don't know much about the LIN protocol, but as i understood you can have multiple masters. Maybe each leg is a master?  :-// The legs must move simultaneously. I was at the point of removing the controller and see if the legs are the ones transmitting (being the master). But never got to it.

BTW you solution is great, i just wanted to take the opportunity to get better understanding how the LIN protocol was utilised.

Thanks for the source! I'll have a look at it  :-+
 

Offline robin7331

  • Newbie
  • Posts: 4
  • Country: de
Re: IKEA Bekant Desk, motorised hack?
« Reply #26 on: January 29, 2017, 12:19:01 pm »
Quote
Because the way they write this, I'm not sure if it had built-in protection. Well you know, with maybe kids around (they love to press buttons) :P Bit of extra protection couldn't hurt.

Well yes your probably right! This should be fairly easy to implement in software. (I don't have kids in my office, therefore I'm not gonna implement that. Feel free to do that and hit me if there are some questions!)

Quote
I think you can flip your Arduino pretty easy into a LIN Master/Slave (?). Did you actually figured out which is the master?

The control PCB is the LIN master. That's why you see something on your oscilloscope even if you have it unplugged from the rest of the table.

Quote
I don't know much about the LIN protocol, but as i understood you can have multiple masters. Maybe each leg is a master?

LIN only supports a single master device. It's a pretty easy and straightforward protocol. The master sends a packet header (thats what you see on your scope even when it is unplugged). Every header consists of an identifier. So the slave nodes listen to every header frame that comes in. They have their identifier hardcoded and if they see a frame with their ID they will respond with some data and append that to the header frame.

So if you move your table up you won't see very any additional packets. It's the same as before except the data of one special packet is updating the position. As far as I know the master device sends a desired target position. The legs (LIN slaves) receive that positioning information and move the motors until it matches that.

My new device did not replace the LIN master. It basically is a new LIN slave. The only tethering I have are a common ground wire, a single wire to get the LIN bus and two wires that simulate a button press. You can easily mount that old enclosure back and have that new controller somewhere else.


 
The following users thanked this post: onesixright

Offline onesixrightTopic starter

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Re: IKEA Bekant Desk, motorised hack?
« Reply #27 on: January 29, 2017, 12:24:07 pm »
Awesome, I think i mixed-up LIN with CAN (CAN supports multiple master)  |O

I'll check it out! Thanks!

 

Offline robin7331

  • Newbie
  • Posts: 4
  • Country: de
Re: IKEA Bekant Desk, motorised hack?
« Reply #28 on: January 29, 2017, 12:30:50 pm »
Sure no problem!

Well LIN is also something that is usually used in cars. (Thats probably why the bus level is at roughly 12V).
Maybe that's why you got confused :)
 

Offline robertaramar

  • Newbie
  • Posts: 1
  • Country: de
Re: IKEA Bekant Desk, motorised hack?
« Reply #29 on: March 09, 2017, 11:29:30 am »
Hi,

I used Robin's instructions and code to build that solution in my table.

Please see some instructions here: https://robertaramar.wordpress.com/2017/03/09/hacking-an-office-desk/

Thanks for your work, Robert

Regards,

Robert
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17729
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: IKEA Bekant Desk, motorised hack?
« Reply #30 on: June 05, 2021, 08:32:50 am »
Awesome, I think i mixed-up LIN with CAN (CAN supports multiple master)  |O

I'll check it out! Thanks!



As I was brought here to delete some spam which I am sure you were all notified about I won't feel too bad about posting on an old topic. There is no master or slave in CAN. Every device just transmits what it wants to transmit when it wants to. But the design is very clever and will resolve bus collisions without loss of all messages so no time is wasted.

The only hierarchy is given by the ID of the message being transmitted (strictly speaking a device does not have an ID the message(s) it transmits do). Because the 0 state dominates (bus driven) and the 1 state is recessive (bus released) the message with the lowest number because it has more "0's" will win arbitration, each device monitors the bus whilst transmitting so if another device is also transmitting a message with a lower ID when the first 0 transmitted happens it overrides the 1 transmitted on the lower priority message and the transmitter of that message sees that it has been beaten to it by higher priority message as the bus state is no longer what it is transmitting and it backs off and the higher priority message goes through unimpeded and non the wiser that something else wanted to transmit as well. The device sending the lower priority message will have another go at a set interval later. For this to work the design of the system must be so that the bus cannot be more than 70% loaded or lower priority devices will start to mis out.

As such you can't have multiple devices sending the same message ID as this will corrupt the bus. So everything is just transmitting oblivious to who is seeing or doing what with it's message, no masters, just higher priority messages that will be guaranteed to win through.
 
The following users thanked this post: SilverSolder


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf