Hacker News new | past | comments | ask | show | jobs | submit login
Home Made Raspberry Pi Standing Desk Controller (timmyomahony.com)
68 points by tomahony on Oct 24, 2020 | hide | past | favorite | 40 comments

I mentioned this in a HN post in the past regarding standing desks, mentioning that I'd created an over-engineered standing desk controller (using a Raspberry Pi) over lockdown as as little fun project. Somebody asked about a write-up for it, so here it is

You say it's over-engineered, but every time I read it I think of something Mr. AvE said about the topic (albeit with physical materials, regarding Juicero, to be precise):

If it uses more material than required for the job it's over-built and under-engineered. Your solution seems to be massively that.

Nice project. Do you have an emergency stop button?

Asking the important things here ! :D

Also, what positive safety control loop could a standing desk use?

Thanks for this!

I have yet to actually build anything that controls hardware, but I have been lurking, reading about microcontrollers, collecting little bits.

An actual application, a solution to a real problem or neat project, is the best way to make it real.

If you have some disposable income buy an Arduino kit from say elegoo. They come with a lot of little labs, basically 30 min - 1 hour exercises where you take one of the 30 physical devices it comes with and use it.a little bit of Lego like assembling of parts and copying some code from GitHub.

So like a led (light) is one lab. The next might be a photo sensor (signal with amount of light). After these two labs you can now make a night light. Or a rave strobe.

Do the switch or button lab and you can turn it on or off or change the pattern. After 30 labs you have a pretty good idea of what to do.

Now buy an esp32 that works with a breadboard and if you know basic http you now have an iot device.

I recently hooked an esp32 to a dht22 and started graphing temp in my gourmet mushroom enclosure in about an hour of watching baseball. Just sends data to influx and grafana on an rpi data hub

First, that is really neat - thanks for sharing. The fragility of that installation makes me nervous though. Pretty easy to bump it with a knee or catch something on it and pull some wires out! But you've got some great documentation via the article.

I have to ask this most of the time I see an r-pi project: why r-pi instead of ESP8266 for something this simple?

Faster prototyping, I can ssh into a RasPi wirelessly and control the gpio via my terminal like a REPL, for the ESP I need to keep flashing newer firmware and control it via USB to serial. Feels a bit clunkier although not a huge difference.

If I were making and selling some IoT hardware or if I wanted to re-use the RasPi for something else in my house, it would definitely make sense to move to an ESP/Arduino

I personally don’t like accidentally bumping Pi and waiting couple minutes with monitors to see if I have to start over from microSD part. Flashing ESP is slower than Atmega Arduinos but not as slow as Raspbian booting.

you can use micropython for this, a repl over usb or wifi

I've just been on this same journey building a sensor for the level in our home water tanks.

I started with a raspberry pi, but then discovered esp32 with an lcd display for just a few bucks https://www.amazon.com/LILYGO-T-Display-Bluetooth-Developmen....

How long have you been using it? I find random ESP32s off of Amazon to be a bit of a crapshoot, and I’ve taken to just sticking to big microcontroller integrators that I’ve used before.

It's still in dev, so I haven't run it for more than a few hours at a time. Seems OK so far.

I’ve never heard of the ESP8266, but I have heard of (and used, for several projects) the RPi. That’s probably the reason for a lot of people.

If you want to do things that need an OS use RPI, if you want read/transfer sensor data or control basic servos esp8266 is a joy to work with. There are plenty of others, arduino is maybe more known as buzzword for microcontrollers.

You need a computer and the right cords to program a controller, the pi is that computer as well as the controller.

Yes, but you also get the downsides of having a full computer. Namely, it has an OS, it has an SD card that can wear out, it takes longer to boot, etc.

For me, simply because it was lying around!

It is true that pi is complete overkill for such a project, but it is very convenient and lots of people have experience with it.

Plus your standing desk could also be a pi-hole for wifi security.

or a Plex server.


Replace the ESP8266 with some Arduino clone for 3.50 € and you'll even be more beginner friendly...

Makes it harder to make it work with Homebridge/Alexa though.

It's not hard to get an ESP8266 dev board for that much.

If you're willing to wait you can get an ESP8266 dev board such as the WeMos D1 mini from aliexpress for less than $2!

Because it can't be extended so much as the r-pi. Why limit yourself when you don't have to? It's like asking why one would buy a 1TB harddrive when Linux fits in a few GB.

>Why limit yourself when you don't have to?

Cost, power consumption, reliability, performance, security, weight, and volume, to name just a few.

I really dislike the attitude that we should use the biggest hammer we can find for any size of nail just because we can.

And if you dont have to meet those requirements, why waste time, energy, thoughts trying to.

Theres a reason multitools are every day carry, and its not that they are the perfect tool for the job.

> security

The ESP8266 is a product developed by a Chinese company, which would be reason for some to avoid it from a security standpoint.

I love the idea of accidentally leaving a shoe (or whatever) underneath the height sensor and being confused about why the desk moves to the wrong height...

Clever though!

Haha, this has happened a few times. Especially if I move the chair that I've been sitting on out of the way toward the sensor.

I was thinking about a sleeping pet.

Even better would be a cat walking by and causing the whole thing to raise up suddenly :)

I’m curious why someone might reach for an RPI for a project like this? The last Pi I was using was consuming something like 8 watts while idle. That’s like $1.50 a month in electricity here in the Bay Area...

Many times, an arduino or esp32 would be more than capable with considerably less power usage.

Interesting point, I hadn't actually considered what the power consumption of RPis is. I use a few around the house to do various things. Honestly though, the only reason I've used one here is that it was lying around unused. As you mentioned, if I were buying something myself I'd use a different, smaller controller.

Several years back I was looking for an adjustable desk and was not liking the prices. I ended up buying this: https://www.homedepot.com/p/Husky-62-in-Adjustable-Height-Wo...

I also bought this desk - works great!!

Yeah - I totally don't use it for standing. I get to engrossed with what I'm doing and I forget to to stand. But it hold my 4 monitors, laptop and mic stand just fine.

Clever use of an ultrasonic distance sensor. I think one of those cheap time of flight proximity sensors would work too.

Because sometimes you just need the equivalent of an early Cray to do the job of a few relays...

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact