ESP32-S31
166 points
3 hours ago
| 19 comments
| espressif.com
| HN
alnwlsn
1 hour ago
[-]
I kind of wish these all weren't called ESP32. ESP8266 and ESP8285 -> ESP32 made sense, but now we have 10+ different versions with different features and different architectures.

Kind of like how in every thread involving a Raspberry Pi Pico (RP2030/RP2350), there's always someone confusing it with the single board computer version.

The ESP32 (Classic, usually WROOM-32E) is still usually what comes to mind when I hear ESP32.

reply
yonatan8070
26 minutes ago
[-]
It's like these for other families too, you've got your STM32, then you can get the sub-models ranging from entry-level STM32C0 to the full Linux chips like the STM32MP2, with lots of options in the middle
reply
randyrand
56 minutes ago
[-]
It signals ESP-IDF compatibility
reply
JCTheDenthog
40 minutes ago
[-]
They can signal that with numbers other than 32, the "ESP" part is what matters.
reply
Etheryte
35 minutes ago
[-]
Showing up in search results, or in this day and age LLM results, is still king. If your famous product is known as the ESP32, it doesn't hurt sales to spin other products off the same line. It might hurt clarity, glance value and many other things, but it will drive people to you.
reply
pantalaimon
1 hour ago
[-]
But it's the same scheme as STM32, EFM32, GD32, …
reply
randomint64
2 hours ago
[-]
Espressif is on fire! And the CPU even has SIMD instructions!

RISC-V cores is a big deal for embedded systems because now compiling for SoCs is only a matter of `rustup target add riscv32imac-unknown-none-elf` instead of downloading half-broken proprietary toolchains and SDKs.

Take a look at https://kerkour.com/introduction-to-embedded-development-wit... and https://kerkour.com/rust-esp32-pentest to get started with modern (Rust ;) embedded development.

reply
phkahler
2 hours ago
[-]
>> And the CPU even has SIMD instructions!

Yes, but it looks like there is no hardware floating point. The description of the CORDIC module indicates fixed-point calculations, which is consistent with the lack of any reference to floating point.

I am happy the have CAN-FD and Motor PWM module, but nowhere did I see conversion times listed for the ADC. For motor control I demand 1uS conversion time or less, and in the last year I've switched from fixed point to floating point after holding off on that switch for ~15 years.

reply
polpo
1 hour ago
[-]
From the ESP32-S31 datasheet: "Single-precision floating-point unit (FPU) per core"
reply
BenjiWiebe
1 hour ago
[-]
The datasheet apparently doesn't say, but judging by their other products' listed 12 bit SAR ADC sampling rates (and assuming this one is similar to what appears to be their standard ADC ) the conversion time will be on the order of 10uS.
reply
BenjiWiebe
1 hour ago
[-]
Also why do you need 1uS for motor control? 1uS is 0.1 degrees of rotation at 16,666 RPM if I did the math right.

I don't know much about motor control, is it normal to need that fast of feedback?

reply
phkahler
1 hour ago
[-]
>> Also why do you need 1uS for motor control?

It's not that important if you use current sensors on the motor phases. But then you're looking at HALL sensors or a shunt with a very high gain amplifier with good common mode rejection - looking for mV signals on top of a +12V or +48V square wave at PWM frequency.

By using low-side shunts under each half-bridge you don't need the common mode rejection, but you can only measure phase current while the low side FET for that phase is on. That means limiting the PWM duty cycle to ensure that FET is on long enough to measure current, so we trade available voltage range for sample time.

I've also written code to measure all phase voltages with a single low-side current shunt under the whole 3-phase bridge. That requires careful phase shifting of the PWM signals and very fast conversion time, but you don't have to compromise available voltage range 0-100 percent duty cycle is possible.

Typically we run the control loop at PWM frequency, but the measurements need to be faster than that.

reply
topspin
1 hour ago
[-]
Field-oriented Control schemes modulate phase currents at high frequency; the feedback loop must be much faster than the motor phases. Until fairly recently, this stuff was the exclusive province of dedicated ICs (Trinamic et al.) and FPGA. Today, FoC can be done in (mostly) software with MCUs.

Fast feedback loops are also necessary in SMPS, another area where precision, low latency MCU peripherals and software are actively displacing traditional approaches.

