Close
0%
0%

Motorized IKEA SKARSTA/TROTTEN + Web Dashboard

ESP8266 project for motorizing the IKEA SKARSTA/TROTTEN table and adjusting the height via a Web Dashboard.

Public Chat
Similar projects worth following
The IKEA SKARSTA/TROTTEN table only comes with a manual crank from the factory - this project replaces the crank with a motor so there is no more need for manual cranking. This project aims to show you how to digitize an IKEA table with a modern web dashboard.

Showcase



Web Dashboard

Features

  • Web Dashboard is accessible from anywhere within your WiFi network
  • No more manual cranking the table up or down
  • Controlling the height of the table via the web
  • Setting custom height modes via the web
  • Current height is being frequently displayed

Circuit

This circuit  was designed with Fritzing. Please see the hardware section near the end for a detailed list of the used hardware components which are shown in the circuit.


3D Model

The 3D models of user pashiran were used and adapted in this project.
Small holes were drilled into the table in order to screw the `Body1.stl` with M3 screws to it. After installing `Body1.stl`, the `Body3.stl` (case) was screwed on to it. Some M3 insert nuts were installed to `Body1.stl` with a soldering iron.

3D model 1

3D model 2
Finite State Machine

The implementation is based on the following FSM:

FSMState transitions to the current state i.e. `UP`->`UP` happen when the user requests nothing after requesting the table to go up. The implementation takes care of stopping if the user hasn't stopped the table manually before reaching the maximum height and vice versa. `CUSTOM_HEIGHT` automatically transitions to `HOLD` whenever the requested height has been reached.
All other state transitions are done when the user requests something via the Web Dashboard through the following routes:

  •  `/motor//` with `action` being `up`, `down`, `stop`
  • `/height//` with `height_in_cm` in the range from `60` to `160`.


Dependencies

Used dependencies for this project are:

The dependencies can be installed via the standard procedure for installing Arduino libraries:

1. Open the Arduino IDE, select `Sketch` -> `Include Library` -> `Manage Libraries...`.
2. Search for `Cytron Motor Drivers Library by Cytron Technologies Sdn Bhd`/`HCSR04 ultrasonic sensor Library by gamegine`.
3. Click `Install` to install the library.
4. Restart the Arduino IDE.


Hardware

The hardware selection and 3D models of this project are mainly based on the Instructable of user pashiran. In comparison, this project uses a website ("web dashboard") for controlling the table height and a ultrasonic sensor for measuring the height instead of an optical endstop. There are no hardware switches, just the website which can be accessed via the hosted ESP8266 server (which shall be in the same network as your clients).

Total costs approx. 48 € if you are patient enough to wait for the Aliexpress delivieries from China. The table and 3D printed model are not included in my calculation.


Credits

Body1.stl

Original file from pashiran: https://www.instructables.com/Motorizing-an-IKEA-SKARSTA-Table/ This will be screwed into the table and the case comes on top of it. Some M3 insert nuts need to be soldered into the filament.

Standard Tesselated Geometry - 323.52 kB - 06/12/2022 at 18:13

Download

ideaMaker_print_settings.bin

Print settings template for the ideaMaker slicer.

octet-stream - 23.98 kB - 06/12/2022 at 18:11

Download

case_with_HC-SR04_holes_.stl

Case (top part) for the electronics. Has two holes for the ultrasonic sensor. I printed with 5% infill, 0.3 mm layer height, 1.4 shells, print speed 80 mm/s. This print took 7 hours and 24 minutes.

Standard Tesselated Geometry - 212.68 kB - 06/12/2022 at 18:06

Download

  • 1 × WeMos D1 Mini Pro V 3,0 NodeMcu 4MB/16MB ESP8266 CH340G Nodemcu V2 ESP8266 Development Board
  • 1 × Bringsmart 37GB555 DC 12 V 72 RPM 12V DC motor for lifting the table
  • 1 × Cytron MD10C 10Amp 5V-30V DC Motor Driver Motor Driver Board for digitally controlling the motor
  • 1 × Arote LED Trafo with 5.5x2.1mm Female Terminal Block 2 pin, Output: 12V 5A, Input: AC110-240V, 60W 12V Power Adapter to power the Motor Driver Board
  • 1 × D19L25 6x7mm Shaft coupling (motor to table)

