ESP8266 project for adjusting the height of an IKEA Skarsta/Trotten table via a Web Dashboard.
The table only comes with a crank from the factory - this project replaces the manual 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.
Showcase • Features • Circuit • 3D Model • Finite State Machine • Dependencies • Hardware • Credits • License
- 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
This circuit (source file) was designed with Fritzing. Please see the hardware section near the end of the README for a detailed list of the used hardware components which are shown in the circuit.
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.
Body1.stl (Download) | Body3.stl (Download) |
---|---|
The implementation is based on the following FSM:
State 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/<string: action>/
withaction
beingup
,down
,stop
/height/<string: height_in_cm>/
withheight_in_cm
in the range from60
to160
.
Used dependencies for this project are:
- Arduino Library for Cytron Motor Drivers, used to control the motor
- HCSR04 ultrasonic sensor Library for Arduino, used to read the distance from the ultrasonic sensor
The dependencies can be installed via the standard procedure for installing Arduino libraries:
- Open the Arduino IDE, select
Sketch
->Include Library
->Manage Libraries...
. - Search for
Cytron Motor Drivers Library by Cytron Technologies Sdn Bhd
/HCSR04 ultrasonic sensor Library by gamegine
. - Click
Install
to install the library. - Restart the Arduino IDE.
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).
- Development Board:
- Motor:
- Motor Driver Board:
- Power Adapter
- Shaft Coupling (6x7mm):
- 6mm hex wrench (cut the bent part)
- Ultrasonic Sensor:
- 3D Print
- Table
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.
- 3D design files by user pashiran
- Arduino library for HCSR04 ultrasonic sensor by gamegine
- Arduino library for Cytron Motor Drivers by Cytron
- Arduino ESP8266 Web Server library by Arduino
- Bootstrap HTML, CSS, JS Framework by Bootstrap
The contents of this repository are covered under the GPLv3 license.