reply
nathanfries
43 minutes ago
[-]
I similarly don't know much about motor control or hardware in general, but would this maybe open up multiplexing options?
reply
greenavocado
1 hour ago
[-]
People will always find a reason to complain or pretend they are controlling rocket motor servos with their ESP32
reply
NooneAtAll3
2 hours ago
[-]
where did you find cordic mention?
reply
Havoc
1 hour ago
[-]
Nice. Been meaning to try rust on these sort of devices but the riscv I saw thus far seemed to be mixed arm and riscv which seemed weird
reply
cassepipe
2 hours ago
[-]
Curious: What does the "imac" stand for in the architecture target name ?
reply
mentalpagefault
2 hours ago
[-]
IMAC are the RISC-V extensions supported:

I = Base integer instruction set, 32-bit

M = Standard extension for integer multiplication and division

A = Standard extension for atomic instructions

C = Standard extension for compressed instructions

https://en.wikipedia.org/wiki/RISC-V#ISA_base_and_extensions

reply
cassepipe
1 hour ago
[-]
Thanks.I can't believe they chose non-arcane, memory-friendly letters. Kind of rare in naming hardware I feel (unless it's not ?)
reply
tux3
1 hour ago
[-]
The core set of extensions has pretty friendly single letters, but the flip side is you run out of letters pretty quickly.

The non-single-letter extensions should make you feel more at home. Like the supervisor instructions. You have Smcntrpmf which helps with benchmarking by pausing perf counters during traps. I think Smcntrpmf just rolls off the tongue nicely.

Then there's a lot of extensions that start with Z followed by a sprinkling of random letters which is secretly an abbreviation you couldn't have guessed. For instance you have your SHA-2 instructions in Zvknha and Zvknhb, since that's the Vector Krypto NIST Hashes.

reply
NekkoDroid
1 hour ago
[-]
I see you are unfamiliar with `rv64mafdcbvh_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccrse_ziccamoa_zicclsm_za64rs_zihintpause_zic64b_zicbom_zicbop_zicboz_zfhmin_zkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs_supm_svade_ssccptr_sstvecd_sstvala_sscounterenw_svpbmt_svinval_svnapot_sstc_sscofpmf_ssnpm_ssu64xl_sstateen_shcounterenw_shvstvala_shtvala_shvstvecd_shvsatpa_shgatpa` also known as `RVA23`
reply
JdeBP
2 hours ago
[-]
There are a few lettered extensions to the base RV32I instruction set. e.g.:

* https://docs.riscv.org/reference/isa/unpriv/m-st-ext.html

reply
NooneAtAll3
2 hours ago
[-]
where did you find it?
reply
tosh
2 hours ago
[-]
very interesting, do you have a pointer with more info on what kind of SIMD support it has?
reply
throwaway81523
26 minutes ago
[-]
Why on earth SIMD instead of the risc-v vector extensions that are supposed to be better?
reply
bobmcnamara
1 hour ago
[-]
Hopefully comparable or better than ESP32S3.

But with the weird alignment thing fixed

reply
frikk
2 hours ago
[-]
I've been building hobby LED art projects with WLED (exclusively built on the ESP32 platform). It's been a blast. These little boards are so powerful and the open source community continues to amaze me.

My preferred controller platform is of the QuinLED line - comes with power distribution, voltage regulators, fat copper lines, configurable data-line resistors, and smart auxiliary hardware support all for an affordable $30-$50 per controller. (quinled.info)

<https://kno.wled.ge/> - WLED homepage and probably my favorite clever URL of all time.

reply
wolvoleo
26 minutes ago
[-]
I do a lot of LED projects too but I just use ws2812s. What do you need the controller for? Large brightness perhaps? Just curious.
reply
gedy
8 minutes ago
[-]
WLED is a system that runs on the ESP32 for some cool capabilities to drive the ws2812s, OP linked above.
reply
oritron
2 hours ago
[-]
The specs look great, will see how long it takes to get these as WROOM modules or on little dev boards; my two form factors of choice for Espressif devices. I'm also curious about the pricing, so far they've impressed me with how much more you get in successive generations at a similar price.

If you're excited about the (relatively) speedy RISC-V cores and SIMD, look at the P4 which is available now. It has a slightly faster clock but no wireless: https://products.espressif.com/#/product-comparison?names=ES...

There's some cool work out there using the dsp functionality and built in image handling to crunch a lot of pixel data, which should work similarly on the S31: https://www.reddit.com/r/WLED/comments/1ry2jd7/wledmmp4_with...

reply
Aurornis
2 hours ago
[-]
Good to have WiFi and wired ethernet on the same part again.

