element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Project Videos
  • Challenges & Projects
  • element14 presents
  • Project Videos
  • More
  • Cancel
Project Videos
Documents Hacking an IKEA Desk into a Programmable Electric Workstation -- Episode 704
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Project Videos to participate - click to join for free!
Related
Recommended
Engagement
  • Author Author: cstanton
  • Date Created: 4 Mar 2026 9:41 PM Date Created
  • Last Updated Last Updated: 5 Mar 2026 1:46 PM
  • Views 41998 views
  • Likes 7 likes
  • Comments 4 comments

Hacking an IKEA Desk into a Programmable Electric Workstation -- Episode 704

In this project, Milos converts a manual IKEA Trotten desk into a fully motorised standing desk using a 12V drill motor, quadrature encoder feedback and an ESP32 for control. The system includes soft-start motor driving, homing with limit switches, memory height presets and a built-in web interface for Wi-Fi access. All mounts are 3D printed, and the desk frame is expanded with modular aluminium extrusions for future upgrades. If you’re interested in ESP32 projects, desk automation or practical workshop builds, this shows how to build a programmable sit-stand desk on a modest budget.

Build with Milos

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

The DIY Motorised IKEA Desk

Milos came across an IKEA Trotten standing desk while browsing Facebook Marketplace. The desk was manually operated with a hand crank, but at roughly $100, it was a good starting point for modification. Once assembled at home, he noticed the lifting mechanism was driven by a simple 6 mm hexagonal shaft. As he put it, “it’s just a six millimetre shaft that you need to run to one or the other direction to lift the desk up or to lower it down”

That detail made the project straightforward in principle: rotate the shaft electrically in either direction and control the motion precisely. The goal was to convert the desk into an electric sit-stand workstation for around $50, using readily available parts and custom electronics.

image

Idea & Plan

Mechanically, the desk didn’t require reverse engineering of the internal gearing. All that mattered was bidirectional rotation of the 6 mm hex input. Milos mounted a geared DC motor to drive the shaft and placed an incremental encoder on the opposite side of the mechanism. As he explained, “I put the motor and the encoder on opposite sides of the table mechanism. If you're going to do that, also make sure to cut the shaft long enough so it reaches both the motor and the encoder”

The encoder provides relative position tracking. The model used outputs 20 pulses per rotation, producing quadrature signals (A and B) that are phase-shifted. This allows the firmware to determine both movement and direction. As Milos clarified, “for the one I'm using, there will be 20 pulses per rotation, so we can then translate those pulses into actual table height” . Direction detection is handled by reading which signal transitions first.

However, incremental encoders alone cannot provide absolute position at startup. To solve this, he added a micro-switch at the lowest desk position. During a homing routine, the desk lowers until the switch is triggered. “This is why we need a known position… we’re going to get that using a micro switch”

In the final design, two switches are wired in parallel for redundancy, ensuring reliable homing and providing a hard lower limit stop.

image

Motor Selection, Power Considerations & Motor Control

Torque was the primary requirement. Initial thoughts included automotive windshield wiper motors, but these were bulky and potentially overpowered for the application. Milos instead looked at tools designed for compact high-torque operation and landed on a 12 V cordless drill motor.

“I had an old Parkside drill that's running on 12V, and I decided to test it out with the Ikea Trotten desk… and as you can see, it can go up and down without any issues”.

The drill motor’s gearbox provided sufficient torque, and importantly, its output already featured a 6 mm hex coupling, a direct match to the desk’s crank input. This eliminated the need for custom couplers or machining. The motor, gearbox, and hex adaptor were extracted and bench-tested before integration.

Bench testing quickly revealed a problem. When powered from a current-limited bench supply set to 12 V and 3.5 A, the motor immediately triggered over-current protection.

“As you can see the power supply goes into over-current protection immediately… the motor doesn’t actually spin”

Direct battery connection proved the motor was functional, but produced a large inrush spark. Milos observed, “the motor, when it’s in a standstill… the current it needs is rather high”

The solution was not a simple relay but a proper motor driver capable of PWM control and soft start. He explained the requirement clearly: “we need to ramp up the power slowly so that we don't have that massive current spike”

imageimageimage

Electronics & Firmware

Control is handled by an ESP32 development board. Milos chose it for convenience and Wi-Fi capability rather than necessity: “I will just use a small Esp32 board that I have laying around because it's Wi-Fi capable and it's more than powerful enough to do stuff like this”.