View all 8 components

  • 1
    Software Installation
    1. Download and install the Arduino IDE
    2. Open the Arduino IDE
    3. Go to "File" -> "Preferences"
    4. Insert the following URL into the "Additional Boards Manager URLs" field
      1. http://arduino.esp8266.com/stable/package_esp8266com_index.json
    5. Click "OK"
    6. Open the Boards Manager via "Tools" -> "Board" -> "Boards Manager"
    7. Look for "esp8266" and install the boards
    8. Set the board by going to "Tools" -> "ESP8266 Boards" -> "LOLIN(WEMOS) D1 mini (clone)"

    9. Install dependencies
      1. Go to "Tools" -> "Manage Libraries..."
      2. Install the "Cytron Motor Drivers Library" by searching for "Cytron" and clicking "Install"
      3. Install the "HCSR04 ultrasonic sensor" library by seaching for "HCSR04". (Make sure to use the one from "gamegine")
    10. Download the source code of this project
      1. Visit the GitHub repository in your browser
      2. Choose a download option
      3. Unzip the archive if you've downloaded a ZIP, otherwise skip this step
    11. Open the directory "ESP8266-IKEA-Skarsta-Trotten-Web-Dashboard/src/main/"
    12. Open the "main.ino" file with your Arduino IDE
    13. Add your WiFi network data
      1. Simply replace YOUR-WIFI-* with your credentials and save the file
    14. Plug in your ESP8266 board into your Computer USB port
    15. Set the port by going to "Tools" -> "Port" -> select your Port
      1. If you can't select anything, make sure that you have the correpsponding drivers installed: https://www.wemos.cc/en/latest/ch340_driver.html
    16. Compile and upload the software to the board by clicking the upload button
    17. Visit the web dashboard
      1. Get the IP address: The board should've logged into your WiFi network after you have uploaded the software. You might want to open the Serial Monitor to know which IP address was assigned to the board. Othwerwise you can also download a smartphone app i.e. "Fing" to scan all the IP addresses in your local WiFi network.
      2. Open the hosted website in your browser: i.e. in the browser address bar: 192.168.1.137
        1. Should look like this
      3. Optionally set a domain name in your WiFi router etc.
    18. If everything is working, you can disconnect the board from your computer and assemble the system to the table. Also make sure to use a power supply for the board.

View all instructions

Enjoy this project?

Share

Discussions

morxw96 wrote 04/03/2024 at 22:26 point

Thanks for this great project, I rebuilt it and unfortunately broke the shaft coupler on the first run since the motor polarity was reversed in my case and the table was already at the bottom end. Sounded very bad, the motor definitely has some torque! I was wondering if it wouldn't make sense to add a over current/motor stall protection so the esp turns the driver off under too much load? So it wouldn't break or burn the motor in case the chair or whatever blocks the table. Most electric standing desks have something like that built in. 

I haven't looked into the driver boards circuit but was noticing a shunt resistor network on it, so it seems there is already something like a overload protection built in, but probably more to limit the maximum current but nothing to sense the amperage/differential voltage from the driver on the ESP in any useful way since it only has the direction and pwm signal inputs. 

  Are you sure? yes | no

renevdstap wrote 12/14/2023 at 10:45 point

Hi Florian, first of all, thanks for sharing this project! I just completed my first assembly of the components. One thing i run into is that the HC-SR04 sensor gives a lot of false readings. For example it fuctuates between 74 and 78 cm but also sometimes gives a reading of 41 cm. Did you encounter the same problem?

  Are you sure? yes | no

Vasiliy wrote 03/19/2023 at 12:16 point

A similar motor, but at 136 RPM would not have enough torque, right?

I'm wondering if I should try it or maybe even two 136 RPM motors (24 V). I would like the table to move faster.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates