‹ BackHN Continuity

Thread

The newest ESP32 can run Linux and it's getting close to a Raspberry Pi

237 points · 123 comments · adunk

  1. jameshart · · focus · HN ↗
    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.
    1. philipallstar · · focus · HN ↗
      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.
      1. nkozyra · · focus · HN ↗
        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.

        1. m00dy · · focus · HN ↗
          you can also use Rust.
          1. the__alchemist · · focus · HN ↗
            Yea - I think this is one of Rust's core use cases.
        2. ckocagil · · focus · HN ↗
          They're not single board computers. They're microcontrollers. Or rather they were until this new chip was introduced.
          1. serf · · focus · HN ↗
            >they're not single board computers.

            what's the meaningful distinction now? It isn't all SoC anymore and it has had a linux capable MMU since S3, even if it required a lot of work.

            The only real difference at this point is pure numbers, and i'm not that keen on defining microcontrollers as "those things with less ram than an SBC.", and if it's a microcontroller because it requires bare-metal flashes; well then I point to the older S3 MMU boards running busybox.

            1. the__alchemist · · focus · HN ↗
              > what's the meaningful distinction now?

              SBC is a PCB which includes ports for power, I/O, often other parts like sensors on it. Esp32 is a MCU. You can put an Esp32 on a PCB and call it an SBC. (Although semantically SBC usually refers to something that runs a GPOS, but perhaps that's flexible or changing)

              1. horsawlarway · · focus · HN ↗
                It's much more difficult to buy the ESP32 as an MCU than it is to buy it as a SBC, with ports for power and I/O already on a PCB (often with through pins, to land on another PCB, like the arduino hats). And I don't mean "it's difficult because you have to solder" - I mean "it's difficult to find many places that sell it".

                Ex - go check amazon, they're all the "dev kit" versions of ESP32.

                Hell - even Alibaba has an overwhelming majority of the kits in the SBC form, rather than the straight MCU (although they at least exist in that form there, unlike amazon).

                Even on digikey... there are like 4 listing for the straight MCU, and hundreds of listings for PCB board versions.

                So I think for most consumers purchasing these... functionally they end up buying a form factor that is much closer to SBC than MCU.

                ---

                From my perspective... I'm old enough to remember when Arduinos were the hot shit in this space, and now ESP32 is basically the same value prop at 1/10 the price point (or better, if you are actually willing to solder it to the PCB yourself... then you get down to 1/50th the price point).

                1. 0x457 · · focus · HN ↗
                  A few notes: if you buy non-module package (i.e MCU itself) then you would need to certify it with FCC (or you local FCC alternative) yourself, so most of vendors buy modules. Those vendors don't go to amazon to buy those because these make sense only if they manufacturing their own boards.

                  Last time I checked digikey had every module version avaiable for every version. You get hundreds of other versions because there are more variations of those.

                2. petsfed · · focus · HN ↗
                  >It's much more difficult to buy the ESP32 as an MCU than it is to buy it as a SBC, with ports for power and I/O already on a PCB (often with through pins, to land on another PCB, like the arduino hats). And I don't mean "it's difficult because you have to solder" - I mean "it's difficult to find many places that sell it".

                  1. Go to mouser.com

                  2. Type ESP32 into the search bar

                  3. There's your part.

                  Its difficult to buy a very specific nut or bolt from Amazon (their nut/bolt search interface doing precisely nothing it appears to be intended to do). That doesn't mean McMaster-Carr doesn't exist. You're just going to the wrong store.

                  If you're in particular referring to how hard it is to find a PDIP package (that is, a through-hole package) for an ATMEGA MCU, that's because they don't make them anymore. Insofar as I'm aware, Espressif has never made a through-hole ESP32 module, but maybe they made one with castellated edges?

                  But an ESP32 module is as easy to come by as a surface-mount ATMEGA328P. Which is to say, very easy.

                3. lopper4 · · focus · HN ↗
                  It's not "difficult" at all if you aren't looking in the wrong places. Espressif has sold billions of them so apparently everyone else is figuring it out just fine.
            2. ckocagil · · focus · HN ↗
              The tangible hardware difference is the MMU. S3 didn't have a proper one. This new chip does. But the biggest difference is the intent. Microcontrollers focus on peripherals and are used for interfacing, data conversion and signal processing. They're meant to run either bare metal firmware or small RTOS. OTOH microprocessors have in addition to an MMU big caches, high IPC numbers, wide bus lanes, everything you need to run different workloads as fast as possible.

              Technically a chip can excel at both.

            3. MobiusHorizons · · focus · HN ↗
              A single board computer contains an application processor, not a microcontroller. They have very different design goals.

              A microcontroller is a type of processor that offers very fast startup, predictable timing and direct access to hardware peripherals. In contrast to application processors that are intended to run an operating system, a microcontroller will not have OoO execution, multiple tiers memory (eg cache and dram). Usually they also lack an mmu and multiple privilege levels of execution (although that seems more common on riscv microcontrollers). All this means microcontrollers aren’t designed to run Linux (even if someone does figure out how to do that) or clock in the gigahertz, but instead provide very predictable low latency execution required for managing real time systems. For example they might need to operate a set of mosfets with microsecond accuracy to efficiently and safely control a motor.

              1. mrheosuper · · focus · HN ↗
                > a microcontroller will not have OoO execution

                Similar to a lot of old cortex-A soc.

                >multiple tiers memory

                The S31 also has cache and sram, with inpackage psram.

                > Usually they also lack an mmu

                The S31 has mmu.

                1. MobiusHorizons · · focus · HN ↗
                  I feel like you are deliberately misunderstanding me. I’m not saying that these define a microcontroller vs application processor, but rather that they stem from differing design goals. Presence or absence of features is illustrative not proof. All you need to do is look up what the A in cortex A stands for, or look at the data sheet of the S31 to see it is classified as an MCU by the manufacturer. I do admit that the feature set of this MCU blurs the lines somewhat at 500mhz with cache hierarchy and psram, but the ability to run from on-chip sram with dedicated performance budget keeps this from losing suitability for true realtime tasks.
            4. pdpi · · focus · HN ↗
              Perhaps the most straightforward difference is right in the name — a single-board computer is a whole board. A microcontroller refers to just the IC itself. The thing that's on the article's picture is a dev board for an MCU, not the MCU alone. That's just the chip at the top with the Espressif branding.

              Now, if you want to argue that the difference between a dev board and an SBC is kind of vague, I agree on that front. I'd argue that the distinction is mostly the vendor's intent. E.g. if I sell the ICs in bulk and _also_ sell a board with that IC, it's probably a dev board. If I source the ICs from somebody else, only sell the assembled boards, and ship a general-purpose OS with it, it's probably an SBC. With sufficiently powerful hardware (like this thing seems to be), you could use a dev board as an SBC, and that is basically what this article is all about.

          2. [deleted] · · focus · HN ↗

            [deleted]

        3. atonse · · focus · HN ↗
          BTW, I was just researching this last week (the christmas display) and ESP32 has a matter compatible chip now... so you an control all this from Apple Home and the other Smart Home platforms.

          Absolutely mind blowing. What a fun time to do side projects.

          1. Muromec · · focus · HN ↗
            esp32 has wifi so it it's trivial to hook it to mqtt which then exposes it to home assistant
          2. 0x457 · · focus · HN ↗
            I think you're confusing Matter and Thread. ESP32-H* have Thread radio, but every esp32 that has wifi is able to talk Matter over WiFi.

            I have virtual power outlets and fans that actually just some process on linux.

            1. atonse · · focus · HN ↗
              Ahhh good point. here are the details I found after reading your reply: <a href="https:&#x2F;&#x2F;docs.espressif.com&#x2F;projects&#x2F;esp-matter&#x2F;en&#x2F;latest&#x2F;esp32&#x2F;introduction.html#espressif-matter-solutions" rel="nofollow">https:&#x2F;&#x2F;docs.espressif.com&#x2F;projects&#x2F;esp-matter&#x2F;en&#x2F;latest&#x2F;esp...
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.