It's still a microcontroller, but it's a step above any other.

237 points•adunk•7 days ago•123 comments•

123 comments

jameshart7 days ago
The range of difference in capabilities of different boards branded ESP32 is getting larger. Makes it tricky to figure out when someone says ‘you can run this on an ESP32’ what level of hardware investment is required.
philipallstar7 days ago
I am really struggling to understand what ESP32 is. I've got into adjacent things a bit recently, but haven't figured that one out yet.
the__alchemist6 days ago
It's a family of microcontrollers by Espressif. A microcontroller (MCU) is a type of integrated circuit (IC: physical appearance: Black rectangle of epoxy with exposed metal tabs). It has, in the same IC, a CPU, RAM, non-volatile FLASH memory, and a collection of peripherals which vary depending on the MCU. These usually include I/O protocols, ADCs, DACs, DMA controllers, math processors etc.

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.

ckocagil7 days ago
Originally it was the more capable successor to ESP8266, the super cheap chip containing a high speed core with wifi and an IP stack. At one point it powered a huge chunk of all smart devices on the market. Then the original ESP32 was introduced as the successor, with BLE and two cores which were even faster. That made it a very capable chip for tasks demanding compute. After the original ESP32 they decided to add variety and make a whole "ESP32 family" and yes there's quite a lot of variety these days. Even the ISA and cores changed.
nkozyra7 days ago
They're all just single board computers, generally low-powered (literally and in the sense of capability, particularly memory)

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.

leptons6 days ago
"ESP32" is a brand name. It covers devices with different CPU cores - Tensilica Xtensa and more recently RISC-V.

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.

pornel6 days ago
ESP32 boards are small and cheap adapters between Wifi (network APIs) and I/O pins for small electronics like LEDs and relays.

If you want a web API for something in the physical world, make ESP32 do it.

m4636 days ago
> hardware investment

Isn't it like $2 vs $6?

:)

dsign6 days ago
I’ve been developing a guitar pedal firmware in an ESP32-P4, and the flash image size is still under 1 MB and the PSRAM sits unused. It has not only a bunch of sound filters, control code for ADC, DAC a couple of USB devices, SDIO and LittleFS, but also a full-blown serial terminal TUI to control all sorts of details and to monitor performance. Said performance is good, but what blows me away is that there’s no jitter in the number that measures the number of cycles the processor executes while processing a sound frame, i.e. no preemption by the kernel to go and take care of its business.

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.

ValdikSS6 days ago
The benefit of running Linux on a what used to be an MCU is that you're getting the best network stack, Bluetooth/Wi-Fi stack, one of the best device drivers (say for USB Host), stock and very well tested software, etc.

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.

Rohansi6 days ago
Nobody is going to build an IoT device with this MCU running Linux. It's only able to access 64 MB of RAM from its slow cores. 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. Easier to just get a cheap ARM SoC that can probably run Android.

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.

zelo6 days ago
Zephyr rtos on raspberry pi sbc https://github.com/jetpax/PiZZa/tree/main
mrheosuper6 days ago
Few years ago we were experiment with a smartwatch that has "Wear-os like" interface. You can get really far with only 5MB of RAM.
yjftsjthsd-h6 days ago
> There’s no way a multi-user OS such as Linux can be as efficient as a firmware blob that does one thing

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.

mstaoru7 days ago
Ah, the Lord Giveth and the Lord Taketh Away. P4 didn't have enough raw speed for camera applications but had MIPI CSI, S31 has enough raw speed but no CSI.
daemonologist7 days ago
My reaction precisely when I first heard the specs for this thing. Espressif works in mysterious ways.
monocasa7 days ago
I imagine that most of these (like almost all embedded chips) are designed primarily for some specific customer or two, and then they dump them on the market generally on the off chance someone else wants them too now that they're essentially capitalized.
lopper47 days ago
What about the P4's "raw speed" is lacking for camera applications (vs S31)?
mstaoru6 days ago
I'm actually wrong about S31. The cores are clocked lower than P4. And somehow I thought S31 is 250 MHz 16-bit DDR PSRAM but it's 8-bit only. So if you have an uncompressed video stream over CSI, there's just nowhere to buffer it.
ValdikSS6 days ago
Too bad Linux has removed Execute-in-place (XIP) support for RISC-V since 7.1. It allows to run the kernel (and applications) from NOR flash directly, without copying it into RAM first. Somebody should reintroduce it.

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.

iamnothere6 days ago
IMO Linux is gradually becoming a poor fit for niche use cases and extremely constrained devices. It makes sense, as they are trying to trim less used parts of the code that add maintenance overhead (especially areas without any volunteers to maintain them). And RTOSes are gradually replacing Linux on MCUs. I don’t know what’s best to replace it if you want a full OS, probably NetBSD?

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.

polycancel6 days ago
Not hitting the site in Tor. Getting "Secure Connection Failed"

Here are the archive onion and regular links:

https://web.archivep75mbjunhxc6x4j5mwjmomyxb573v42baldlqu56r...

https://web.archive.org/web/20260924163612/https://www.xda-d...

1vuio0pswjnm76 days ago
Interesting. I tested with openssl s_client and bssl client

The site also requires a User-Agent header

Maybe XDA Developers does not like pseudo-anonymity

Read the full thread on Hacker News →

Related stories