For the final project, I want to build a small personal desk with controllable adjustable height, which also reminds me to switch my posture between sitting and standing after a certain time interval.
Motivation: The idea came to me because of the fact that I find myself as well as many people around me sitting and working on the computer for a big part of the day. Many of the times when I need to focus on the work I forget to move around and get active. Thus I find it important to have some kind of friendly reminder to tell me that I should start moving after some time of idly sitting. Then I think of combining this kind of reminder with my actual working space, thus the final idea of a personal working desk with button interface to raise it up or bring it down and acoustic buzzer to remind me to change posture after some time interval.
While searching around the Internet for inspiration and the components that I should use, I found some commercially available big table with adjustable height for around 1000 Euro or more. But of course from these products it is not clear how the table is constructed. In the end I found a similar project on Instructable which costs about 200 USD. From this Instructable I learned that a Linear Actuator is the perfect part to be used for my project. However, this desk is still a big one which uses 2 actuators and thus the problem of synchronizing them arises. For my personal desk I only need 1 actuator. Knowing this, I started to sketch out the idea for my desk and order the required components.
The required components can be divided into following parts: Materials for making the desk (wood), electronic components, materials and parts for making my own motor controller board and microcontroller board, power supply components. The complete BOM list can be downloaded in Section 4 - Download resources. According to my calculations, the project costs around 90 Euro in total.
The making process (in timely manner) of the desk is as followed:
For this project, I have combined almost all of the digital fabrication techniques learned during the course including:
I wanted to build this desk because I think it will be very useful for me and would really like to use it while working. It would be nice to share this project as an open source project where everyone can recreate it and use it for their own benefit. Thus, I decided to share this project under the Creative Commons Attribution-ShareAlike 4.0 International License.
A one-minute video describing the project briefly can be found here
In order to sketch a rough design for the desk, I needed to consider the dimensions of the desk's main component - the linear actuator:
Based on this, the design of the desk was sketched out and also modified several times during the making process to meet other requirements:
Since the actuator has a maximum width of 75mm and I want to use 18mm plywood for the outer case covering the bottom part of the actuator, the outer case will have a total width of 75+2*18 = 111mm. With considerations of the other dimensions, I designed the desk parts in 2D design software such as Adobe Illustrator and Rhinoceros, exported the files as .DXF then imported them in Fusion 360 to put them together to check if they fit.
In order to mount and fix the actuator to the desk I have 4 supporting structures:
The final complete 2D design of the desk looks like this:
I also tried to model the full desk body in Fusion 360:
The most important part of this project is to control the Linear Actuator's direction thus I started testing it first. Using a readily available H-bridge motor controller and the same setup as described in Week 10: Output devices I could control the actuator's direction with 2 push buttons. However, the trouble comes when I want to build my own H-bridge circuit. The reason is because the available H-bridge module is transistor-based and thus can only provide a current of up to 2A, meanwhile the linear actuator needs upto 3A to function. Hence I need to make a MOSFET-based controller. The schematic of a general H-bridge motor controller using MOSFETs looks like this:
However, due to the complexity of the circuit, when I tried to wire it up the first time, I made wrong connections and it did not work. One of the N-channel MOSFET was getting warm, but luckily it did not break. Thus I learned that I should start testing smaller portions of the circuit before putting everything together. First, I tested the warmed MOSFET again alone to check if it still works. Then, I wired up a half-bridge controller following this schematic:
The simplified circuit worked perfectly:
At this point I could extend the circuit to test the full H-bridge again:
And this is a snapshot of the Arduino sketch for the full H-bridge controller, which can be downloaded below in Section 4.
There are several differences between this sketch and the sketch from Week 10. One is the use of 2 buttons instead of 1 to control the direction of the motor/ actuator. In this sketch, I use 1 "UP" button to tell the actuator to go up or to stop going up, and 1 "DOWN" button to tell it to go down or to stop going down. For example, when "UP" button is pressed once, actuator goes up and when "UP" is pressed again it stops the motion. Also, when the actuator is for example going up and "DOWN" is pressed, it will directly change direction and go down. As I tested, the actuator seems to change direction very smoothly.
Another difference is of course because now I am using my own H-bridge controller instead of the ready-made module, the pins have to be controlled in a different manner and I only have to change them accordingly.
Other electronics components such as potentiometer, OLED, buzzer, Neopixel have been experimented with in previous weeks. For the final project, I only need to adjust the code for the Neopixel a little bit, and add an extension to the OLED & potentiometer code for it to work with the buzzer and the timer.
The purpose of the Neopixel in this final project is to display the status of the actuator as followed:
Neopixel is green: Actuator stands by (no motion)
Neopixel is yellow: Actuator is going up
Neopixel is blue: Actuator is going down
For the timer function of the desk, which means the buzzer will beep gently once a user-defined time interval is reached, I downloaded and installed the Countimer library and integrated it into my previous sketch from Week 10. The modified sketch can be download in Section 4.
The last part of testing the electronics is to provide the whole system with a single source of power. Thus, I ordered the 12V 3.33A power supply which provides 12V directly to the motor and the motor controller's board, and use the Step-down converter to get out 5V for the microcontroller board.
Since the step-down converter I have is an adjustable one, I have to tune the SMD potentiometer on the PCB to get 5V out while providing 12V input:
After making sure that all electronics components are working, I soldered wires and pin headers to them so that they can later be connected to the microcontroller boards:
As practiced in previous weeks, I designed my H-bridge PCB in EAGLE:
The same procedure like in Week 9 is used to produce the PCB using the Roland MDX40. Following are the settings for the milling and cutting jobs:
For the final project, I have to modify my microcontroller from Week 9 by adding a 16MHz crystal and 2x22pF capacitors for the crystal so that the board can use 5V input, basically in order to provide sufficient voltage for activating the MOSFETs which requires a threshold voltage of 2-4V.
I also added a 3.5mm terminal block to provide power to the board from the step-down converter, and additional power (VCC & GND) pin header pairs on the board so that I can directly connect all components to the board without having to use additional connecting wires or breadboard in between them. The final schematic and board layout looks as followed, with the difference to Week 9's board highlighted within dotted lines:
Again, I used the same settings for milling and cutting the board using the Roland MDX40:
The finished boards out of the Roland mill...
.. and after soldering the components:
Now it is time to test each of them individually. First I test the Motor controlelr board with the linear actuator and there was no problem:
Also, I used the multiple conductors shielded cable to transmit power (from motor controller board to step-down converter) & signal lines (from microcontroller board to motor controller board) so that they are all packed together. The reason is because they have to be around 1m long going along the desk's body, thus I do not want them to twist around each other or cause a mess while the actuator is moving.
Then I wired the remaining components to the microcontroller board for the final electronics test:
And luckily everything was working well:
First I made a small casing for the H-bridge controller because I'm afraid the MOSFETs can undergo physical strain, they are kind of extruding out of the board. Also, the case is not enclosed because the MOSFETS need to dissipate power as heat while working.
Then I design the casing for the remaining electronics including step-down converter, microcontroller board, buttons, Neopixel, buzzer, potentiometer, OLED:
For both casings, I get a template box from this free online Box Designer tool and made modifications for my needs. Then I used 3mm MDF readily available in the FabLab and the following settings in the Epilog Fusion to laser cut them:
Speed: 8%
Power: 100%
Frequency: 30%
I need to 3D print 2 objects: one for fixing the upper end of the actuator's stroke to the wall of the desk's leg, and one for mouting the desktop onto of the stroke's top. However, the design was not completely correct from the very beginning, thus I had to redesign and reprint several times. For example, although the side mounting structure (in white) was OK, at first the top mounting structure (in black) was too small to be stably hold the desktop:
thus I had to redesign the top mounting structure as followed, which made it more stable:
For the side mounting structure, I printed using the Ultimaker 2+ with following settings:
Material: PLA
Nozzle size: 0.6mm
Layer height: 0.3mm
Initial layer height: 0.4mm
Wall thickness: 1.2mm
Top/Bottom thickness: 1.2mm
Infill desnsity: 30%
Infill pattern: Grid
Enable retraction: Yes
Print speed: 65mm/s
Travel speed: 120mm/s
Generate Support: No
Build plate adhesion type: Brim
Brim width: 5mm
Print sequence: All at once
For the top mounting structure, I printed using the Ultimaker 2+ with following settings:
Material: PLA
Nozzle size: 0.6mm
Layer height: 0.3mm
Initial layer height: 0.4mm
Wall thickness: 1.2mm
Top/Bottom thickness: 1.2mm
Infill desnsity: 50%
Infill pattern: Grid
Enable retraction: Yes
Print speed: 65mm/s
Travel speed: 120mm/s
Generate Support: Yes
Support placement: Touching buildplate
Support Overhang angle: 50
Support pattern: Zigzag
Support density: 10%
Support Z distance: 0.3mm
Build plate adhesion type: Brim
Brim width: 5mm
Print sequence: All at once
I first wanted to test cut only a section of the desk to check if everything was fine and to correct any design errors before cutting the final desk completely. To do this, I sectioned out the part of the desk's leg which supports the bottom of the actuator and cut it with the eSign CNC machine, because this part was one of the most complex parts of the desk.
The milling procedure and the cut settings are as followed:
Then I put them together and tried to mount the actuator on it:
From this test cut, I learned that I also need to make holes at the corners of the tabs joining the case's walls together, otherwise they will not fit perfectly. Also, thanks to the test cut I realized I forgot to make cutouts in the actuator's holder platform for the motor cable to go through towards the top as well as for the power and signal cable to go through towards the bottom. Good thing I made the test cut!
After making modifications to the design of the desk, I cut the final version using 18mm & 15mm plywood:
Now it's time to mount all components to the desk's body. First I mount the actuator and the motor controller box to the leg:
Then I tug the power switch and the DC jack into place of the front side of the leg:
Afterwards, I close the desk's leg tightly and test the system before moving on with mounting the desktop:
Then I mounted the desktop and tested again to make sure the actuator can handle the weight:
Finally, I laser cut the top cover for the stroke of the linear actuator using 6mm MDF and the following settings:
Speed: 3%
Power: 100%
Frequency: 30%
And put them together. The final product is working fine:
The experience while making the final project was for me valuable. Although it was frustrating sometimes, for example, when the Arduino sketch does not work as expected, or when the 2D and 3D design had to be redesigned multiple times but still not perfect, it was also satisfying when the system was working in the end. It taught me to understand that it is normal when things do not work as I wish for and I have to overcome the challenge to fix the issues. Only then I actually learn from the mistakes.
As mentioned before, I personally want to use the desk for my own benefit due to the fact that I'm working on my laptop almost 8hrs everyday. In order to make this possible, I still have to fix multiple design errors and also think of better designs next time. Here are some of the errors which I still have to fix although it is not affecting the function of the desk:
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License