Author: Bowen from Quantum Bits | WeChat Official Account QbitAI
For office workers who sit for long periods, the idea of pressing a button to raise their desk sounds very appealing.
However, some people are not satisfied with that:
What if the desk could rise automatically without pressing a button?
Well, here comes the solution.
An American named David Kong hacked his standing desk with a Raspberry Pi, ultimately creating a desk that can rise and fall at random intervals.
Every 45 to 60 minutes, the desk will automatically rise, forcing you to stand up whether you like it or not!
Development Driven by Laziness
David Kong is a product manager.
Like many office workers, he owns an electric standing desk, which he calls a “good habit for standing.”
However, he often forgets to stand because he gets too absorbed in work.
Even with phone reminders, he often ends up sitting at the standing desk all day because he feels too tired to stand up…
So, driven by the primary force of human technological development—laziness—David decided:
He wanted the standing desk to rise and fall automatically without pressing a button!
Without hesitation, he immediately opened the control box of the standing desk:
Great! He discovered a neat row of pins:
The hacker DNA kicked in!
David found two wires and soldered them to the pins of buttons “1” and “2”:
These two buttons were already preset for two fixed heights, one for sitting and one for standing.
Then David decided to automate the process of these two buttons by connecting the two wires to a relay:
Next, he needed to send current periodically to activate these two buttons.
David first thought of designing a timing circuit.
For example, using a chip called the 555 timer, which can connect the circuit at fixed intervals:
But the problem is that its interval might be less than 1 second.
If he wanted to increase this number to 1000 or even higher, he would need a series of timers.
The complexity of the initial development is needless to say, and even making small time adjustments later would be very troublesome.
So David decisively rejected that idea and turned to his identity as a long-time Raspberry Pi fan—
Why not connect the Raspberry Pi and write a simple timing script? This way, he could directly adjust the desk’s movement speed from the code level.
Great, it’s decided: Raspberry Pi it is!
Raspberry Pi Comes to the Rescue
David bought a basic Raspberry Pi Zero, ordered a case, and a Micro SD card pre-installed with Raspbian OS.
He spent a total of about 20 dollars.
(Approximately 130 RMB)
Then he connected the Pi Zero to his computer using a USB data cable and began programming in the terminal:
David wrote a Python script to activate a GPIO (General Purpose Input/Output) pin on the Raspberry Pi:
from gpiozero import LED # The LED library allows easy pin control
from time import sleep
import random
relay = LED(17) # I connected the relay to pin 17 and ground
while True:
relay.on()
sleep(1)
relay.off()
sleep(random.randint(45, 60) * 60)
Since he wanted the desk to rise and fall in a more random and unconscious manner, David chose a 45 to 60-minute interval as the activation time.
This script needs to be saved to /home/pi/Documents/moveDesk.py.
Then, he added this line to /etc/rc.local:
python /home/pi/Documents/moveDesk.py
That way, as soon as the Raspberry Pi starts, the script will run.
He then soldered the output pins from the relay connected to the buttons to the Raspberry Pi:
Finally, he stuffed all the messy wiring under the desk:
Done!
Successfully Running for Months
Now, this automatic standing desk has been in use for several months.
David has established a more regular standing routine, and his back pain has improved.
Netizens commented: Although the method is a bit crude, it is very effective! The process from nothing to something is also very valuable!
As a product manager working at Frame.io and a part-time hacker, David Kong finds it very meaningful as well.
After all, the desk rises automatically at random intervals, which means he no longer needs to remind himself to stand.
Unconsciously, he maintains a healthy posture at work.
David also expressed:
Now, a natural and healthy rhythm has formed. Sometimes, when the desk starts to rise, I unconsciously stand up without even realizing it.
Reference links: [1]https://medium.com/@davidkongfilm/how-i-hacked-my-standing-desk-with-a-raspberry-pi-a50ed14c7f6f
[2]https://news.ycombinator.com/item?id=27917284
— The End —
This article is original content from NetEase News • NetEase Account Featured Content Incentive Program signed account 【Quantum Bits】. Unauthorized reproduction is prohibited.
Free Registration | Quick Start NLP, Let Your Text Speak!
On July 28 at 8 PM, NVIDIA experts will explain the workflow and principles of speech synthesis technology, the application of deep learning models in speech synthesis, and demonstrate how to quickly achieve natural language generation with code. Scan the code to follow, and you can register according to the prompts~

Click here👇 to follow me, and remember to star it~
One-click three connections: “Share”, “Like” and “View”
Stay updated on the latest technological advancements every day~