Although we lost the MIPI support that the P4 dual-core RISC-V line has.

reply
apitman
24 seconds ago
[-]
Dang would love to have both in the same chip.
reply
tetris11
2 hours ago
[-]
How does wired internet technically work on these chips? Is it just 8 dedicated GPIO pins?
reply
LeifCarrotson
1 hour ago
[-]
Not "just", it's (presumably) 8 dedicated pins that form an RMII interface. This is not the same 8 pins as you'll find in your 4-pair Ethernet cable, it's a separate protocol which can be connected to an Ethernet PHY transciever like a TI DP83867E [1], which is further connected to "magnetics" [2], a convenient package of 8 integrated transformers and chokes that provide the galvanic isolation feature of an Ethernet connection.

A few SoCs provide integrated PHY transceivers, but usually it's an external chip.

[1]: https://www.ti.com/lit/ds/symlink/dp83867e.pdf

[2]: https://yageogroup.com/content/datasheet/asset/file/DATASHEE...

reply
alnwlsn
32 minutes ago
[-]
You need a transceiver chip which then hooks up to the Ethernet jack.

Usually have to do this for any interface when the signals don't come in right at logic level, like CAN, RS-485...

although it's not always exactly 'just' logic level conversion.

reply
BenjiWiebe
1 hour ago
[-]
Looks like you need an external PHY. It can talk to the PHY with RGMII which uses 12 pins, which are muxed with GPIO8-19.
reply
jml7c5
1 hour ago
[-]
Previous discussion from two months ago, when this was announced: https://news.ycombinator.com/item?id=47561678
reply
skybrian
2 hours ago
[-]
I'm interested in audio out because I dabble in musical instruments.

What's the state of Bluetooth audio out on microcontrollers? Is low latency and high quality output possible?

reply
oritron
2 hours ago
[-]
Low latency in Bluetooth audio comes down to codecs and the best are proprietary.

If you want to really cut down latency and need wireless with hardware like this, you could use a second ESP32 and send your own bitstream between them.

reply
timothyb89
53 minutes ago
[-]
I've been experimenting with more-or-less this on the existing ESP32-S3 (well, to a smartphone/PC rather than a 2nd ESP32).

Practical bandwidth limits are in the ~72kb/s range with Bluetooth and a custom wire protocol, and Opus voice-mode encoding can't run in realtime beyond complexity 3; music encoding can't run at all. Maybe there's a more compute-friendly audio codec I'm not aware of, but as far as I know these chips just aren't quite powerful enough for high-quality music encoding, unfortunately. I'm hoping the S31 might be a bit better fit here (decent CPU boost + better SIMD).

Latency is still a bit rough with BT overhead. There might be some new options with LE audio on the S31 but I haven't found a way to get below ~80ms with the existing ESP32-S3 stack.

tl;dr, high quality voice is doable today with okay latency, music probably less so, maybe the S31 will be better

reply
tliltocatl
2 hours ago
[-]
Is there any reason you want wireless? Bluetooth audio is a disaster, AFAIK. You don't want to use it for music. Just go wired, the ether is too cramped already.
reply
skybrian
1 hour ago
[-]
There are alternatives, but being able to use an external amplified speaker and also move around easily would be nice. Maybe it's not feasible yet.
reply
mrandish
1 hour ago
[-]
> I'm interested in audio out because I dabble in musical instruments.

Sorry, I don't know. I'm just responding to echo and expand on another reply that Bluetooth for anything related to serious music, from audio playback to MIDI input is a dumpster fire on Windows.

Several years ago I tried to set up a high-end Windows laptop for hobby DAW composition on the go. The real-world BT audio latency just from laptop to headphones/earbuds was unworkable and, separately, the input latency from BT midi controllers was unworkable. Stacked together the total lag was laughable.

At the time, the issues were widely known and much lamented. Some tech blogs (including one at MSFT) indicated there were issues at every level of the stack (drivers, firmware, silicon) and work was proceeding to address the end to end shit show. The only workable Windows solutions referenced online involved using specific non-Bluetooth wireless devices. Needing to have a dedicated USB dongle hanging off the laptop combined with having a choice of either one specific device or a receiver dongle to support all devices, is less appealing than just having a wire.

Since then I've looked again every year or so but have seen no reports yet of meaningful progress and there's even less discussion of work in progress. Very disappointing. And the situation on the BT audio quality side doesn't seem much better. If you don't want degraded audio quality it's either choosing very specific devices which support a proprietary BT codec or switching to non-BT wireless dongle hardware. At least there is talk of improvement on audio quality but no clear indication better baseline minimum audio quality will ever be mandated in the BT audio standard.

