Don't Be So Cranky: Modding an IKEA Desk Into a Smart Workstation
Milos Rasic hacked his hand-crank desk into a smart, motorized standing desk using an old drill motor and an ESP32.
Many of us, especially engineers who live in the digital world, spend an awful lot of time sitting at a desk. This is not only unhealthy, but it also grows tiresome after a while. For this reason, people are increasingly choosing to use convertible standing desks that allow them to transition between sitting and standing positions during the day without having to take a break from work.
Milos Rasic has an IKEA Trotten desk that converts between sitting and standing modes. It is not automatic, however — it is adjusted via a hand crank. Now, Rasic would like to stand up to move around a little and get his blood flowing — but turning a hand crank to make that happen isn’t his cup of tea. So, he decided to upgrade the desk with some hardware that would enable it to adjust itself automatically.
After a little investigation, Rasic found that the Trotten’s lift mechanism is driven by a 6 mm hexagonal shaft — the same type of interface used by many tools. That meant all he needed to do was rotate the shaft in either direction to raise or lower the desk. From there, the challenge became designing a motorized system that could drive the mechanism reliably while also providing accurate control over the desk’s height.
To supply the necessary torque, Rasic repurposed the motor and gearbox from an old 12-volt cordless drill. This worked out quite well: the drill’s gearbox provides plenty of torque, and its hex output mates directly with the desk’s drive shaft. During testing, however, he discovered that the motor drew a large surge of current when starting from a standstill. A simple relay-based solution wouldn’t work because the inrush current would trip power supply protection.
Instead, the system uses a dedicated motor driver capable of pulse-width modulation (PWM), allowing the motor to ramp up gradually with a soft-start. This prevents large current spikes while still delivering enough power to move the desk smoothly.
Control is handled by an ESP32 microcontroller, which manages the motor driver, reads user inputs, and processes feedback from an incremental rotary encoder mounted on the opposite end of the desk’s shaft. The encoder produces quadrature signals that allow the firmware to track both movement and direction, effectively translating shaft rotations into desk height.
Because incremental encoders do not provide absolute position on startup, Rasic added a homing system using microswitches at the desk’s lowest position. When powered on, the desk performs a brief homing routine to establish a known reference point before normal operation begins.
The desk includes physical controls, an OLED status display, and three programmable height presets. Rasic also built a Wi-Fi web interface that mirrors the hardware buttons, allowing the desk to be controlled from a browser. The interface includes options for manual movement, homing, preset management, and calibration.
While the drill motor makes a bit of noise, the upgrade transforms a simple hand-crank desk into a smart, customizable workspace that Rasic can continue refining over time.
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.