The system includes:

  • ESP32 MCU

  • Motor driver (PWM + direction control)

  • Buck converter (12 V → 5 V)

  • Incremental encoder (quadrature input)

  • Dual homing/limit switches

  • Push buttons (manual up/down + 3 memories)

  • Small OLED display

In firmware, motor pins, encoder pins, and button inputs are defined at the top of the sketch for board flexibility. The ESP32 is configured with a static IP address to simplify integration with home automation: “so in the future, if I want to automate it in any way, shape or form, I can do that easily”

The web interface mirrors the physical controls. It includes:

  • Manual up / down

  • Stop

  • Home

  • Three memory positions

  • Adjustable min/max height

  • Calibration helpers

“You can also change these memories on the fly and they will be saved between power cycles”

During homing, the desk lowers until the endstop triggers, then sets the internal height reference (e.g., 70 cm) as configured in the interface. Memory positions then translate stored height values into encoder pulse targets.

imageimage

Mechanical Assembly

All mounts were designed in CAD and 3D printed in PLA. The motor mount encloses the drill gearbox, while a dedicated encoder bracket holds the hex coupling (printed slightly oversized at 6.5 mm to account for tolerances).

The control enclosure mounts beneath the desk edge. Only the OLED display is visible from above, angled slightly for readability. Buttons sit recessed under a protective lip. Milos added a guard to prevent accidental activation: “I added it because I don't want to trigger any of the buttons by mistake… you really need to want to push these buttons”

Final assembly involved replacing the original legs, mounting the motor and encoder assemblies, routing wiring, and installing the electronics enclosure. Functional testing confirmed correct soft start behaviour, reliable homing, and accurate positioning via encoder feedback.

image

Modular Desk Expansion

Rather than stop at motorisation, Milos extended the design using 4040 aluminium extrusions. The spare tabletop panel became a monitor shelf, with an additional lower shelf for chargers and power strips.

This extrusion-based structure allows modular mounting of accessories: monitor arms, laptop arms, lighting, cameras, and measurement tools. As he described it, “The greatest thing about this desk is that it's fully modular because of the aluminium extrusions… it's going to be a work in progress desk”

image

Rounding Up

The conversion was completed in roughly three hours of physical assembly time. The system functions reliably via both physical and web interfaces. There are areas for refinement. Milos notes the noise level, “it just sounds like a drill”, 

and mentions that the encoder requires minor fine tuning. These are largely consequences of re-purposing a drill gearbox rather than using a purpose-built linear actuator. Next planned upgrade: a custom 3D-printed laptop arm integrated into the extrusion framework.

What started as a basic hand-crank IKEA Trotten desk is now a fully programmable, motorised sit-stand setup powered by a salvaged drill motor, encoder feedback and an ESP32.

Instead of just adding simple up/down control, Milos built something far more flexible, with soft start motor control, height presets, homing, and a web interface baked in. Add the modular aluminium frame, and this isn’t just a desk upgrade. It’s a platform he can keep modifying and improving over time.

Supporting Files and Links

-  Episode 704 Resources  

Bill of Materials

Product Name Manufacturer Quantity Buy Kit
ESP32 Board DFROBOT 1 Buy Now
OLED MDOB128064V2V-YI MIDAS DISPLAYS 1 Buy Now
Rotary Encoder SEN0235 DFROBOT 1 Buy Now
 

Additional Parts

Product Name Manufacturer Quantity
Hand Crank Standing Desk Ikea
Battery Powered Drill
BTS7960
Keyboard Switches
PLA Filament

  • arudino ide esp32 project
  • electric sit stand desk project
  • homemade standing desk conversion
  • diy morotised desk
  • web controlled esp32 device
  • budget standing desk build
  • motor driver soft start
  • ikea trotten hack
  • drill motor gearbox project
  • diy office setup upgrade
  • desk height memory presets
  • wifi controlled desk
  • friday_release
  • esp32 standing desk
  • aluminium extrusion desk frame
  • quadrature encoder height control
  • Share
  • History
  • More
  • Cancel
Actions
  • Share
  • More
  • Cancel
  • Sign in to reply
  • milosrasic98
    milosrasic98 2 days ago in reply to genebren

    Thanks! A combination of standing and seating really feels great compared to just sitting for hours!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • milosrasic98
    milosrasic98 2 days ago in reply to DAB

    Thanks, glad you like it!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren 5 days ago

    Well done!  The desk looks and preforms great.  Another fine project!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB 6 days ago

    Very cool project.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube