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
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
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.
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...
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.
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.
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.
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.
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.
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’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.
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.
42 comments
[ 3.1 ms ] story [ 101 ms ] threadI 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.
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
Also, what positive safety control loop could a standing desk use?
If it uses more material than required for the job it's over-built and under-engineered. Your solution seems to be massively that.
Clever though!
Replace the ESP8266 with some Arduino clone for 3.50 € and you'll even be more beginner friendly...
Plus your standing desk could also be a pi-hole for wifi security.
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....
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
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.
Theres a reason multitools are every day carry, and its not that they are the perfect tool for the job.
The ESP8266 is a product developed by a Chinese company, which would be reason for some to avoid it from a security standpoint.
Many times, an arduino or esp32 would be more than capable with considerably less power usage.