<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Hacking an IKEA Desk into a Programmable Electric Workstation -- Episode 704</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Hacking an IKEA Desk into a Programmable Electric Workstation -- Episode 704</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704</link><pubDate>Thu, 05 Mar 2026 13:46:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:287bc088-e4f1-438e-8a16-0294d8b4f1fa</guid><dc:creator>e14sbhargav</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704#comments</comments><description>Current Revision posted to Documents by e14sbhargav on 3/5/2026 1:46:00 PM&lt;br /&gt;
&lt;p&gt;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&amp;rsquo;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.&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o0"&gt;Build with Milos&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://youtu.be/1rM2jF_pQUY"&gt;https://youtu.be/1rM2jF_pQUY&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o1" data-start="0" data-end="33"&gt;The&amp;nbsp;DIY Motorised IKEA Desk&lt;/h2&gt;
&lt;p&gt;Milos came across an &lt;span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"&gt;&lt;span class="whitespace-normal"&gt;IKEA&lt;/span&gt;&lt;/span&gt; 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, &amp;ldquo;it&amp;rsquo;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&amp;rdquo;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1772704436622v1.png" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o2" data-start="866" data-end="883"&gt;Idea &amp;amp; Plan&lt;/h2&gt;
&lt;p data-start="885" data-end="1408"&gt;Mechanically, the desk didn&amp;rsquo;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, &amp;ldquo;I put the motor and the encoder on opposite sides of the table mechanism. If you&amp;#39;re going to do that, also make sure to cut the shaft long enough so it reaches both the motor and the encoder&amp;rdquo;&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;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, &amp;ldquo;for the one I&amp;#39;m using, there will be 20 pulses per rotation, so we can then translate those pulses into actual table height&amp;rdquo; . Direction detection is handled by reading which signal transitions first.&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;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. &amp;ldquo;This is why we need a known position&amp;hellip; we&amp;rsquo;re going to get that using a micro switch&amp;rdquo;&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;In the final design, two switches are wired in parallel for redundancy, ensuring reliable homing and providing a hard lower limit stop.&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/Picture1.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o3" data-start="2423" data-end="2444"&gt;Motor Selection,&amp;nbsp;Power Considerations &amp;amp; Motor Control&lt;/h2&gt;
&lt;p data-start="2446" data-end="2731"&gt;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.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;&amp;ldquo;I had an old Parkside drill that&amp;#39;s running on 12V, and I decided to test it out with the Ikea Trotten desk&amp;hellip; and as you can see, it can go up and down without any issues&amp;rdquo;.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;The drill motor&amp;rsquo;s gearbox provided sufficient torque, and importantly, its output already featured a 6 mm hex coupling, a direct match to the desk&amp;rsquo;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.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;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.&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;&amp;ldquo;As you can see the power supply goes into over-current protection immediately&amp;hellip; the motor doesn&amp;rsquo;t actually spin&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;Direct battery connection proved the motor was functional, but produced a large inrush spark. Milos observed, &amp;ldquo;the motor, when it&amp;rsquo;s in a standstill&amp;hellip; the current it needs is rather high&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;The solution was not a simple relay but a proper motor driver capable of PWM control and soft start. He explained the requirement clearly: &amp;ldquo;we need to ramp up the power slowly so that we don&amp;#39;t have that massive current spike&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/Picture2.jpg" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/2477.Picture3.png" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/1882.Picture4.png" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiump75vc" data-start="4294" data-end="4322"&gt;&lt;/h2&gt;
&lt;h2 id="mcetoc_1jiumnd5p5" data-start="4294" data-end="4322"&gt;Electronics &amp;amp; Firmware&lt;/h2&gt;
&lt;p data-start="4324" data-end="4637"&gt;Control is handled by an ESP32 development board. Milos chose it for convenience and Wi-Fi capability rather than necessity: &amp;ldquo;I will just use a small Esp32 board that I have laying around because it&amp;#39;s Wi-Fi capable and it&amp;#39;s more than powerful enough to do stuff like this&amp;rdquo;.&lt;/p&gt;
&lt;p data-start="4639" data-end="4659"&gt;The system includes:&lt;/p&gt;
&lt;ul data-start="4660" data-end="4892"&gt;
&lt;li data-start="4660" data-end="4673"&gt;
&lt;p data-start="4662" data-end="4673"&gt;ESP32 MCU&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4674" data-end="4716"&gt;
&lt;p data-start="4676" data-end="4716"&gt;Motor driver (PWM + direction control)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4717" data-end="4748"&gt;
&lt;p data-start="4719" data-end="4748"&gt;Buck converter (12 V &amp;rarr; 5 V)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4749" data-end="4791"&gt;
&lt;p data-start="4751" data-end="4791"&gt;Incremental encoder (quadrature input)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4792" data-end="4822"&gt;
&lt;p data-start="4794" data-end="4822"&gt;Dual homing/limit switches&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4823" data-end="4869"&gt;
&lt;p data-start="4825" data-end="4869"&gt;Push buttons (manual up/down + 3 memories)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4870" data-end="4892"&gt;
&lt;p data-start="4872" data-end="4892"&gt;Small OLED display&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="4894" data-end="5285"&gt;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: &amp;ldquo;so in the future, if I want to automate it in any way, shape or form, I can do that easily&amp;rdquo;&lt;/p&gt;
&lt;p data-start="5287" data-end="5348"&gt;The web interface mirrors the physical controls. It includes:&lt;/p&gt;
&lt;ul data-start="5349" data-end="5468"&gt;
&lt;li data-start="5349" data-end="5369"&gt;
&lt;p data-start="5351" data-end="5369"&gt;Manual up / down&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5370" data-end="5378"&gt;
&lt;p data-start="5372" data-end="5378"&gt;Stop&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5379" data-end="5387"&gt;
&lt;p data-start="5381" data-end="5387"&gt;Home&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5388" data-end="5414"&gt;
&lt;p data-start="5390" data-end="5414"&gt;Three memory positions&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5415" data-end="5444"&gt;
&lt;p data-start="5417" data-end="5444"&gt;Adjustable min/max height&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5445" data-end="5468"&gt;
&lt;p data-start="5447" data-end="5468"&gt;Calibration helpers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;ldquo;You can also change these memories on the fly and they will be saved between power cycles&amp;rdquo;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/Picture5.jpg" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/Picture6.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5p6" data-start="5878" data-end="5903"&gt;Mechanical Assembly&lt;/h2&gt;
&lt;p data-start="5905" data-end="6166"&gt;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).&lt;/p&gt;
&lt;p data-start="5905" data-end="6166"&gt;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: &amp;ldquo;I added it because I don&amp;#39;t want to trigger any of the buttons by mistake&amp;hellip; you really need to want to push these buttons&amp;rdquo;&lt;/p&gt;
&lt;p data-start="5905" data-end="6166"&gt;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.&lt;/p&gt;
&lt;h3 id="mcetoc_1jiun2bknd" data-start="6844" data-end="6872"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/Picture7.jpg" /&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1jiumnd5p7" data-start="6844" data-end="6872"&gt;Modular Desk Expansion&lt;/h3&gt;
&lt;p data-start="6874" data-end="7079"&gt;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.&lt;/p&gt;
&lt;p data-start="7081" data-end="7422"&gt;This extrusion-based structure allows modular mounting of accessories: monitor arms, laptop arms, lighting, cameras, and measurement tools. As he described it, &amp;ldquo;The greatest thing about this desk is that it&amp;#39;s fully modular because of the aluminium extrusions&amp;hellip; it&amp;#39;s going to be a work in progress desk&amp;rdquo;&lt;/p&gt;
&lt;p data-start="7081" data-end="7422"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/Picture8.jpg" /&gt;&lt;/p&gt;
&lt;p data-start="7470" data-end="7618"&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5p9" data-start="0" data-end="16"&gt;Rounding Up&lt;/h2&gt;
&lt;p data-start="7470" data-end="7618"&gt;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, &amp;ldquo;it just sounds like a drill&amp;rdquo;,&amp;nbsp;&lt;/p&gt;
&lt;p data-start="7620" data-end="7926"&gt;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.&lt;/p&gt;
&lt;p data-start="18" data-end="191"&gt;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.&lt;/p&gt;
&lt;p data-start="193" data-end="498" data-is-last-node="" data-is-only-node=""&gt;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&amp;rsquo;t just a desk upgrade. It&amp;rsquo;s a platform he can keep modifying and improving over time.&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5pa" data-start="193" data-end="498"&gt;Supporting Files and Links&lt;/h2&gt;
&lt;p data-start="193" data-end="498" data-is-last-node="" data-is-only-node=""&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/m/files/151038"&gt;Episode 704 Resources&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5pb" data-start="193" data-end="498"&gt;&lt;/h2&gt;
&lt;h2 id="mcetoc_1jiun8oah0"&gt;Bill of Materials&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-0dcd7" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4733217,3154947,3769925&amp;nsku=DFR1139,21AH3309,52AJ5976&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_BUY_KIT" class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('0dcd7'));" data-farnell="4733217,3154947,3769925" data-newark="DFR1139,21AH3309,52AJ5976" data-comoverride="" data-cmpoverride="" data-cpc=",," data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Kit&lt;/a&gt; &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ESP32 Board&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-99d2e" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4733217&amp;nsku=DFR1139&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('99d2e'));" data-farnell="4733217" data-newark="DFR1139" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OLED MDOB128064V2V-YI&lt;/td&gt;
&lt;td&gt;MIDAS DISPLAYS&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-129a8" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3154947&amp;nsku=21AH3309&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('129a8'));" data-farnell="3154947" data-newark="21AH3309" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rotary Encoder SEN0235&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-2e3b4" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3769925&amp;nsku=52AJ5976&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('2e3b4'));" data-farnell="3769925" data-newark="52AJ5976" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiun8oah1"&gt;Additional Parts&lt;/h2&gt;
&lt;table class="e14-product-bom-additional"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hand Crank Standing Desk&lt;/td&gt;
&lt;td&gt;Ikea&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Battery Powered Drill&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BTS7960&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Keyboard Switches&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PLA Filament&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="mcetoc_1jiun8oah2"&gt;&lt;/h3&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: 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&lt;/div&gt;
</description></item><item><title>Hacking an IKEA Desk into a Programmable Electric Workstation -- Episode 704</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704/revision/5</link><pubDate>Thu, 05 Mar 2026 13:46:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:287bc088-e4f1-438e-8a16-0294d8b4f1fa</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704#comments</comments><description>Revision 5 posted to Documents by cstanton on 3/5/2026 1:46:00 PM&lt;br /&gt;
&lt;p&gt;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&amp;rsquo;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.&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o0"&gt;Build with Milos&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://youtu.be/1rM2jF_pQUY"&gt;https://youtu.be/1rM2jF_pQUY&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o1" data-start="0" data-end="33"&gt;The&amp;nbsp;DIY Motorised IKEA Desk&lt;/h2&gt;
&lt;p&gt;Milos came across an &lt;span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"&gt;&lt;span class="whitespace-normal"&gt;IKEA&lt;/span&gt;&lt;/span&gt; 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, &amp;ldquo;it&amp;rsquo;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&amp;rdquo;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1772704436622v1.png" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o2" data-start="866" data-end="883"&gt;Idea &amp;amp; Plan&lt;/h2&gt;
&lt;p data-start="885" data-end="1408"&gt;Mechanically, the desk didn&amp;rsquo;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, &amp;ldquo;I put the motor and the encoder on opposite sides of the table mechanism. If you&amp;#39;re going to do that, also make sure to cut the shaft long enough so it reaches both the motor and the encoder&amp;rdquo;&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;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, &amp;ldquo;for the one I&amp;#39;m using, there will be 20 pulses per rotation, so we can then translate those pulses into actual table height&amp;rdquo; . Direction detection is handled by reading which signal transitions first.&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;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. &amp;ldquo;This is why we need a known position&amp;hellip; we&amp;rsquo;re going to get that using a micro switch&amp;rdquo;&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;In the final design, two switches are wired in parallel for redundancy, ensuring reliable homing and providing a hard lower limit stop.&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture1.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o3" data-start="2423" data-end="2444"&gt;Motor Selection,&amp;nbsp;Power Considerations &amp;amp; Motor Control&lt;/h2&gt;
&lt;p data-start="2446" data-end="2731"&gt;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.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;&amp;ldquo;I had an old Parkside drill that&amp;#39;s running on 12V, and I decided to test it out with the Ikea Trotten desk&amp;hellip; and as you can see, it can go up and down without any issues&amp;rdquo;.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;The drill motor&amp;rsquo;s gearbox provided sufficient torque, and importantly, its output already featured a 6 mm hex coupling, a direct match to the desk&amp;rsquo;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.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;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.&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;&amp;ldquo;As you can see the power supply goes into over-current protection immediately&amp;hellip; the motor doesn&amp;rsquo;t actually spin&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;Direct battery connection proved the motor was functional, but produced a large inrush spark. Milos observed, &amp;ldquo;the motor, when it&amp;rsquo;s in a standstill&amp;hellip; the current it needs is rather high&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;The solution was not a simple relay but a proper motor driver capable of PWM control and soft start. He explained the requirement clearly: &amp;ldquo;we need to ramp up the power slowly so that we don&amp;#39;t have that massive current spike&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture2.jpg" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/2477.Picture3.png" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/1882.Picture4.png" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiump75vc" data-start="4294" data-end="4322"&gt;&lt;/h2&gt;
&lt;h2 id="mcetoc_1jiumnd5p5" data-start="4294" data-end="4322"&gt;Electronics &amp;amp; Firmware&lt;/h2&gt;
&lt;p data-start="4324" data-end="4637"&gt;Control is handled by an ESP32 development board. Milos chose it for convenience and Wi-Fi capability rather than necessity: &amp;ldquo;I will just use a small Esp32 board that I have laying around because it&amp;#39;s Wi-Fi capable and it&amp;#39;s more than powerful enough to do stuff like this&amp;rdquo;.&lt;/p&gt;
&lt;p data-start="4639" data-end="4659"&gt;The system includes:&lt;/p&gt;
&lt;ul data-start="4660" data-end="4892"&gt;
&lt;li data-start="4660" data-end="4673"&gt;
&lt;p data-start="4662" data-end="4673"&gt;ESP32 MCU&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4674" data-end="4716"&gt;
&lt;p data-start="4676" data-end="4716"&gt;Motor driver (PWM + direction control)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4717" data-end="4748"&gt;
&lt;p data-start="4719" data-end="4748"&gt;Buck converter (12 V &amp;rarr; 5 V)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4749" data-end="4791"&gt;
&lt;p data-start="4751" data-end="4791"&gt;Incremental encoder (quadrature input)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4792" data-end="4822"&gt;
&lt;p data-start="4794" data-end="4822"&gt;Dual homing/limit switches&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4823" data-end="4869"&gt;
&lt;p data-start="4825" data-end="4869"&gt;Push buttons (manual up/down + 3 memories)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4870" data-end="4892"&gt;
&lt;p data-start="4872" data-end="4892"&gt;Small OLED display&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="4894" data-end="5285"&gt;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: &amp;ldquo;so in the future, if I want to automate it in any way, shape or form, I can do that easily&amp;rdquo;&lt;/p&gt;
&lt;p data-start="5287" data-end="5348"&gt;The web interface mirrors the physical controls. It includes:&lt;/p&gt;
&lt;ul data-start="5349" data-end="5468"&gt;
&lt;li data-start="5349" data-end="5369"&gt;
&lt;p data-start="5351" data-end="5369"&gt;Manual up / down&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5370" data-end="5378"&gt;
&lt;p data-start="5372" data-end="5378"&gt;Stop&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5379" data-end="5387"&gt;
&lt;p data-start="5381" data-end="5387"&gt;Home&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5388" data-end="5414"&gt;
&lt;p data-start="5390" data-end="5414"&gt;Three memory positions&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5415" data-end="5444"&gt;
&lt;p data-start="5417" data-end="5444"&gt;Adjustable min/max height&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5445" data-end="5468"&gt;
&lt;p data-start="5447" data-end="5468"&gt;Calibration helpers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;ldquo;You can also change these memories on the fly and they will be saved between power cycles&amp;rdquo;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture5.jpg" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture6.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5p6" data-start="5878" data-end="5903"&gt;Mechanical Assembly&lt;/h2&gt;
&lt;p data-start="5905" data-end="6166"&gt;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).&lt;/p&gt;
&lt;p data-start="5905" data-end="6166"&gt;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: &amp;ldquo;I added it because I don&amp;#39;t want to trigger any of the buttons by mistake&amp;hellip; you really need to want to push these buttons&amp;rdquo;&lt;/p&gt;
&lt;p data-start="5905" data-end="6166"&gt;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.&lt;/p&gt;
&lt;h3 id="mcetoc_1jiun2bknd" data-start="6844" data-end="6872"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture7.jpg" /&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1jiumnd5p7" data-start="6844" data-end="6872"&gt;Modular Desk Expansion&lt;/h3&gt;
&lt;p data-start="6874" data-end="7079"&gt;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.&lt;/p&gt;
&lt;p data-start="7081" data-end="7422"&gt;This extrusion-based structure allows modular mounting of accessories: monitor arms, laptop arms, lighting, cameras, and measurement tools. As he described it, &amp;ldquo;The greatest thing about this desk is that it&amp;#39;s fully modular because of the aluminium extrusions&amp;hellip; it&amp;#39;s going to be a work in progress desk&amp;rdquo;&lt;/p&gt;
&lt;p data-start="7081" data-end="7422"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture8.jpg" /&gt;&lt;/p&gt;
&lt;p data-start="7470" data-end="7618"&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5p9" data-start="0" data-end="16"&gt;Rounding Up&lt;/h2&gt;
&lt;p data-start="7470" data-end="7618"&gt;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, &amp;ldquo;it just sounds like a drill&amp;rdquo;,&amp;nbsp;&lt;/p&gt;
&lt;p data-start="7620" data-end="7926"&gt;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.&lt;/p&gt;
&lt;p data-start="18" data-end="191"&gt;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.&lt;/p&gt;
&lt;p data-start="193" data-end="498" data-is-last-node="" data-is-only-node=""&gt;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&amp;rsquo;t just a desk upgrade. It&amp;rsquo;s a platform he can keep modifying and improving over time.&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5pa" data-start="193" data-end="498"&gt;Supporting Files and Links&lt;/h2&gt;
&lt;p data-start="193" data-end="498" data-is-last-node="" data-is-only-node=""&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/m/files/151038"&gt;Episode 704 Resources&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5pb" data-start="193" data-end="498"&gt;&lt;/h2&gt;
&lt;h2 id="mcetoc_1jiun8oah0"&gt;Bill of Materials&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-bafc7" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4733217,3154947,3769925&amp;nsku=DFR1139,21AH3309,52AJ5976&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_BUY_KIT" class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('bafc7'));" data-farnell="4733217,3154947,3769925" data-newark="DFR1139,21AH3309,52AJ5976" data-comoverride="" data-cmpoverride="" data-cpc=",," data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Kit&lt;/a&gt; &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ESP32 Board&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-30572" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4733217&amp;nsku=DFR1139&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('30572'));" data-farnell="4733217" data-newark="DFR1139" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OLED MDOB128064V2V-YI&lt;/td&gt;
&lt;td&gt;MIDAS DISPLAYS&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-a1f3d" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3154947&amp;nsku=21AH3309&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('a1f3d'));" data-farnell="3154947" data-newark="21AH3309" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rotary Encoder SEN0235&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-cab01" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3769925&amp;nsku=52AJ5976&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('cab01'));" data-farnell="3769925" data-newark="52AJ5976" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiun8oah1"&gt;Additional Parts&lt;/h2&gt;
&lt;table class="e14-product-bom-additional"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hand Crank Standing Desk&lt;/td&gt;
&lt;td&gt;Ikea&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Battery Powered Drill&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BTS7960&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Keyboard Switches&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PLA Filament&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="mcetoc_1jiun8oah2"&gt;&lt;/h3&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: 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&lt;/div&gt;
</description></item><item><title>Hacking an IKEA Desk into a Programmable Electric Workstation -- Episode 704</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704/revision/4</link><pubDate>Thu, 05 Mar 2026 10:04:24 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:287bc088-e4f1-438e-8a16-0294d8b4f1fa</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704#comments</comments><description>Revision 4 posted to Documents by cstanton on 3/5/2026 10:04:24 AM&lt;br /&gt;
&lt;p&gt;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&amp;rsquo;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.&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o0"&gt;Build with Milos&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o1" data-start="0" data-end="33"&gt;The&amp;nbsp;DIY Motorised IKEA Desk&lt;/h2&gt;
&lt;p&gt;Milos came across an &lt;span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"&gt;&lt;span class="whitespace-normal"&gt;IKEA&lt;/span&gt;&lt;/span&gt; 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, &amp;ldquo;it&amp;rsquo;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&amp;rdquo;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1772704436622v1.png" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o2" data-start="866" data-end="883"&gt;Idea &amp;amp; Plan&lt;/h2&gt;
&lt;p data-start="885" data-end="1408"&gt;Mechanically, the desk didn&amp;rsquo;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, &amp;ldquo;I put the motor and the encoder on opposite sides of the table mechanism. If you&amp;#39;re going to do that, also make sure to cut the shaft long enough so it reaches both the motor and the encoder&amp;rdquo;&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;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, &amp;ldquo;for the one I&amp;#39;m using, there will be 20 pulses per rotation, so we can then translate those pulses into actual table height&amp;rdquo; . Direction detection is handled by reading which signal transitions first.&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;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. &amp;ldquo;This is why we need a known position&amp;hellip; we&amp;rsquo;re going to get that using a micro switch&amp;rdquo;&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;In the final design, two switches are wired in parallel for redundancy, ensuring reliable homing and providing a hard lower limit stop.&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture1.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o3" data-start="2423" data-end="2444"&gt;Motor Selection,&amp;nbsp;Power Considerations &amp;amp; Motor Control&lt;/h2&gt;
&lt;p data-start="2446" data-end="2731"&gt;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.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;&amp;ldquo;I had an old Parkside drill that&amp;#39;s running on 12V, and I decided to test it out with the Ikea Trotten desk&amp;hellip; and as you can see, it can go up and down without any issues&amp;rdquo;.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;The drill motor&amp;rsquo;s gearbox provided sufficient torque, and importantly, its output already featured a 6 mm hex coupling, a direct match to the desk&amp;rsquo;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.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;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.&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;&amp;ldquo;As you can see the power supply goes into over-current protection immediately&amp;hellip; the motor doesn&amp;rsquo;t actually spin&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;Direct battery connection proved the motor was functional, but produced a large inrush spark. Milos observed, &amp;ldquo;the motor, when it&amp;rsquo;s in a standstill&amp;hellip; the current it needs is rather high&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;The solution was not a simple relay but a proper motor driver capable of PWM control and soft start. He explained the requirement clearly: &amp;ldquo;we need to ramp up the power slowly so that we don&amp;#39;t have that massive current spike&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture2.jpg" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/2477.Picture3.png" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/1882.Picture4.png" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiump75vc" data-start="4294" data-end="4322"&gt;&lt;/h2&gt;
&lt;h2 id="mcetoc_1jiumnd5p5" data-start="4294" data-end="4322"&gt;Electronics &amp;amp; Firmware&lt;/h2&gt;
&lt;p data-start="4324" data-end="4637"&gt;Control is handled by an ESP32 development board. Milos chose it for convenience and Wi-Fi capability rather than necessity: &amp;ldquo;I will just use a small Esp32 board that I have laying around because it&amp;#39;s Wi-Fi capable and it&amp;#39;s more than powerful enough to do stuff like this&amp;rdquo;.&lt;/p&gt;
&lt;p data-start="4639" data-end="4659"&gt;The system includes:&lt;/p&gt;
&lt;ul data-start="4660" data-end="4892"&gt;
&lt;li data-start="4660" data-end="4673"&gt;
&lt;p data-start="4662" data-end="4673"&gt;ESP32 MCU&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4674" data-end="4716"&gt;
&lt;p data-start="4676" data-end="4716"&gt;Motor driver (PWM + direction control)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4717" data-end="4748"&gt;
&lt;p data-start="4719" data-end="4748"&gt;Buck converter (12 V &amp;rarr; 5 V)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4749" data-end="4791"&gt;
&lt;p data-start="4751" data-end="4791"&gt;Incremental encoder (quadrature input)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4792" data-end="4822"&gt;
&lt;p data-start="4794" data-end="4822"&gt;Dual homing/limit switches&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4823" data-end="4869"&gt;
&lt;p data-start="4825" data-end="4869"&gt;Push buttons (manual up/down + 3 memories)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4870" data-end="4892"&gt;
&lt;p data-start="4872" data-end="4892"&gt;Small OLED display&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="4894" data-end="5285"&gt;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: &amp;ldquo;so in the future, if I want to automate it in any way, shape or form, I can do that easily&amp;rdquo;&lt;/p&gt;
&lt;p data-start="5287" data-end="5348"&gt;The web interface mirrors the physical controls. It includes:&lt;/p&gt;
&lt;ul data-start="5349" data-end="5468"&gt;
&lt;li data-start="5349" data-end="5369"&gt;
&lt;p data-start="5351" data-end="5369"&gt;Manual up / down&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5370" data-end="5378"&gt;
&lt;p data-start="5372" data-end="5378"&gt;Stop&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5379" data-end="5387"&gt;
&lt;p data-start="5381" data-end="5387"&gt;Home&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5388" data-end="5414"&gt;
&lt;p data-start="5390" data-end="5414"&gt;Three memory positions&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5415" data-end="5444"&gt;
&lt;p data-start="5417" data-end="5444"&gt;Adjustable min/max height&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5445" data-end="5468"&gt;
&lt;p data-start="5447" data-end="5468"&gt;Calibration helpers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;ldquo;You can also change these memories on the fly and they will be saved between power cycles&amp;rdquo;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture5.jpg" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture6.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5p6" data-start="5878" data-end="5903"&gt;Mechanical Assembly&lt;/h2&gt;
&lt;p data-start="5905" data-end="6166"&gt;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).&lt;/p&gt;
&lt;p data-start="5905" data-end="6166"&gt;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: &amp;ldquo;I added it because I don&amp;#39;t want to trigger any of the buttons by mistake&amp;hellip; you really need to want to push these buttons&amp;rdquo;&lt;/p&gt;
&lt;p data-start="5905" data-end="6166"&gt;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.&lt;/p&gt;
&lt;h3 id="mcetoc_1jiun2bknd" data-start="6844" data-end="6872"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture7.jpg" /&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1jiumnd5p7" data-start="6844" data-end="6872"&gt;Modular Desk Expansion&lt;/h3&gt;
&lt;p data-start="6874" data-end="7079"&gt;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.&lt;/p&gt;
&lt;p data-start="7081" data-end="7422"&gt;This extrusion-based structure allows modular mounting of accessories: monitor arms, laptop arms, lighting, cameras, and measurement tools. As he described it, &amp;ldquo;The greatest thing about this desk is that it&amp;#39;s fully modular because of the aluminium extrusions&amp;hellip; it&amp;#39;s going to be a work in progress desk&amp;rdquo;&lt;/p&gt;
&lt;p data-start="7081" data-end="7422"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture8.jpg" /&gt;&lt;/p&gt;
&lt;p data-start="7470" data-end="7618"&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5p9" data-start="0" data-end="16"&gt;Rounding Up&lt;/h2&gt;
&lt;p data-start="7470" data-end="7618"&gt;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, &amp;ldquo;it just sounds like a drill&amp;rdquo;,&amp;nbsp;&lt;/p&gt;
&lt;p data-start="7620" data-end="7926"&gt;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.&lt;/p&gt;
&lt;p data-start="18" data-end="191"&gt;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.&lt;/p&gt;
&lt;p data-start="193" data-end="498" data-is-last-node="" data-is-only-node=""&gt;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&amp;rsquo;t just a desk upgrade. It&amp;rsquo;s a platform he can keep modifying and improving over time.&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5pa" data-start="193" data-end="498"&gt;Supporting Files and Links&lt;/h2&gt;
&lt;p data-start="193" data-end="498" data-is-last-node="" data-is-only-node=""&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/m/files/151038"&gt;Episode 704 Resources&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5pb" data-start="193" data-end="498"&gt;&lt;/h2&gt;
&lt;h2 id="mcetoc_1jiun8oah0"&gt;Bill of Materials&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-cea49" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4733217,3154947,3769925&amp;nsku=DFR1139,21AH3309,52AJ5976&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_BUY_KIT" class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('cea49'));" data-farnell="4733217,3154947,3769925" data-newark="DFR1139,21AH3309,52AJ5976" data-comoverride="" data-cmpoverride="" data-cpc=",," data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Kit&lt;/a&gt; &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ESP32 Board&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-2b4e5" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4733217&amp;nsku=DFR1139&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('2b4e5'));" data-farnell="4733217" data-newark="DFR1139" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OLED MDOB128064V2V-YI&lt;/td&gt;
&lt;td&gt;MIDAS DISPLAYS&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-fbd2e" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3154947&amp;nsku=21AH3309&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('fbd2e'));" data-farnell="3154947" data-newark="21AH3309" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rotary Encoder SEN0235&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-6c1dd" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3769925&amp;nsku=52AJ5976&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('6c1dd'));" data-farnell="3769925" data-newark="52AJ5976" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiun8oah1"&gt;Additional Parts&lt;/h2&gt;
&lt;table class="e14-product-bom-additional"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hand Crank Standing Desk&lt;/td&gt;
&lt;td&gt;Ikea&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Battery Powered Drill&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BTS7960&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Keyboard Switches&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PLA Filament&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="mcetoc_1jiun8oah2"&gt;&lt;/h3&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: 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&lt;/div&gt;
</description></item><item><title>Hacking an IKEA Desk into a Programmable Electric Workstation -- Episode 704</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704/revision/3</link><pubDate>Thu, 05 Mar 2026 10:02:04 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:287bc088-e4f1-438e-8a16-0294d8b4f1fa</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704#comments</comments><description>Revision 3 posted to Documents by cstanton on 3/5/2026 10:02:04 AM&lt;br /&gt;
&lt;p&gt;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&amp;rsquo;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.&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o0"&gt;Build with Milos&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o1" data-start="0" data-end="33"&gt;The&amp;nbsp;DIY Motorised IKEA Desk&lt;/h2&gt;
&lt;p&gt;Milos came across an &lt;span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"&gt;&lt;span class="whitespace-normal"&gt;IKEA&lt;/span&gt;&lt;/span&gt; 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, &amp;ldquo;it&amp;rsquo;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&amp;rdquo;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1772704436622v1.png"  /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o2" data-start="866" data-end="883"&gt;Idea &amp;amp; Plan&lt;/h2&gt;
&lt;p data-start="885" data-end="1408"&gt;Mechanically, the desk didn&amp;rsquo;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, &amp;ldquo;I put the motor and the encoder on opposite sides of the table mechanism. If you&amp;#39;re going to do that, also make sure to cut the shaft long enough so it reaches both the motor and the encoder&amp;rdquo;&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;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, &amp;ldquo;for the one I&amp;#39;m using, there will be 20 pulses per rotation, so we can then translate those pulses into actual table height&amp;rdquo; . Direction detection is handled by reading which signal transitions first.&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;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. &amp;ldquo;This is why we need a known position&amp;hellip; we&amp;rsquo;re going to get that using a micro switch&amp;rdquo;&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;In the final design, two switches are wired in parallel for redundancy, ensuring reliable homing and providing a hard lower limit stop.&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture1.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5o3" data-start="2423" data-end="2444"&gt;Motor Selection,&amp;nbsp;Power Considerations &amp;amp; Motor Control&lt;/h2&gt;
&lt;p data-start="2446" data-end="2731"&gt;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.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;&amp;ldquo;I had an old Parkside drill that&amp;#39;s running on 12V, and I decided to test it out with the Ikea Trotten desk&amp;hellip; and as you can see, it can go up and down without any issues&amp;rdquo;.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;The drill motor&amp;rsquo;s gearbox provided sufficient torque, and importantly, its output already featured a 6 mm hex coupling, a direct match to the desk&amp;rsquo;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.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;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.&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;&amp;ldquo;As you can see the power supply goes into over-current protection immediately&amp;hellip; the motor doesn&amp;rsquo;t actually spin&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;Direct battery connection proved the motor was functional, but produced a large inrush spark. Milos observed, &amp;ldquo;the motor, when it&amp;rsquo;s in a standstill&amp;hellip; the current it needs is rather high&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;The solution was not a simple relay but a proper motor driver capable of PWM control and soft start. He explained the requirement clearly: &amp;ldquo;we need to ramp up the power slowly so that we don&amp;#39;t have that massive current spike&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture2.jpg" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/2477.Picture3.png" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/1882.Picture4.png" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiump75vc" data-start="4294" data-end="4322"&gt;&lt;/h2&gt;
&lt;h2 id="mcetoc_1jiumnd5p5" data-start="4294" data-end="4322"&gt;Electronics &amp;amp; Firmware&lt;/h2&gt;
&lt;p data-start="4324" data-end="4637"&gt;Control is handled by an ESP32 development board. Milos chose it for convenience and Wi-Fi capability rather than necessity: &amp;ldquo;I will just use a small Esp32 board that I have laying around because it&amp;#39;s Wi-Fi capable and it&amp;#39;s more than powerful enough to do stuff like this&amp;rdquo;.&lt;/p&gt;
&lt;p data-start="4639" data-end="4659"&gt;The system includes:&lt;/p&gt;
&lt;ul data-start="4660" data-end="4892"&gt;
&lt;li data-start="4660" data-end="4673"&gt;
&lt;p data-start="4662" data-end="4673"&gt;ESP32 MCU&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4674" data-end="4716"&gt;
&lt;p data-start="4676" data-end="4716"&gt;Motor driver (PWM + direction control)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4717" data-end="4748"&gt;
&lt;p data-start="4719" data-end="4748"&gt;Buck converter (12 V &amp;rarr; 5 V)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4749" data-end="4791"&gt;
&lt;p data-start="4751" data-end="4791"&gt;Incremental encoder (quadrature input)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4792" data-end="4822"&gt;
&lt;p data-start="4794" data-end="4822"&gt;Dual homing/limit switches&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4823" data-end="4869"&gt;
&lt;p data-start="4825" data-end="4869"&gt;Push buttons (manual up/down + 3 memories)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4870" data-end="4892"&gt;
&lt;p data-start="4872" data-end="4892"&gt;Small OLED display&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="4894" data-end="5285"&gt;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: &amp;ldquo;so in the future, if I want to automate it in any way, shape or form, I can do that easily&amp;rdquo;&lt;/p&gt;
&lt;p data-start="5287" data-end="5348"&gt;The web interface mirrors the physical controls. It includes:&lt;/p&gt;
&lt;ul data-start="5349" data-end="5468"&gt;
&lt;li data-start="5349" data-end="5369"&gt;
&lt;p data-start="5351" data-end="5369"&gt;Manual up / down&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5370" data-end="5378"&gt;
&lt;p data-start="5372" data-end="5378"&gt;Stop&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5379" data-end="5387"&gt;
&lt;p data-start="5381" data-end="5387"&gt;Home&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5388" data-end="5414"&gt;
&lt;p data-start="5390" data-end="5414"&gt;Three memory positions&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5415" data-end="5444"&gt;
&lt;p data-start="5417" data-end="5444"&gt;Adjustable min/max height&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5445" data-end="5468"&gt;
&lt;p data-start="5447" data-end="5468"&gt;Calibration helpers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;ldquo;You can also change these memories on the fly and they will be saved between power cycles&amp;rdquo;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture5.jpg" /&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture6.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5p6" data-start="5878" data-end="5903"&gt;Mechanical Assembly&lt;/h2&gt;
&lt;p data-start="5905" data-end="6166"&gt;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).&lt;/p&gt;
&lt;p data-start="5905" data-end="6166"&gt;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: &amp;ldquo;I added it because I don&amp;#39;t want to trigger any of the buttons by mistake&amp;hellip; you really need to want to push these buttons&amp;rdquo;&lt;/p&gt;
&lt;p data-start="5905" data-end="6166"&gt;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.&lt;/p&gt;
&lt;h3 id="mcetoc_1jiun2bknd" data-start="6844" data-end="6872"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture7.jpg" /&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1jiumnd5p7" data-start="6844" data-end="6872"&gt;Modular Desk Expansion&lt;/h3&gt;
&lt;p data-start="6874" data-end="7079"&gt;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.&lt;/p&gt;
&lt;p data-start="7081" data-end="7422"&gt;This extrusion-based structure allows modular mounting of accessories: monitor arms, laptop arms, lighting, cameras, and measurement tools. As he described it, &amp;ldquo;The greatest thing about this desk is that it&amp;#39;s fully modular because of the aluminium extrusions&amp;hellip; it&amp;#39;s going to be a work in progress desk&amp;rdquo;&lt;/p&gt;
&lt;p data-start="7081" data-end="7422"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/Picture8.jpg" /&gt;&lt;/p&gt;
&lt;p data-start="7470" data-end="7618"&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5p9" data-start="0" data-end="16"&gt;Rounding Up&lt;/h2&gt;
&lt;p data-start="7470" data-end="7618"&gt;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, &amp;ldquo;it just sounds like a drill&amp;rdquo;,&amp;nbsp;&lt;/p&gt;
&lt;p data-start="7620" data-end="7926"&gt;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.&lt;/p&gt;
&lt;p data-start="18" data-end="191"&gt;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.&lt;/p&gt;
&lt;p data-start="193" data-end="498" data-is-last-node="" data-is-only-node=""&gt;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&amp;rsquo;t just a desk upgrade. It&amp;rsquo;s a platform he can keep modifying and improving over time.&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5pa" data-start="193" data-end="498"&gt;Supporting Files and Links&lt;/h2&gt;
&lt;p data-start="193" data-end="498" data-is-last-node="" data-is-only-node=""&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/m/files/151038"&gt;Episode 704 Resources&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h2 id="mcetoc_1jiumnd5pb" data-start="193" data-end="498"&gt;Bill of Materials&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: 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&lt;/div&gt;
</description></item><item><title>Hacking an IKEA Desk into a Programmable Electric Workstation -- Episode 704</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704/revision/2</link><pubDate>Thu, 05 Mar 2026 00:57:56 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:287bc088-e4f1-438e-8a16-0294d8b4f1fa</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704#comments</comments><description>Revision 2 posted to Documents by cstanton on 3/5/2026 12:57:56 AM&lt;br /&gt;
&lt;p&gt;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&amp;rsquo;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.&lt;/p&gt;
&lt;h2&gt;Build with Milos&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 data-start="0" data-end="33"&gt;The&amp;nbsp;DIY Motorised IKEA Desk&lt;/h2&gt;
&lt;p&gt;Milos came across an &lt;span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"&gt;&lt;span class="whitespace-normal"&gt;IKEA&lt;/span&gt;&lt;/span&gt; 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, &amp;ldquo;it&amp;rsquo;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&amp;rdquo;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 data-start="866" data-end="883"&gt;Idea &amp;amp; Plan&lt;/h2&gt;
&lt;p data-start="885" data-end="1408"&gt;Mechanically, the desk didn&amp;rsquo;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, &amp;ldquo;I put the motor and the encoder on opposite sides of the table mechanism. If you&amp;#39;re going to do that, also make sure to cut the shaft long enough so it reaches both the motor and the encoder&amp;rdquo;&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;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, &amp;ldquo;for the one I&amp;#39;m using, there will be 20 pulses per rotation, so we can then translate those pulses into actual table height&amp;rdquo; . Direction detection is handled by reading which signal transitions first.&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;However, incremental encoders alone cannot provide absolute position at startup. To solve this, he added a microswitch at the lowest desk position. During a homing routine, the desk lowers until the switch is triggered. &amp;ldquo;This is why we need a known position&amp;hellip; we&amp;rsquo;re going to get that using a micro switch&amp;rdquo;&lt;/p&gt;
&lt;p data-start="885" data-end="1408"&gt;In the final design, two switches are wired in parallel for redundancy, ensuring reliable homing and providing a hard lower limit stop.&lt;/p&gt;
&lt;h2 data-start="2423" data-end="2444"&gt;Motor Selection&lt;/h2&gt;
&lt;p data-start="2446" data-end="2731"&gt;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.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;&amp;ldquo;I had an old Parkside drill that&amp;#39;s running on 12V, and I decided to test it out with the Ikea Trotten desk&amp;hellip; and as you can see, it can go up and down without any issues&amp;rdquo;.&lt;/p&gt;
&lt;p data-start="2733" data-end="2945"&gt;The drill motor&amp;rsquo;s gearbox provided sufficient torque, and importantly, its output already featured a 6 mm hex coupling, a direct match to the desk&amp;rsquo;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.&lt;/p&gt;
&lt;h2 data-start="3263" data-end="3305"&gt;Power Considerations &amp;amp; Motor Control&lt;/h2&gt;
&lt;p data-start="3307" data-end="3478"&gt;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.&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;&amp;ldquo;As you can see the power supply goes into over-current protection immediately&amp;hellip; the motor doesn&amp;rsquo;t actually spin&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;Direct battery connection proved the motor was functional, but produced a large inrush spark. Milos observed, &amp;ldquo;the motor, when it&amp;rsquo;s in a standstill&amp;hellip; the current it needs is rather high&amp;rdquo;&lt;/p&gt;
&lt;p data-start="3480" data-end="3632"&gt;The solution was not a simple relay but a proper motor driver capable of PWM control and soft start. He explained the requirement clearly: &amp;ldquo;we need to ramp up the power slowly so that we don&amp;#39;t have that massive current spike&amp;rdquo;&lt;/p&gt;
&lt;h2 data-start="4294" data-end="4322"&gt;Electronics &amp;amp; Firmware&lt;/h2&gt;
&lt;p data-start="4324" data-end="4637"&gt;Control is handled by an ESP32 development board. Milos chose it for convenience and Wi-Fi capability rather than necessity: &amp;ldquo;I will just use a small Esp32 board that I have laying around because it&amp;#39;s Wi-Fi capable and it&amp;#39;s more than powerful enough to do stuff like this&amp;rdquo;.&lt;/p&gt;
&lt;p data-start="4639" data-end="4659"&gt;The system includes:&lt;/p&gt;
&lt;ul data-start="4660" data-end="4892"&gt;
&lt;li data-start="4660" data-end="4673"&gt;
&lt;p data-start="4662" data-end="4673"&gt;ESP32 MCU&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4674" data-end="4716"&gt;
&lt;p data-start="4676" data-end="4716"&gt;Motor driver (PWM + direction control)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4717" data-end="4748"&gt;
&lt;p data-start="4719" data-end="4748"&gt;Buck converter (12 V &amp;rarr; 5 V)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4749" data-end="4791"&gt;
&lt;p data-start="4751" data-end="4791"&gt;Incremental encoder (quadrature input)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4792" data-end="4822"&gt;
&lt;p data-start="4794" data-end="4822"&gt;Dual homing/limit switches&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4823" data-end="4869"&gt;
&lt;p data-start="4825" data-end="4869"&gt;Push buttons (manual up/down + 3 memories)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="4870" data-end="4892"&gt;
&lt;p data-start="4872" data-end="4892"&gt;Small OLED display&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="4894" data-end="5285"&gt;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: &amp;ldquo;so in the future, if I want to automate it in any way, shape or form, I can do that easily&amp;rdquo;&lt;/p&gt;
&lt;p data-start="5287" data-end="5348"&gt;The web interface mirrors the physical controls. It includes:&lt;/p&gt;
&lt;ul data-start="5349" data-end="5468"&gt;
&lt;li data-start="5349" data-end="5369"&gt;
&lt;p data-start="5351" data-end="5369"&gt;Manual up / down&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5370" data-end="5378"&gt;
&lt;p data-start="5372" data-end="5378"&gt;Stop&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5379" data-end="5387"&gt;
&lt;p data-start="5381" data-end="5387"&gt;Home&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5388" data-end="5414"&gt;
&lt;p data-start="5390" data-end="5414"&gt;Three memory positions&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5415" data-end="5444"&gt;
&lt;p data-start="5417" data-end="5444"&gt;Adjustable min/max height&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="5445" data-end="5468"&gt;
&lt;p data-start="5447" data-end="5468"&gt;Calibration helpers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;ldquo;You can also change these memories on the fly and they will be saved between power cycles&amp;rdquo;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 data-start="5878" data-end="5903"&gt;Mechanical Assembly&lt;/h2&gt;
&lt;p data-start="5905" data-end="6166"&gt;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).&lt;/p&gt;
&lt;p data-start="5905" data-end="6166"&gt;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: &amp;ldquo;I added it because I don&amp;#39;t want to trigger any of the buttons by mistake&amp;hellip; you really need to want to push these buttons&amp;rdquo;&lt;/p&gt;
&lt;p data-start="5905" data-end="6166"&gt;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.&lt;/p&gt;
&lt;h3 data-start="6844" data-end="6872"&gt;Modular Desk Expansion&lt;/h3&gt;
&lt;p data-start="6874" data-end="7079"&gt;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.&lt;/p&gt;
&lt;p data-start="7081" data-end="7422"&gt;This extrusion-based structure allows modular mounting of accessories: monitor arms, laptop arms, lighting, cameras, and measurement tools. As he described it, &amp;ldquo;The greatest thing about this desk is that it&amp;#39;s fully modular because of the aluminum extrusions&amp;hellip; it&amp;#39;s going to be a work in progress desk&amp;rdquo;&lt;/p&gt;
&lt;h3 data-start="7429" data-end="7468"&gt;Reflections &amp;amp; Future Improvements&lt;/h3&gt;
&lt;p data-start="7470" data-end="7618"&gt;The conversion was completed in roughly three hours of physical assembly time. The system functions reliably via both physical and web interfaces.&lt;/p&gt;
&lt;p data-start="7620" data-end="7926"&gt;There are areas for refinement. Milos notes the noise level, &amp;ldquo;it just sounds like a drill&amp;rdquo;,&amp;nbsp;&lt;/p&gt;
&lt;p data-start="7620" data-end="7926"&gt;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.&lt;/p&gt;
&lt;p data-start="7928" data-end="8061"&gt;Next planned upgrade: a custom 3D-printed laptop arm integrated into the extrusion framework &lt;span class="" data-state="delayed-open"&gt;&lt;span class="relative inline-flex items-center"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-start="0" data-end="16"&gt;Rounding Up&lt;/h2&gt;
&lt;p data-start="18" data-end="191"&gt;What started as a basic hand-crank IKEA Trotten desk is now a fully programmable, motorized sit-stand setup powered by a salvaged drill motor, encoder feedback and an ESP32.&lt;/p&gt;
&lt;p data-start="193" data-end="498" data-is-last-node="" data-is-only-node=""&gt;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&amp;rsquo;t just a desk upgrade. It&amp;rsquo;s a platform he can keep modifying and improving over time.&lt;/p&gt;
&lt;h2 data-start="193" data-end="498"&gt;Supporting Files and Links&lt;/h2&gt;
&lt;p data-start="193" data-end="498" data-is-last-node="" data-is-only-node=""&gt;&lt;/p&gt;
&lt;h2 data-start="193" data-end="498"&gt;Bill of Materials&lt;/h2&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: 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&lt;/div&gt;
</description></item><item><title>-- Episode 704</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704/revision/1</link><pubDate>Wed, 04 Mar 2026 21:41:19 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:287bc088-e4f1-438e-8a16-0294d8b4f1fa</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/72035/hacking-an-ikea-desk-into-a-programmable-electric-workstation----episode-704#comments</comments><description>Revision 1 posted to Documents by cstanton on 3/4/2026 9:41:19 PM&lt;br /&gt;
&lt;p&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>