If anyone has info the baseline latency or quality (input or output) of standard BT devices in Windows configs will improve, I'd be delighted to hear it.

reply
thehk
1 hour ago
[-]
> ESP32-S31 is particularly well suited for edge AI and machine learning workloads, including neural network inference

Any way to know what kind of performance one could expect running e.g. a depth anything model on there?

reply
otterdude
1 hour ago
[-]
I was wondering this as well. What exactly makes this a good AI chip vs others.

Unless they're not listing a major feature in their spec, a dual core 320Mhz microcontroller is not bad but youre not going to be running any kind of vision model on it, at least very fast.

reply
mort96
1 hour ago
[-]
This looks like the long-awaited replacement for the original ESP32. The S and C series have been relatively low performance (the S better than the C but stuck on the outgoing Xtensa architecture), the P4 is powerful but lacks wireless. This is a relatively high performance, dual core MCU with wireless; a nice default option for low volume designs where being able to copy a previous implementation is more important than saving a few cents. Just like the ESP32. Nice.
reply
swiftcoder
1 hour ago
[-]
Can it cope with TLS? The esp32 having a viable TLS stack has been a big win
reply
topspin
1 hour ago
[-]
I'm excited that this MCU and the P4 has RISC-V CLIC. That puts it at least on par with Cortex NVIC and enables bare metal frameworks like Rust RTIC to work really well.

Also 4x MCPWM peripherals; that's a first for any Espressif MCU.

The additional GPIOs are very welcome as well. CAN-FD!

This device is going to be a big hit for Espressif.

reply
zuzululu
1 hour ago
[-]
How do I order a few samples, seem like there is a MOQ ?

Also I want to dive into hardware stuff but I'm always clueless as to what I do afterwards when this would arrive? Are you using a generic board or are you ordering and designing PCBs to hook this up to?

What are you using it for ? How do I go from a prototype to mass production via kickstarter?

reply
chrisco255
1 hour ago
[-]
Typically you look for a development board with the chip embedded on it. The dev board will have a usbc port and multiple pins that can be routed to LEDs, miniscreens, audio devices, etc. To program it you can usually use Lua (a very simple embedded language, almost JS-like) or you can use C/Rust/Zig as well. Arduino IDE works for it, too. You code from desktop and upload ROMs via USBC.

You can plug the dev board into sandwich board for easier prototyping. To go to mass production, you'll need to hand off your prototype spec to a custom PCB maker that you can order from, prices vary a lot based on volume and some shops specialize in low volume for early products.

Your end product should basically be a circuit board, case, battery, and any external components like LEDs or screens, then you assemble with plugs or wiring/soldering.

It is sometimes possible to make a product from the dev boards, especially the small ones, but your product still has to get a custom FCC certification (not a deal breaker, just a hoop to jump through), whether using dev board or custom.

reply
zuzululu
1 hour ago
[-]
ty!!!!
reply
hart_russell
1 hour ago
[-]
Any reason why this device wouldn't have Z-Wave? Is the wireless protocol significantly different than Thread and Zigbee?
reply
wiml
1 hour ago
[-]
As I understand it, Z-Wave is substantially more closed/proprietary. Both Thread and Zigbee are protocols that run on top of 802.15.4, which Espressif already has in other products.
reply
jon-wood
1 hour ago
[-]
I think Z-Wave is a bit more open now but everything I’m seeing indicates Zigbee has pretty thoroughly killed it by not requiring arduous certification processes and being generally easier to work with. Z-Wave is technically superior with the ability to have devices directly communicate with each other for basic functionality but at least for me that wasn’t worth the massive markup and I’m slowly replacing anything z-wave with Zigbee equivalents.
reply
Aurornis
1 hour ago
[-]
This device only has a 2.4GHz radio. Z-Wave is sub-1GHz.
reply
mherkender
1 hour ago
[-]
I don't know for sure but Bluetooth, WiFi and Zigbee are on the same frequency band. Z-Wave is not.

(at least in the US, not sure about other countries)

reply
cyberax
9 minutes ago
[-]
Z-Wave is completely different from Zigbee. Different frequency bands, modulation, etc.

And there are still just two suppliers of Z-Wave radios, as far as I know. I haven't bothered to re-check recently. Up until ~2022 there was just _one_ supplier, you could open any Z-Wave device and find exactly the same chip. Sometimes on a cute little daughter board.

