237 points · by adunk · 2mo ago · 124 comments
Stated another way: An MCU, like the ESP32, is a tiny computer, sans the hardware you physically interface with it.
The computing power, and memory is much lower than your desktop or laptop PC (or mobile phone), but if you are using it to run a dedicated task, instead of using a big OS like Linux or Windows, it can complete the tasks really fast (often microseconds) and with minimal power use. This is because it's easy to program to do exactly what you need, with nothing competing for the hardware.
A note on ESP in particular compared to other MCUs: It's one of the only (Or was?) options which has Wi-Fi integrated into the MCU itself. It's a good default if you want that.
Indeed. The closest direct competitor is likely the Nordic nRF52840, which does bluetooth + thread, but can't talk actual wifi
They're generally intended to run flashed firmware and be single-purpose. They usually come bundled with peripheral components and typically have breakouts to add more (pots, sensors, etc).
They're great for doing one thing (though some support firmware switching), and you can build the 'software' for them pretty easily using Python or C-like variants.
So for hobbyists they're perfect. You want a quick LED christmas display you can toggle between Rudolph and Santa from a quick network call? You want a humidity sensor in your bedroom? You want to create a networked security camera? These are the types of use cases for MCUs.
Absolutely mind blowing. What a fun time to do side projects.
Each type of device has different capabilities. Most have Wifi, some don't. Some have extra RAM and ROM, and some don't.
The main thing that ties all the different devices together is the ESP-IDF software stack.
If you want a web API for something in the physical world, make ESP32 do it.
[0] older versions had Xtensa cores, not RISC-V.
Comparisons to a Raspberry Pi are a stretch IMO. It is not a single board computer. You can't hook it up to a monitor/TV, plug a mouse and keyboard in, and use it as a Linux PC. However, there are people who use Raspberry Pis like a microcontroller because of its GPIOs... but they should all be using microcontrollers instead.
Isn't it like $2 vs $6?
:)
There’s no way a multi-user OS such as Linux can be as efficient as a firmware blob that does one thing. Tell me if I’m wrong, but in my mental model, one can get about the same mileage with 16 MB of PSRAM in an MCU running FreeRTOS as one can get in a 512 MB SBC running Linux. For my use case, the winner combination would, of course, be a 512 MB SBC running FreeRTOS, but I’ve so far been unable to find such a wondrous thing.
For your use case, you need raw performance and low-level control, and you have it. But for IoT device which is all about network more or less, there's usually no need to go low-level.
ESP32 for Wi-Fi handling uses wpa_supplicant port from Linux for example.
You can run a real, multi-user Linux with as low RAM as 8 MB. You get the benefit of running any Linux-supported programming languages (and combine any amount of them without extra effort, just on a real machine), established portable abstractions, established memory protection model, ease of debugging.
You can run both though. Both FreeRTOS and Linux simultaneously, where Linux is a FreeRTOS task on a dedicated core. That's how several Linux ports work, haven't checked if Espressif's works this way as well.
Or you could just use it as a microcontroller. Networking support is already good. Programming language support is better than you think (C++, Rust, Python, JavaScript). Debugging just works on newer boards.
>There's also limited support for 32-bit RISC-V in distros so anyone looking to run Linux on this will need to build everything themselves.
For this kind of a device, "everything" is a kernel + your application/libraries + maybe busybox/toybox with some applets, all with XIP.
>Easier to just get a cheap ARM SoC that can probably run Android
It's at least twice as expensive for the features S31 provides. See my other messages here.
Yes, obviously. The advantage is in how easy it is to port software to the board, and how much work you need to do to get any given amount of functionality.
Espressif's port use 6.18 due to this exact reason. There's also another port, using 7.1, not sure if it supports XIP.
https://www.phoronix.com/news/RISC-V-XIP-Being-Removed
XIP is almost essential for these low-RAM devices. You can run Linux with 8 MB RAM with reasonable functionality.
Edit: I looked into it, sounds like NetBSD hasn’t done work on ESP32 before because of the lack of MMU. Now this should be possible, but there’s probably a fair amount of work to do.
Here are the archive onion and regular links:
https://web.archivep75mbjunhxc6x4j5mwjmomyxb573v42baldlqu56r...
https://web.archive.org/web/20260924163612/https://www.xda-d...
The site also requires a User-Agent header
Maybe XDA Developers does not like pseudo-anonymity
(Although xda-developers forum isn't exactly a great place for technical discussions either. Not following standard software engineering practice and instead using forum posts to track bugs and announce releases in 2020s is beyond me.)
I'm sorry to be asking this, but what is that supposed to mean?
Smart homes are dumb unless you are presence aware. Looking at your phone to do a thing is just moving a light switch to your hand.
The Who is — does the automation make sense for one or many people. If two people are in a room what happens? If one person leaves what happens?
Esp32’s are pivotal in actually making a smart home predict what you want making the home more of a friend, “get on up there Peter Townsend.”
Do you have any pointer for starting on this ? Something with eink screern and browser rendering would be very good combo. I looked at M5Stack paper s3, but it doesn't cave camera.
https://github.com/foky26/Retro-Gamer
https://github.com/EremusOne/ESPectrum
https://github.com/hchunhui/tiny386
New chips like the one in the article should be even more capable. 486 won’t be out of reach for long.
One of the big problems has been handling peripheral emulation, multiple controllers, etc. USB plus the other cores should help with this.
According to Espressif website, current "reference price" for S31 sample module (1 piece) with 16MB flash + 16MB RAM is $6.2.
If S31 won't be much more expensive than S3 in bulk, it has a chance to become a very successful and what's more importantly really cheap full-featured Linux platform, in a small form factor, with flash, RAM, and radios integrated.
Espressif here could easily kill many contenders. You can count Wi-Fi-integrated Linux SoCs on one hand, let alone with RAM+Flash integrated, let alone cheap and available in quantities, and with reasonable soft and tech support.
Oh, and ESP module quite literally doesn't need anything more than a 3.3V power and maybe 2 capacitors to work.
There are a lot of competitors in China, the BK7258 is arguably better than S3, but cost similar.
And if you are willing to sign NDA, there are much better offer from BES.
What BES chip are you referring to?
Tried running yolo pose on bare S3, and the results were underwhelming.
Most embedded stuff doesn't need that much power.
That is how we end up with Electron.
- 1 or 2 M.2 NVMe for fast storage
- 2 RAM sockets for expandability. Not sure if DDR5 or if DDR4 is sufficient. SO-DIMM is fine.
- 2.5 GBit ethernet (or better). Two ports would be better than one.
- a CPU with a bunch of cores that can saturate it well. Also a NPU inside the CPU.
- power via USB-PD
- optionally a couple of USB ports for things like USB sticks, Wifi (if needed), printer.
That's it. I don't need a display port like HDMI or DP.
I'll fix it, and thanks for mentioning it, but I also wanted to add that the "AI article" accusation was unnecessary. I spent a lot of time going through Espressif's documentation and the datasheet, and working out how Sv32 works and differs from the "MMU" implementation Espressif typically touts. It just feels like a strange accusation to tack on to an otherwise fair point regarding the article's readability.