Settings

Theme

Home Made Raspberry Pi Standing Desk Controller

timmyomahony.com

68 points by tomahony 5 years ago · 42 comments

Reader

tomahonyOP 5 years ago

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

  • solarkraft 5 years ago

    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.

  • zaxomi 5 years ago

    Nice project. Do you have an emergency stop button?

    • p_l 5 years ago

      Asking the important things here ! :D

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

  • watersb 5 years ago

    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.

    • grogenaut 5 years ago

      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

pugworthy 5 years ago

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.

mdorazio 5 years ago

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?

  • flak48 5 years ago

    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

    • numpad0 5 years ago

      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.

    • deivid 5 years ago

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

  • abraae 5 years ago

    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....

    • xxxtentachyon 5 years ago

      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.

      • abraae 5 years ago

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

  • karlshea 5 years ago

    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.

    • entropie 5 years ago

      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.

      • scsilver 5 years ago

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

        • rhinoceraptor 5 years ago

          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.

  • tomahonyOP 5 years ago

    For me, simply because it was lying around!

  • Isamu 5 years ago

    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.

  • martin_a 5 years ago

    Yes!

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

  • amelius 5 years ago

    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.

    • ddevault 5 years ago

      >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.

      • scsilver 5 years ago

        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.

      • amelius 5 years ago

        > security

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

e28eta 5 years ago

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!

  • tomahonyOP 5 years ago

    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.

  • daniellarusso 5 years ago

    I was thinking about a sleeping pet.

    • pugworthy 5 years ago

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

ed25519FUUU 5 years ago

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.

  • tomahonyOP 5 years ago

    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.

xellisx 5 years ago

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...

  • BostonEnginerd 5 years ago

    I also bought this desk - works great!!

    • xellisx 5 years ago

      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.

IshKebab 5 years ago

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

buescher 5 years ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection