DIY Height Adjustable Desk

17 February 2020

// teaser: /assets/images/height-adj-desk/old_desk.jpg

Puh, one year without a post on this page… time to write about something. This Project has been going on for a year now, so it’s time to finally document it here.

Background

I wanted to have an electrical height adjustable desk since quite some time. You know, they say it’s good for your back and before I do more sports, I’d rather build a new desk 😉. But in my previous flay, my desk was located under the sloping roof, so it was not possible to increase the height.

“Challenges”:

  • My desk is 2.5m long and it has to stay like this. IKEA for example sells height-adjustable table frames for ~400€, which is not only too expensive for me but also too short.
  • The weight that has to be lifted. This is of course related to the first problem, but the tabletop alone weights more than 15kg, than there are two monitors, soldering station and plenty of junk that has to be lifted. My first rough estimations were, that I need more than 500 N lifting power.
The desk before the project

Materials

  • I reused my 250cm x 80cm beech tabletop.
  • The legs are build from two 120cm x 80 cm beech plates
  • 4 Linear actuators (see below)
  • 8 ball bearing drawer slides
  • 12 V Powersupply
  • PCB, switches and other electronic components
Wood for the legs

The Motors

So one of the most important questions is, how to lift the stupid tabletop. I looked around and found some projects like this, which used linear actuators. This sounded like a good idea, so I looked on Ebay if there are some available.

Turns out: There are plenty available, most which are scraped from old hostpital beds. Buuuut: when I looked, all of them had at max 40cm travel distance. A desk usually has a height of 85cm and when I stand, I’d like a height of approximately 1.15m, so 40 cm would be enough, but there is not that much wiggle room. So I wanted a tiny bit more. Of course, you have to pay attention not to use actuators which are too long, because that limits your lowest possible height.

So I looked over to AliExpress and found these 55cm actuators. They are sold in different speed/power combinations, which is achived by changing the gears in the motor. For this project I initially bought 2x 12V 500N 20 mm/s, and later on two more, because the lifting power of two of them was not enough. So in the end, it was about 180€ for the motors.

20mm/s is fine for the desk, it could be a bit more though. If I’d do it again, I’d definitely use the 24V variant instead and see if I find some which are a bit stronger at the same speed.

Legs

First Attempt

The old version of the desk had 4+1 legs (one in the center to avoid sagging). But as the speed of the linear actuators is not really matched and is heavily depending of the load, 4 independent legs would require a hell of electrical regulation. Instead I decided for a two-leg version:

Schematic drawing of the legs

The basic elemet is a wooden column that is fitted inside a slightly larger wooden column, so that the inner one can slide in and out without too much wiggle. I assembled the outer column around the inner column and used small pieces of paper as spacers. The actuator is placed on the outside of the hull and pushes the tabletop up and down.

Building the outer column

For stabilization, there are additional crossbars on the lower part. Because the upper part has to slide into the lower part, I needed some other kind of stabilization here. I used four 20mm angle brackets. The resulting stability is quite good.

Adding the angle brackets to improve the stability of the upper part
The linear actuators are mounted on the outside
Assembled first version of the legs (without crossbars)

Legs - Second Attempt

While the legs worked fine when testing them without the tabletop mounted, a major problem appeard after the assembly: The weight of the tabletop is not evenly distributed across the depth of the plate. Because the monitors and other stuff reside on the back edge, there is a huge torque applied from the inner column towards the outer column. This results in the columns jamming into each other, which massivley increases the required force to move the desk.

I took two countermeasures to mitigate this problem:

  • Using four instead of two actuators.
  • Building a second version of the legs which does not jam under load.

The major change here was, that the inner column does not directly slide on the outer one, but instead I mounted four ball bearing drawer slides for each leg (toal of ~45€). I rebuild the columns but keept most of the other parts from the first version.

Second version of the legs with ball-bearing slides

This was a major improvement. Now the motors can lift the desk without any problems.

Stabilization

Across the 2.5m of the tabletop there is a huge sag. I think it was something like 2cm. Before this project I simply used a fifth leg in the center, but this is of course not possible here. Instead I mounted a ~20 cm high and 2.5m wide wooden plate to the backside of the desk, perpendicular to the desktop. This also has the advantage, that nothing can drop from the back of the desk anymore 😄. I also attached some mounts for tools and a multiple socket outlet to that plate. Quite handy!

To avoid the legs tilting outside, I had to connect them with a long bar. Originally, I wanted to avoid this as I had some bad experiences regarding leg movement. But the sidewards movement was too bad, therefore I mounted the bar as high as possible and now it hardly disturbes me at all.

Electronics

The motors run with 12V and draw up to 2 A each. Therefore, I bought a 12V 10A powersupply for 16€ on ebay. I measured the idle power consumption, and it was 3 watts. That’s too much for a device that is used once or twice a day for 20 seconds. So I had to install a power switch before the powersupply, to eliminate the power consumption.

4 Amps for a pair of motors can not be switched with a normal transistor anymore, so I used 3 relais in total. One switches polarity of the supply voltage (lift and lower the plate) and the other two controll one pair of linear actuators each. Using 24V actuators would have made the choice of the relais easier, as it is not that easy to find some which are suited for more than 4A. To drive the relais from the microcontroller, I used cheap bipolar transistors.

Because the speed of the actuators is depending on the load and the weight is not evently distributed, I had to install a kind of regulation. Otherwise the tabletop would tilt when moved. I considered a few methods for that and ended up using an accelerometer to measure the tilt and control the motors accordingly.

I designed a controller PCB with KiCad. This was my first real project in KiCad, so there is of course plenty of room for improvement. A friend of mine has a CNC and my original plan was using it to cut the PCB. Therefore the PCB is only one sided. But as we could not find an appointment for cutting it, I decided to let it manufacture professionally at (JLCPCB)[jlcpcb.com]. This was suprisingly cheap. It costed me something like 7€ including (slow) shipping.

The other compone

besser 24V statt 12V (Relais zu klein)

Planned to be cncd

img1-style=”width: 250px”

Schematic and PCB for controlling the motors

Programming

Lessons learned