reply
orphea
1 hour ago
[-]
It being RISC-V is awesome, but how does it make sense that it's S series when S series have been Xtensa cores? Why is it not C series?
reply
topspin
1 hour ago
[-]
S has never implied Xtensa, and C doesn't imply RISC-V. That's a widely held misunderstanding. S, C, P, etc. are product categories, not ISAs. S devices are high performance SoCs; large feature set, high frequency, not the lowest power or cost.

Just appending 1 to S3 is odd though. This MCU is step change for Espressif. S4 or something would make more sense.

reply
orphea
51 minutes ago
[-]
Not saying you're wrong (appreciate the explanation) but S has been Xtensa and C is RISC-V; even if you don't imply, it's how the things have been. And given S2, S3, and C5 are all clocked at 240 MHz, the performance difference is kinda blur.
reply
topspin
28 minutes ago
[-]
Espressif is all-in on RISC-V, expanding their portfolio of RISC-V devices where they previously had only XTensa: ESP32-S31 is the first big departure from the coincidental alignment of ISAs within their product structure and definitively ends further debate about what those letter designations mean.

BTW, S3 has an RISC-V core in addition to the XTensa cores. That's the part thats running in deep sleep.

In practice, most Espressif users barely know or care what ISA is in play: they have ESP-IDF and the Espressif libraries papering over the difference for nearly all purposes.

reply
kjlldld
1 hour ago
[-]
Is anyone else worried that these chips are all made in China?
reply
chrisco255
1 hour ago
[-]
For what its worth, Espressif chips are open source, but yes, I wouldn't run national security or government devices on these.

Edit: I take it back on OS comment, they are not OS but some components of the SDK are:

https://zeus.ugent.be/blog/23-24/open-source-esp32-wifi-mac/

reply
Retr0id
1 hour ago
[-]
> Espressif chips are open source

No they're not? Anyway I assume GP was asking due to procurement concerns, not security.

reply
chrisco255
31 minutes ago
[-]
Corrected my comment, thank you. I mean, if productizing with them, global trade dynamics are certainly a supply chain risk factor, however, security concerns would be the primary reason such chips would be restricted from import.
reply
jeremywho
2 hours ago
[-]
When can we buy these?
reply
Scene_Cast2
2 hours ago
[-]
The dev boards are already up for sale. I'm personally looking forward to the modules being stocked on LCSC, no idea when though.
reply
topspin
2 hours ago
[-]
> The dev boards are already up for sale.

I didn't expect to see that for a while yet. Not the usual Espressif announce and wait a year+ pattern.

reply
nubinetwork
1 hour ago
[-]
This looks like a nucleo144, except its risc-v... but why would I use it over said nucleo144?
reply
KZerda
1 hour ago
[-]
Better connectivity. The Nucleo 144 only has 100mbit ethernet, as far as I can tell, but the new ESP chip has gigabit, along with wireless.
reply
bobmcnamara
1 hour ago
[-]
WiFi+BLE?
reply
mort96
1 hour ago
[-]
And even if you don't need WiFi + BLE for a particular project, you may need it for other projects, and it might have value for you to standardise on one ecosystem.
reply
system2
1 hour ago
[-]
I wish Espressif was an American company and publicly traded. I'd invest heavily. I have nothing but good things to say about their products.

Their product naming could be better; S3 is going to show S31 in the search results.

reply
nancyminusone
21 minutes ago
[-]
if it were American it probably would have been hostile-takeovered by Qualcomm or someone else and tightened down long ago.
reply
rie_t
2 hours ago
[-]
Love to see more RISC-V in the wild
reply
Imustaskforhelp
2 hours ago
[-]
The 1GB bandwidth is interesting. It also has Simd instructions too.

Could this theoretically be used as a router or wireguard vpn instance?

reply
KZerda
1 hour ago
[-]
Theoretically, yeah. Though at 320Mhz, with only 2.4ghz wireless, even with two cores, I doubt it's going to get anywhere near the throughput to fill the gigabit connection.
reply
jon-wood
1 hour ago
[-]
Yeah, I’m not entirely sure what use cases there are which include both an ESP32 and gigabit networking.
reply
KZerda
32 minutes ago
[-]
About the only one I can think of is connectivity in electronically noisy situations. It's a lot easier to find gigabit sfp modules for linking with fiber than it is to find 100 mbit modules.
reply