AutoStand is a Python-based automation tool for standing desks, specifically designed for desks with preset buttons. It uses a Raspberry Pi and a 4-channel relay board to simulate physical button presses, allowing you to schedule desk height changes automatically.
- Raspberry Pi (e.g., Pi 3 or Pi 4)
- 4-Channel Relay Board (Active Low recommended)
- Breadboard and Jumper Wires
- Standing Desk Control Board (with access to button contacts)
Connect the Raspberry Pi GPIO pins to the relay board inputs using a breadboard for easy wiring and power distribution.
| Raspberry Pi Pin | Connection Type | Relay Board Pin |
|---|---|---|
| 5V (Pin 2/4) | Power | VCC |
| GND (Pin 6/etc) | Ground | GND |
| GPIO 23 (Pin 16) | Signal | IN1 (Preset 1) |
| GPIO 27 (Pin 13) | Signal | IN2 (Preset 2) |
| GPIO 22 (Pin 15) | Signal | IN3 (Preset 3) |
| GPIO 17 (Pin 11) | Signal | IN4 (Preset 4) |
Note
GPIO numbers refer to BCM numbering, which matches the configuration in config/settings.json.
Connect the output terminals of each relay across the button contacts on your desk's control board.
- Each relay acts as a momentary switch.
- Connect the COM (Common) and NO (Normally Open) terminals of the relay to the two sides of the corresponding preset button on the desk board.
-
Clone the repository:
git clone <repository-url> cd AutoStand
-
Configure Settings: Edit
config/settings.jsonto match your pin connections and desired automation durations.{ "pins": { "preset_1": 23, "preset_2": 27, "preset_3": 22, "preset_4": 17 }, "automation": { "sit_duration_minutes": 15, "stand_duration_minutes": 15, "sit_preset": 1, "stand_preset": 4 } } -
Install Dependencies:
pip install RPi.GPIO
-
Run the Application:
python main.py
Caution
Always disconnect your desk from power before soldering or making connections to the desk's control board. Ensure no wires are loose, as a short circuit could damage your desk board or Raspberry Pi.

