9 ms·
I am urging everyone who wants to do this to see if they can't first do what they need with a small board like an ESP32. Their energy usage is a small fraction,
by MPSimmons 3y ago
I am urging everyone who wants to do this to see if they can't first do what they need with a small board like an ESP32. Their energy usage is a small fraction, they cost ones of dollars, and they're sufficient for a whole lot. If you're of the Python persuasion, many boards support both MicroPython and CircuitPython.
It's worth looking into for the cost savings on initial purchase and ongoing power draw.
- sofixa 3y agoESP32 and related are pretty cool, but it's a whole different mindset; if something doesn't work, you can't just connect an HDMI/keyboard to debug live with all the regular utilities one might know and that come for free with any mainiline Linux.
- MPSimmons 3y agoThere are definitely limitations, but if it's a thing that you're going to leave untouched for years, it's worth looking at a device that will use 1/10th (or less) the power.
- sofixa 3y agoMaybe, but if it is going to take you drastically longer to write the software because there's a smaller ecosystem / the stuff you need doesn't have a readymade library / you've never done C/MicroPython / there aren't the Linux tools that will help you debug or do a simple crontab to run your script on a schedule... The ROI might not be there even with the lower power consumption.
- MPSimmons 3y agoThat's true, and an important consideration. I'm not an ESP fanboy, but I really do appreciate it as an engineer for how simple and cheap the development boards are, especially considering things like ESPhome exist. It's kind of ridiculous how many projects can be built by just writing a yaml file and a little soldering - https://esphome.io/guides/diy.html https://esphome.io/guides/diy.html
- seper8 3y agoMy time is worth more than the increased power draw
- archerx 3y agoThey are more stable in the long run since there is no OS. Honestly people make their lives harder using a Pi when using a microcontroller would be much easier and stable in the long run.
- LtWorf 3y agoI ran a rpi for 2 years with no reboot.
- blackfawn 3y agoSure they are capable of running for years but they can fail at inopportune times. Every time one has died on me, it always seemed to be the microSD card that died. And that's with using reputable industrial cards and log2ram. Also there's more complexity and overhead on a pi for simple tasks. And you potentially have to worry about updating the system and packages and other maintenance. Not saying microcontrollers like the ESP32 are completely invulnerable to failure but it certainly is less likely. And for another anecdote on uptime, I have a few Arduino-powered devices operating 24/7 for well over a decade now.
- pmontra 3y agoOne of my RPis died somewhere in the mobo. I can turn it on and mount it over USB and read the SD card but it doesn't boot. Another one lost the ethernet card. It was before they had Wi-Fi, or I didn't care to use Wi-Fi, I don't remember. A Pi zero died, full stop. A number of SD cards eventually died. Not a very reliable platform compared to my laptop. On the other side my laptop costs almost a couple of orders of magnitude more. I still use one RPi 3B+ with a TV hat and it has been on for about two years. It doesn't do anything else. I switched to Odroid for everything else that could run on a small server, because it was impossible to find Raspberries. They work well, I'm happy with them. The only problem: I have to pin the kernel to their own version with their own drivers. The distro is Raspbian and I upgraded it a couple of weeks ago.
- eknkc 3y agoJust took a look at the power consumption of Pi Zero. It will use $0.70 worth of electricity on my local grid, in a YEAR. I bet me writing this comment used more while keeping my laptop alive. I love ESP32s, built a long running device for my car, where the power draw is important because I don't want to deplete car battery. It uses almost no power. However if it was running connected to a power grid, I'd not care about the electricity cost.
- vel0city 3y agoIf something goes wrong I just plug USB into my regular computer with all my normal tooling and can see the serial console, edit the filesystem, etc. Or if I'm using something like Circuit python I'll just connect the web console.
- forinti 3y agoA Pi Zero will spend about a dollar a year in electricity.
- NoboruWataya 3y agoI've recently taken an interest in embedded programming and this is something I can't look past. Unless you're producing something at scale, I don't think there is much of a difference economically between writing code in a low level language and running it on a bare metal ESP32, vs running a Python script on a lightweight Linux on a Pi Zero. The cost difference is going to be a few dollars over the life of the product.
- sitzkrieg 3y agobattery powered devices is a whole segment rpi cant even put a foot in the door do hobbyists care? usually not
- nsteel 3y agoJust to clarify, does RP2040 count as rpi in this context?
- ssl-3 3y agoIn the context of an argument over single-purpose microcontrollers vs. general-purposes computers with modern featureful operating systems: No, it doesn't count. Nothing counts at all. ESP32 doesn't count, ATMega doesn't count, RP2040 doesn't count, Pi0/1/2/3/4/5/eleventy doesn't count. The whole argument is reprehensibly incoherent at its very core and there is no aspect of it that has any meaningful value. Microcontrollers and general-purpose computers are both very useful things. And while there is some overlap in how they can be used they are used, they are also very different things, with very different costs (to purchase, and to implement). It's a tired old argument that has been happening for as long as we've had both affordable computers, and also affordable microcontrollers (several decades, by my count). It has never been resolved, and it cannot ever be resolved. Both things can co-exist. This isn't like Highlander or the Superbowl: There can be more than one. It's OK.
- Macha 3y agoCan I run a media server on an ESP32? No. Can I run my password manager server on an ESP32? No PiHole? No. Unifi controller? No I think people making this comment are envisioning people use Pis as garage door controllers etc., but reflexively suggesting ESP32s as Pi replacements isn't helpful.
- MPSimmons 3y agoI don't disagree with what you're saying at all, but in my defense, the blog entry posted literally starts with the sentence: >I use Raspberry Pis around my home as everything from low-power FM transmitters to UPS energy monitors.
- cuu508 3y agoEven for the garage door opener use case, one nice thing about Pi is you can run Cloudflare tunnel on it – you can then access it from the internet without messing with port forwarding or TLS certificates.
- gh02t 3y agoNot an exact substitute but mentioning it because people might be interested: esphome added support for wireguard some what recently.
- gabrielhidasy 3y agoFor one device it works well, but when you get a bunch, I find it simpler to use one Pi (actually now a Lenovo m920q, it could be a Pi, I just needed a bit more power for other stuff) with the tunnels and make it talk to all the iot stuff. Has a few advantages: - Updating the more security sensitive parts is a lot easier (only one machine can talk to the internet). - Lets me use ultra-low-power 1-coincell a year stuff. - Integrates everything in a single point so coordinating stuff is very easy (like, single action to close the blinds, turn on projector and set AC a bit cooler).
- zer00eyz 3y agoYour point about the PI is spot on: a full linux stack means you can get up to "shenanigans" with all sorts of tooling! A PI with MQTT server and ESP32 as clients is a match made in heaven! For 30 bucks you go from nothing to PI zero, and a hand full (literal) of esp32 devices. Its a fun stack to play with!
- n8henrie 3y agoI hear the nay-sayers regarding the time cost and complexity of embedded programming, but as a hobbyist I think this is a great recommendation to at least consider. The projects that I've been able to accomplish on a microcontroller have been more reliable (over decades) than my Pi-based projects, and I don't have to worry as much about them being part of some botnet because I forgot to change the default ssh configuration (wasn't it `pi:raspberry`?). Beyond micropython, the no_std rust support for ESP32C3 is getting better every month. For people doing little home automation projects because they are fun, the additional constraints can make things a lot of fun and very rewarding. But yes, for those that are already handy with Linux, a Pi is generally going to be much easier, though IME will be at least 10x as expensive, and the additional setup to get it in the same ballpark for reliability (SSD booting vs network booting vs ro-rootfs, watchdog setup, etc) and the increased power usage (esp for a Pi5) should at least be small part of the decision making.
- LtWorf 3y agoI run ssh, https server (with some dynamic pages written in python), there is a 3T disk attached to get files, I download torrent. The other ones have touchscreens and speaker attached, I use them to listen to internet radio, watch cartoons and control relays. Your cheaper solution doesn't allow for any of this to happen.
- petee 3y agoThey simply asked people to consider it as an option, clearly your use wouldn't run on an esp very well
- doctor_eval 3y agoJust want to shout out to tinygo, for this old Go programmer, it makes working with ESP and friends loads of fun. Admittedly, reverse engineering a single digit 7-segment LED display wasn’t the best use of my time, but by crikey it was fun. https://github.com/doctor-eval/clocky https://github.com/doctor-eval/clocky
- torblerone 3y agoI had a look into it but unfortunately there seems no tinygo support for ESP Wifi/BT.
- roeles 3y agoDo these devices allow for effortless OTA updating?
- herbst 3y agoFor my last (a bit more complex setup) I am using a pi zero and several ESP8266/32 communicating with it, simply with http and wifi. My first time using micro python instead of Arduino as well. Absolutely love it and to my surprise it's super stable. Something about WiFi power states often messed up my projects in the long run, but no issue with micro python architecture so far.