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

0 Members and 2 Guests are viewing this topic.

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: 17816
  • 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