Automating an IKEA Standing Desk With Arduino
Вставка
- Опубліковано 21 лип 2020
- Standing desks are great. Holding down buttons is not. Let's automate an IKEA standing desk with an Arduino and some simple components.
STEP-BY-STEP BUILD WRITE-UP: bit.ly/3qZrA1Z
I'm new to electronics, and if you saw my video on coding chess in Python, you'll know my other electronics/Arduino project was a simple cable tester. Here I learn about MOSFETs and how useful they are in switching power on and off. Add in an Arduino Nano, and voila... you have a desk automater.
I'm so happy to have made the device after wanting my desk to have this function for so long. Plus, it gave me an excuse to finally buy my very own Hakko FX-888D. That REALLY made me happy.
I also had the chance to reflect on my foray into UA-cam. I have no idea where this will all take me. As of publishing this, I have a grand total of 1 organic view on my chess video. Still, that view means the world to me. I hope you enjoy it as well, and if you're thinking of starting something new... please... do it. The world needs more passionate people who chase after their dreams. You'll doubt yourself, you'll make mistakes, and you'll think your work isn't good enough. And you know what else? You'll love what you do, you'll feel alive, and you'll learn more than you ever thought possible. I'm attempting that right now, and I could always use another friend to bounce ideas off of and share stories with.
Join me.
-- Parts I used --
As an Amazon Associate I earn from qualifying purchases through links in my descriptions and comments. This helps me finance future videos at no additional cost to you. If you choose to support me in this way, thank you.
IKEA BEKANT desk: bit.ly/3qV2YHR
Arduino Nano clones: amzn.to/3jcLDsw
Power jacks: amzn.to/3y0absD
MOSFETs: amzn.to/2UBGXlC
Buttons: amzn.to/3AR0ijy
Button caps: amzn.to/3yR7UAN
Helping hands, similar: amzn.to/3AOzD6J
Protoboards: amzn.to/3AR0Upf
Headers: amzn.to/3k2LacN
Wire: amzn.to/3haZlJz
Standoffs: amzn.to/36GHCF8
Screws: amzn.to/3zd5HPZ
Resistors: amzn.to/2UIjCPl
Power supply: amzn.to/3kBhKmf
Soldering iron: amzn.to/3dfthmY
3D printer: www.prusa3d.com/original-prus...
Wiring diagram: imgur.com/Jt5Zl5V
Desk PCB hookup guide: imgur.com/1EKVdUn
Code: bit.ly/3H3jOfq
Download the Arduino IDE and language: www.arduino.cc/
-- Attributions --
Music (in order):
1) Description
2) Song
3) Artist
4) Download
Mellow Morning by Dixxy from Soundcloud under CC BY-SA 3.0
bit.ly/3fas6nw
bit.ly/2BNbBPW
bit.ly/3fas6nw
bit.ly/2E3zKmb
I Don't Need U 2 Say Anything by Le Gang from SoundCloud under CC BY 3.0
/ thisislegang
bit.ly/3e6Y4Qj
bit.ly/2Z5lfWS
bit.ly/2OGVg23
Drops In Mind by Le Gang from SoundCloud under CC BY 3.0
/ thisislegang
bit.ly/3e6Y4Qj
bit.ly/38IJZrm
bit.ly/2OGVg23
Bottom by Freek Van Workum from Soundcloud under CC BY 3.0
bit.ly/3gHDrMt
bit.ly/38BbNh1
bit.ly/3gHDrMt
bit.ly/2OGVg23
100 Steps by Le Gang from Soundcloud under CC BY 3.0
/ thisislegang
bit.ly/3e6Y4Qj
bit.ly/3fbWxtB
bit.ly/2OGVg23
Merry Bay by Ghostrifter from Soundcloud under CC BY-SA 3.0
bit.ly/3gvIpeW
bit.ly/3fcqFoS
bit.ly/2CcRIBF
bit.ly/2E3zKmb
I Am Thou (no drums) by arvnd from SoundCloud under No Copyright
bit.ly/3gzyTaK
bit.ly/2O1I3AA
bit.ly/3gzyTaK
Shush You by Le Gang from SoundCloud under CC BY 3.0
/ thisislegang
bit.ly/3e6Y4Qj
bit.ly/2CjMS5x
bit.ly/2OGVg23
Lonely Cry by LucidDream from Soundcloud under CC BY-SA 3.0
bit.ly/2CgRR72
bit.ly/2OhEoip
bit.ly/2CgRR72
bit.ly/2E3zKmb
Strangers by Le Gang from SoundCloud under CC BY 3.0
/ thisislegang
bit.ly/3e6Y4Qj
bit.ly/2CjN70r
bit.ly/2OGVg23
The Forest by B3NJ4M1N from FreeBackgroundMusic under No Copyright
bit.ly/2Cjy7Q8
bit.ly/31Rv2Sl
bit.ly/2VXQYYe
Graphics:
1) Description
2) Download
3) Artist
yellow-lighted arch tunnel road by Daniel Jerez from Unsplash
bit.ly/2WBvctq
bit.ly/3fYOoJD
metal nut isolated on white background by Scrudje from Shutterstock
shutr.bz/3jnY6qU
shutr.bz/32APreD
Sound Effects:
1) Description
2) Download
3) Artist
4) License
Door Slam 2.wav by lyd4tuna from Freesound under CC0 1.0
bit.ly/3juwNeL
bit.ly/3hd7xrc
bit.ly/2CQOdRS
BleachHit.wav by eardeer from Freesound under CC0 1.0
bit.ly/3jxyhF0
bit.ly/32FohTY
bit.ly/2CQOdRS
Outtake Beep-1k.wav by slappy13 from Freesound under CC0 1.0
bit.ly/39ei7LI
bit.ly/3fP6r4A
bit.ly/2CQOdRS - Наука та технологія
Just discovered your channel and watched all your videos. This one is the funniest, IMHO ^^ Keep the good work, I'd love to see more projects like this or the cornhole board one! :D
I'm touched you went and watched my older videos, and delighted you enjoyed the humor of this one. Thanks so much for the feedback. I was worried it droned on too long, and while I'm working on reducing "dead space" in my videos, I'll say I'm with you on liking this one in particular.
This was my first step into just "going with the flow" (as you can tell given the shift from my fully scripted Python chess video), and I had a lot of fun making it because of that. I'm really enjoying the electronic projects in particular. More are on the way as we speak. =)
This is an awesome video. I love your enthusiasm and I agree with you… that feeling of anticipation and triumph when you work on something and it works for the first time is absolutely amazing.
Sooo, anywhere I could buy one already made so I could cut the old controller off, splice the wire, and install a new one?
This was awesome! Keep up the good work 😄
So glad you enjoyed! I've got another build in progress right now. Working with a new microcontroller board this time. I'll share it ASAP!
Nice, you could also add some kind of distance sensor like an ultrasonic one to measure the actual height of the desk relative to the floor to improve it even more.
That would be cool! It could be completely hidden on the bottom side of the box too. Add a potentiometer to adjust the particular height it moves to, with an auto-darkening eight segment display as a readout to show the selected height.
Amazing video!
Thank you! I love using the device each day since I made it. More videos in the works, can't wait to share them with you!
Good job 👍 ❤
Loved the video, and glad to know I’m not the only one who gets excited when my projects work. I really like the simplicity of a timed contact closure, but I’m wondering if that’ll hold up over time as the motors wear. Your preset height might drop over time.
I see you left the USB exposed to ease reprogramming. Smart. But if you get bored and want to play around, you could add adjustment pots to your circuit to fine tune the preset points. Figure out a formula to tie resistance values to an adjustment delay and you’ll never have to reprogram it again.
In either case, you inspired me to mess with one of these!
You're on to something; even after only a handful of uses, you can tell there is a slight change to the actual height the desk moves to. I can manually adjust it with the momentary button, then it's fine, but it is a small issue with this design.
In more advanced versions of the mod, I've seen people actually read signals from the desk PCB in order to move the desk to the same position every time. Much more work, but really impressive. Elaborate on your pot method. I'm trying to grasp it and it could be fun to add those in later for more precision.
Let me know how it goes! It's made me want to use my desk that much more. Highly recommend it.
@@HardwareUnknown oh yeah, the “right way” is to have some sort of direct feedback mechanism. Ultrasonic distance measurement, or some sort of encoder on the motor, but like you said, that’s a lot of work.
My idea would add a little bit of adjustment without gutting what you’ve done.
Right now I’m assuming your code goes something like this:
if(the automatic up button is pressed)
{
HoldButton(PerfectDelay);
}
I’d do something like this:
if(the automatic up button is pressed)
{
adjustedSecs = getPotValue();
HoldButton(PerfectDelay+adjustedSecs);
}
The getPotValue() function would read the Pot value, 0-1023 from calling an analogRead() and spit out the adjusted time in seconds (maybe milliseconds?). I’d probably set 512 (the mid point) to spit out 0 secs, so you can either add or subtract time as needed.
Hardware wise, the Pot would connect to 5V, Gnd, and an analog input pin. Like this: www.arduino.cc/en/Tutorial/BuiltInExamples/ReadAnalogVoltage
This was typed on a phone while kids were running and screaming around me. I hope it made sense. Feel free to tell me if it didn’t 😂
@@mcohn16 Totally got it now. I like it! At the time I had only considered reprogramming to adjust things, which can get tedious if you're doing so a lot. Particularly with devices that are screwed to the underside of your desk, opposite your computer and you've run out of USB extensions (clearly I hadn't fully thought this through then haha).
Not only could this be useful here, but I'm sure I'll make use of the pot adjustment in future builds too. Usually I've just reprogrammed whatever I'm working on, but I'll eventually be doing more builds that might be used away from home/a computer. I love the idea of incorporating on the fly adjustment.
This was an awesome project, I'm just wondering where you were able to get an extra desk button switch? I'm worried about destroying the original and only one I have. I have the exact same desk.
IKEA is really great about providing small spare parts. I had lost some of the parts in a move beforehand and they sent me extras. That gave me the second button. You can request parts by phone by calling their customer service, and there are also some instructions on finding part numbers here: www.ikea.com/nl/en/customer-service/returns-claims/spareparts/. However I just gave them my model of desk and asked for parts including the control board and they knew what I meant.
Nice job.
Thank you, its such a nice feature. I use it all the time while at my desk.
That was badass
Glad you enjoyed! It was a fun first practical electronics project. Can't help but feel even better about it when your desk upgrade is described as badass. You put a smile on my face.
I'd vote for a bit shorter personally. Maybe some like that style though.
I completely agree; this was really long for what it was. Even though I'm still discovering my video style, I already look back on this as an "early work" that was fun to make, but needs improvement. I'd be curious to hear what you think of a couple of my more recent videos (the cornhole boards, and the Galaxy Watch charger switch) in comparison. In each, I attempted to rein in the focus of the video, and add some entertaining story elements. Thank you for the feedback; it really does help me improve.
@@HardwareUnknown Thanks for the reply. I've seen some of the cornhole board video. Pretty neat concept.
You may eventually want an end stop switch on this one. I imagine things get a bit complicated if you hit the wrong auto button!
You've got a good eye... and I hit the wrong one when I move past the desk every so often. I really should inset the box from the front of the desk.
The nice part is the desk comes with internal endstops of some sort. Even if you hold the button down at the top or bottom, it simply shuts off the motors. Since my mod emulates the button presses, that functionality still works. The desk even has crash detection in case it's only halfway up and binds on a body part or nearby furniture. Thankfully that also functions normally as well.
@@HardwareUnknown Ha, thanks. That is good to know about the end stops. Perhaps that detail was in the video somewhere.
Good luck with your videos!
Where did you get the spare control boxes. Does IKEA sell them separately?
Good question. I don't believe they sell them individually. However, when I was re-assembling my desk after a move I noticed I had lost some of the hardware and electronics. I called customer service and told them about the issue, assuming they would direct me to a spare parts page online to purchase them from. Would you believe it, they shipped me out a set for free that included some bolts and the controller (all small parts, I wasn't asking for the legs or table top). Shipping takes a bit as the parts aren't always locally stocked depending on where you live, but you just can't argue with free replacement components and quality service like that.
If I remember correctly, the number on the following page is the one I used (I'm in the US): www.ikea.com/us/en/customer-service/contact-us/
Very cool
Thank you, it's a nice improvement.
Good video. I agree a little shorter would fit this genre better, but it was good enough for me to watch the whole thing. Subed.
I appreciate you taking the time despite the length. Definitely a fun, but early, video and I'm still learning what style I want to go for. No more 30 minute rambles without scripts for me; I want more targeted info and entertainment for you all. Thanks so much for the sub and feedback, please keep doing so as it helps me improve and find what you and other viewers enjoy.
Really enjoyed the video, i definitely thought something about this when I bought the desk! I'm indeed not a person knows about electric(i kinda should've because studied mechanical engineering), though I was wondering if we can somehow get the power from desk itself for the Arduino. It's not really an important case, because ideally i'll have one Arduino that controls everything at home which will be connected by power adapter anyway.
You definitely could get it from the desk somehow. The motors will use way more power than the board will, so there is a way somewhere to steal from that. I haven't looked into specifically where to tap into, but that would make it really clean.
I have owned the same desk for years and it drives me crazy this is not a standard controller for the heights. The IKEA team even went to lengths to develop a 'Gaming Desk' with a custom controller with programmable heights and a display! They made the critical mistake of designing it to only be compatible with the Gaming Desk's automated legs and not backwards compatible with the BUKANT or other Sit/Stand desks in their catalog. I am heart broken. I would buy one of your desk controllers in a heart beat 🥲
It has been a while since you posted. I hope to see you making videos again soon!
I hadn't heard of the gaming desk they made until now. Why they didn't go for backwards compatibility, I have no idea. An automated controller should be the norm for electric desks!
As it is such a niche product made for a single desk, I hadn't taken the time to make an PCB to replicate it easily. However, if you are interested I do one off projects and could recreate this for you to use on your desk. Email business@hardwareunknown.com and let's talk.
It has been quite some time, indeed. I've been on a bit of a hiatus focusing on some personal matters. Rest assured though, I've only just begun with the videos. There will be more to come. Thank you for your support!
Does anyone know if the BEKANT legs can be daisy chained together? For example, I'd like to have 4 legs controlled simultaneously by a single controller (or even a secondary controller in parallel).
I'd like to dive into the LINBUS system eventually but for now would be happy essentially getting two desks to work together. Was thinking of hacking the controllers and connecting the buttons in a similar fashion as this video but would love a plug-n-play solution.
I don't know what the connectors are called, but the "to" and "from" connections on both legs are the same. This may lead to daisy chaining ability beyond two, I can't be certain. There may be only two signals from the board, I haven't checked. I hope an experiment works out for you, or at least gives more insight into a solution. Wish I could offer more here.
29:29 “Oh, hi, Chip…” me thinking he’s talking to the Arduino. “Come here, buddy” oh, he has a dog! 😂
Hahaha I hadn't even thought of that. "Hi Atmel chip!" Yep, Chip is a great boy who likes to check out what I'm doing, often interrupting a take. Means a lot to me you watched that far in. Hope you enjoyed.
U can add iot based arduino and set it by voice command
Nice video. I watched it some time ago haha 😄
Glad you like it! I loved making the automater as I've had this desk for years and wanted to improve its function all that time. Finally I learned the skills to do it. Plus, you'll notice how different this video was from the talking head style of my first ever video. I enjoyed the change, hope you did too.
nice Video but WHY the AXE/ Chinese knife to cut the cables when you have the right tool (leatherman or the cutter from min 4:25)
Sometimes the wrong tool is the fun tool.
Awesome! I have this desk myself and will definitely do the same.
Quick tip regarding the pull-downs, by the way:
The AVR microcontroller on the Arduino has integrated pullups, so there's no need for the external resistors. Just hook one end of the buttons to ground, the other to an input pin with pullups enabled, and you have an active low button. Also, for the mosfets, no pullup or pulldown is needed since then the pin will never be floating when it is set to output. The voltage will always be either high or low depending on what's decided by the firmware.
Keep on trucking, this video was really cool. Thanks for that!
And by the way, Microchip (who makes the AVR) shared your video on their facebook page: m.facebook.com/story.php?story_fbid=3859847874033885&id=308077542544287
This is so good to know! It's funny, I had used the input pullup in some tests beforehand, then completely blanked on the idea of including them in the final build. I guess my mind, being new to Arduino, could better conceptualize the mechanism when I saw the resistors. I'll definitely be doing this next time, thanks for that. Now is there a practical limit to how many buttons I could run off of one microcontroller's input pullup?
Oh wow! I saw the Twitter post, hadn't seen the FB one. I'm really glad they're enjoying it. It's been such a quality of work life improvement for me that I hoped others would try it out too. Let me know how your build goes.
@@HardwareUnknown that makes a lot of sense! Plus it probably makes it easy for other makers nok to forget to add the pullup when they can see it right there in the schematics.
Nope, there's no limit. I believe the internal resistor for each pin is at around 10k :)
@@HardwareUnknown will do! I have some cool ideas that I'll try
For anyone who doesn't want to open up a desk height controller unit and figure out what to do.
I'm pretty sure you can buy a different controller from Linak (Ikea standing desk) or from the manufacturer of the actuators (motors) for the standing desk you have.
No kidding! I learned a lot from this and I'm very happy for that, but I'd love to have a drop in replacement. I'll have to check Linak out.
Where’s the fun in that!? The moment something you did yourself works is priceless
I thought ROL ERGO was the manufacturer of these legs?
I do enjoy that aspect of all this, of course. Just nice to have options. This was a great learning experience though, and I proudly make use of my creation to this day.
Awesome Project! Can you share the python code and schematics of your project?. Thanks again!
Glad you enjoyed it! I just added links to the code and wiring diagram in the description, and here they are as well for quick reference:
Wiring diagram: imgur.com/Jt5Zl5V
Desk PCB hookup guide: imgur.com/1EKVdUn
Code: github.com/hardwareunknown/public/blob/main/desk_automater.ino
I'm working on a full build write-up that would be easy to follow step-by-step. It will also include STLs for the enclosure. I should have that finished in the next couple days.
@@HardwareUnknown Thank you!!
Here's the write-up!
www.hackster.io/hardwareunknown/ikea-bekant-desk-automater-1bf85e
close your eyes and its literally kermit narrating an arduino build
I've seen this comparison a number of times in the comments of my videos. It makes me realize I need to work on the impression and truly perfect it. It's currently unintentional. Imagine if I tried.
@@HardwareUnknown literally unfathomable potential. your ceiling is inconceivable. kermit impersonators around the globe would be out of a job, begging on the streets for work. the world be changed forever, humanity would enter a new era.
Nice. Lately I've been wondering if I should get a bekant myself. This desk seems overpriced.
Electric desks are pricy. Really depends on the person if it's worth it. Changing from sitting to standing and back frequently helps me focus and eases back pain, so it's worth its weight in gold there for me in particular.
I like the Bekant in particular because of how smoothly it moves and how large the surface is. That being said, there are other desks out there that I'm sure do the same thing for less. Overall though, I'd recommend sit-stand desks in general.
Really entertaining. I probably prefer the scripted, premeditated approach of your first chess video. There is just more structure and consistency to it.
I agree. The desk automater and mountain bike conversion videos were two attempts at unscripted to see how it felt. The latter being my least favorite video; just way too long with me rambling. I learned from that. I prefer scripted as it flows a lot better and I have time to write the jokes and supporting information.
The cornhole board and trailer light backpack videos were sort of half scripted with jokes and a story, and I enjoyed making those. For the headphone video and beyond, everything has been scripted, and I think those demonstrate more of what's to come, particularly the air cannon videos as they're my most recent. Thanks for the feedback, and please keep letting me know what you think. It really helps me improve.
@@HardwareUnknown No worries. Will do. I look forward for future projects
Great job, now do collision detection :)
What's cool about this desk is it actually has it built in. I believe it's via torque/current sensing in the motors, although I can't be certain. Since I'm simply emulating the buttons with my device, the collision detection works just as before! So if the desk reaches the max height or hits something before the Arduino move command stops, it will stop even though the Arduino is still "pressing the button".
@@HardwareUnknown awwww mannnn. My Tresanti doesn’t have collision detection
Have a stacked dual monitor arm that’s literally a pole, long story short I accidentally pressed a preset button and it started rising, my ceiling is slopped due to it being right under the roof and it wanted to keep going… sucked but I managed to move the desk away quick before any real damaged happened
But I have that thing unplugged now
How fortunate you were able to stop it! A set up like that isn't cheap to fix. I'll say I highly recommend the Bekant. I'm not sponsored by IKEA, I just like it as a product. Once it contacts something, it attempts to move slightly more before sensing it and stopping. Hence why I think it's motor current sensing. While it doesn't have auto movement (thus the video) even before I added that I loved this desk. Give it a try if you're ever looking to switch.
jajajajajaja.....
I know that feeling 8:50
It's the best! After hours, days, weeks, months of work. Whatever it is, and it finally... just... works. Makes the struggles completely worth it. Cheers for reminding me to look back on the successes, my friend.
Murphy's law says IKEA will introduce a drop in replacement control box with this feature, next week...
Darn that Murphy's Law. Honestly though, I'm all for it. Proper compact PCB, injection molded housing, they could easily make it happen if they wanted to. I love mine. Still, there's always room to improve anything. Imitation is the sincerest form of flattery.
There is an alternative opensource controller replacement:
ua-cam.com/video/QopaeB1k6LU/v-deo.html
I love this, it's so clean and the fact that it makes use of the original buttons/case is really cool. They definitely removed the welded part of the case better than I did. 😆
Just drop that here: ua-cam.com/video/AB75AxprXqQ/v-deo.html basically what you did but with linbus reverse engineering to get height values. Im still trying to figure out to get this with esp8266 working, but to afraid to fry the controller :/
Saw that build, man it's done so well. Properly getting the values really was something to see. Mine was a hacky solution that works for my limited knowledge, but wow I'd love to have the experience to do what he did.
If it means anything, you can get replacement controllers from IKEA. I broke my first one. You'll learn so much along the way!
lol that is slow?
Not really, no. A bit of hyperbole. However, when you change your stance every hour each day like I do, you want it to be efficient.