Rendered at 19:08:14 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
randomint64 1 days 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.
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.
polpo 1 days ago [-]
From the ESP32-S31 datasheet: "Single-precision floating-point unit (FPU) per core"
BenjiWiebe 1 days 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.
BenjiWiebe 1 days 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?
phkahler 1 days 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.
actionfromafar 20 hours ago [-]
That's wild. Would never have guessed.
topspin 1 days 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.
imtringued 9 hours ago [-]
But even if you update your PWM signal on every PWM cycle, you won't go much beyond 30kHz. At some point you're running into high switching losses on your MOSFETs.
tomcam 22 hours ago [-]
I didn’t know that. Thanks for letting me… meet the FOCers
I’ll see myself out of the Internet now.
PowerElectronix 22 hours ago [-]
The closed loop experiences a phase margin loss that is exponential with the frequency. At lower frecuencies it is negligible, but if you get close to the frequency of the delay the phase margin reduction becomes dramatic and the control goes from stable to unstable very fast.
If the sensor has a limited bandwidth, you add the conversion delay and then the computation delay on top of that you end up with a max workable loop bandwidth in the low tens of kHz and anything higher will have overshoots, oscillations, etc.
GeorgeTirebiter 5 hours ago [-]
This is exactly correct. Low 10s of kHz is quite functional for machines moving in human space / speed.
If one is trying to do some assembly line (max # of operations per second), the power requirements alone get hard to manage. And then you're managing back EMF, eddy currents, heck, air resistance!
My rule: have dedicated low-level hw provide smooth PID response, mostly on the P term; and have a higher-level control produce the setpoint. Faster response means less need to rely on I or D terms as much (just because delta-T is so relatively small).
topspin 22 hours ago [-]
You see this in low cost products like MKS SERVO42x, where they're doing FoC with a GD32 MCU. It works; the motor runs cool, smooth and quiet, but the system is limited to 3000 RPM, and struggles with rapid acceleration because the control loop is too slow.
mianos 17 hours ago [-]
I have tried one. It has no torque. For what looks like an awesome product, it does not have the power to drive a peristaltic pump. I used the same motor on a TMC stepper controller and it's completely silent and works. It's open loop, so comparing apples to oranges but I am not sure what the MKS servo driver on a motor could actually do, aside from spin unloaded.
nathanfries 1 days ago [-]
I similarly don't know much about motor control or hardware in general, but would this maybe open up multiplexing options?
greenavocado 1 days ago [-]
People will always find a reason to complain or pretend they are controlling rocket motor servos with their ESP32
arabscum 22 hours ago [-]
[flagged]
benj111 22 hours ago [-]
Have you never heard something that is surprising to you, and then asked for more information?
Well no. Probably not...
andynerd 10 hours ago [-]
Both HP cores have single-precision FPU. But only HP core 1 has SIMD, unlike S3 and P4.
NooneAtAll3 1 days ago [-]
where did you find cordic mention?
amelius 20 hours ago [-]
Yeah but the moment you need IP blocks like for wifi or ethernet or usb, it's back to square one.
nine_k 18 hours ago [-]
I suppose ESP32-based modules usually carry networking and USB hardware which is immediately usable, without esoteric IP licenses, don't they?
kelnos 12 hours ago [-]
The wifi bits are closed-source blobs. The rust embedded community has reverse-engineered some of it for some chips, but not sure how complete that work is.
jamesmunns 8 hours ago [-]
It's worth noting that the support for ESP32 in Rust is official [0], and there are multiple full time engineers at Espressif working on developing and maintaining it.
Thanks.I can't believe they chose non-arcane, memory-friendly letters. Kind of rare in naming hardware I feel (unless it's not ?)
NekkoDroid 1 days 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`
snvzz 21 hours ago [-]
rva23 is pretty friendly.
Needn't use the long thing.
sukuva 4 hours ago [-]
RISC-V went wild with the extension naming in the past few years with the recently ratified extensions. The original extensions are all clubbed to be labelled as G.
NekkoDroid 9 hours ago [-]
Yea, but remove any one of the extensions and you have a distinct arch with a name that is basically just as confusing.
The point I wanted to make is that nowadays a lot of the extensions do not have such a nice (semi) easy to remember name.
tux3 1 days 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.
JdeBP 1 days ago [-]
There are a few lettered extensions to the base RV32I instruction set. e.g.:
I need the equivalent of Claude Code, but for hardware projects, so I can actually do all the projects I envision with the EPS32s.
Something that combines: 3d printing; auto procurement of parts; custom software writing; maybe a robot arms or something, all in a nice box on my desk that I feed parts into like a mail slot. PROFIT.
all2 20 hours ago [-]
Tbh, we're pretty close to that. This would essentially be the following set of work cells:
- PCB etching/engraving
- Solder placement
- component placement
- solder oven
This gets you one layer populated PCBs out the other side. Commercial systems like this exist in various forms, and open source projects for all of these also exist. It would be up to you to integrate them together.
As it stands, the frontier models are actually pretty ok at firmware dev at a high level. If you need max performance, they won't be any good at all (learning from the dregs of the internet isn't exactly helpful here). You'll also need to bring at least a willingness to learn about what is involved so you can debug the machine's mistakes.
ecesena 16 hours ago [-]
For firmware dev, Claude is amazing. Just plug the dev board and tell him what you need. Great learning tool too!
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
ape4 20 hours ago [-]
Its good you can do that but the command doesn't exactly roll off the tongue.
tosh 1 days ago [-]
very interesting, do you have a pointer with more info on what kind of SIMD support it has?
andylinpersonal 6 hours ago [-]
The same as P4 rev 3.x, which is still undocumented. Assembler source and esp-nn/esp-dsp are your friend. Some people have also tried some stuff.
And HP core 0 is scalar-only now.
bobmcnamara 1 days ago [-]
Hopefully comparable or better than ESP32S3.
But with the weird alignment thing fixed
throwaway81523 1 days ago [-]
Why on earth SIMD instead of the risc-v vector extensions that are supposed to be better?
andynerd 10 hours ago [-]
For compatibility and simplicity. Most SIMD instructions in P4 and S31 (compatible with P4 rev 3.x) are an direct evolution from S3. Espressif just doesn't want to rewrite their optimized assembly libraries.
moffkalast 22 hours ago [-]
The sooner ARM and its closed ecosystem dies, the better. The era of shitty half working blobs has gone on for quite long enough.
Teknoman117 22 hours ago [-]
Almost everything we hate about ARM based systems is the result of everyone in the SoC ecosystem, not just ARM. It's just unfortunate for them from an optics perspective that they've been basically the only CPU core on the block so they get the brunt of the hate.
I place far, far more blame on companies like Qualcomm, Broadcom, Imagination Technologies (PowerVR), etc.
Go look at any of the non-microcontroller RISC-V based SoCs. It's not any better on any metric. Upstream software support is little to non-existent. Basically every RISC-V board needs a vendor kernel and they all have device tree and u-boot hell.
The SoC providers that make powerful chips are in the market of selling more chips - bad external support is a feature for them. Means that when they stop supporting the product you have to come buy a new chip. And if everyone does that, there's no better company to switch to because they all treat you the same.
About the only SoC vendor I have any respect for is Texas Instruments because they actually upstream a bunch of their code. Honestly I think this is because most of their parts are aimed industrial products and have support cycles >10 years.
I intentionally didn't say Rockchip because while they're in a bunch of hobby boards they don't really help with open source hardware work. They just take the position of "we won't stop you, but we're not going to help you".
alnwlsn 1 days 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.
peteforde 22 hours ago [-]
You're fundamentally misunderstanding how MCU families work, I'm afraid.
There's not 10+ versions with different features. The word version strongly implies that there's an incremental progression over time, and they keep screwing up by adding and taking away modules. What jerks!
What's actually happening is that you have 4-5 different product lines that all share the same SDK, design philosophy, pricing structure, supply chain and support channels. Each one of these dimensions is extremely important to engineering teams designing products around them. It's not about hobbyists who are learning the ropes, although IMO they do a pretty good job of supporting those folks, too.
Within those lines (at this point, primarily S, C, H and P) you actually do have versions; for example, ESP32-S2 is no longer recommended for new designs because you should use ESP32-S3.
Ultimately, the lens you need to use to understand this stuff is: can I place an ESP32-labeled chip on my PCB and program it using the same SDK?
The same is true for the RP2XXX series of MCUs; if someone is confused by the difference between a microcontroller and a SBC then they might just be in the wrong place.
Bigger picture, some advice: when confronted by something like this, you will get further faster if you don't lead with the assumption that you have things figured out and everyone else is doing it wrong. Instead, keep an open mind and ask lots of questions. We're living in a golden era of enabling autodidacts but that's only true for folks who go long on humble curiosity.
alnwlsn 17 hours ago [-]
Lots of assumptions off a comment that is mostly just me stating my preference for short and unique part numbers. Nothing would be wrong with ESP32xx ESP33xx, ESP34xx, etc.
Espressif only have 312 SKUs [0]. You're telling me nobody could come up with a naming scheme where more than 2/3 of them don't have part numbers longer than 18 characters?
Doesn't really matter either way, but short part numbers do fit nicely in a BOM table without using really wide columns. (even though I usually find capacitors to have even longer names).
Haha, that I did! I spent a good while narrowing down that very list to pick one of my first ones out last year. By coincidence, I ran into the very same part number in a completely different circumstance a few months later. What are the chances of that!? Did help me feel that I hadn't picked out a real oddball one though.
Part number was still just 15 characters, and that's enough to specify if you want the tape and reel version. Not that anyone's counting :).
I guess those long part numbers do get burned into your head after a while after all.
simgt 3 hours ago [-]
You really come across as condescending and patronizing.
nancyminusone 19 hours ago [-]
Thats an easy mistake to make when you reuse the series name of your first chip and decide it's gonna be the family name now.
peteforde 18 hours ago [-]
That's simply not what happened, at all.
You're seeing either incompetence or conspiracy when the opposite is true.
pantalaimon 1 days ago [-]
But it's the same scheme as STM32, EFM32, GD32, …
vitally3643 24 hours ago [-]
Yes and those schemes are just as bad as Espressif's
randyrand 1 days ago [-]
It signals ESP-IDF compatibility
JCTheDenthog 1 days ago [-]
They can signal that with numbers other than 32, the "ESP" part is what matters.
9rx 24 hours ago [-]
ESP-IDF is only compatible with the ESP32 range of devices, not all ESP-prefixed devices, so "ESP" alone is not sufficient information to satisfy the earlier comment.
kelnos 12 hours ago [-]
Sure, but there's nothing in the name "ESP-IDF" that inherently means it can only support ESP32 devices. It could also support a new theoretical ESP33 device.
(I don't have an issue with Espressif's ESP32-* naming scheme, but I don't think the ESP-IDF angle is a good argument for not changing it.)
9rx 6 hours ago [-]
Of course. There is no name that could inherently mean anything. Words are all made up and arbitrary.
yonatan8070 1 days 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
brokensegue 15 hours ago [-]
Amusingly you just conflated the pico (a dev board) with its chip (rp2040)
reaperducer 23 hours ago [-]
I kind of wish these all weren't called ESP32. ESP8266 and ESP8285 -> ESP32 made sense, but now we have 10+ different version
They've been hanging around with Sony.
Apple: AirPods
Sony: WMDF559J649Q-1
volemo 20 hours ago [-]
I can’t say Apple’s naming approach is perfect. Those AirPods you’ve mentioned are actually “ AirPods Pro 2 with MagSafe Charging Case (USB-C)” or something.
Etheryte 1 days 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.
asadm 23 hours ago [-]
it's a marketing thing now
andrewstuart 23 hours ago [-]
And toss away the brand name ?
frikk 1 days 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.
GitPushOrigin 2 hours ago [-]
What kinds of hardware are you using? I'm curious what LEDS/matrices you're buying? And also which controller from QuinLED you have? I've recently been having a lot of fun with some HUB75 displays and am interested in exploring other options and projects.
wolvoleo 1 days 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.
ssl-3 20 hours ago [-]
There's lots of ways to drive LEDs.
WS2812 with any ESP32 board is one way, and that's a perfectly fine way; individual addressable LEDs sure are neat as hell. Amazing stuff can be done with them. And as you already know, a Chinese ESP32 dev kit costing $2 is enough to do ~all the things with this on the controller side. :)
But there's other ways, too. At perhaps its simplest: Maybe RGB isn't your bag, and you just want groups (which could be strips or any other shape) of all one color that are smoothly-controllable with WLED.
This is electrically simpler: While individual WS2812 pixels each work as a little computer-brain repeater for a serial bus, a group of dumb LEDs can be as simple as just being a group of dumb LEDs. And that's easy; perhaps as easy as one PWM channel.
Or maybe it's more complex: Maybe the goal is something like a par can that shines RGBAW all in one direction. Now we need 5 PWM channels.
Anyway, the power electronics for doing PWM with dumb LEDs can be built or they can be bought, but they need to exist and to live somewhere.
QuinnLED sells devices with power electronics in packages ranging from bare boards, to complete units with metal housings that have power and real ethernet on one side of the box and LED outputs on the other side.
Since skillsets and willingness to go full-DIY vary, they present pretty nice range of options.
One box I just looked at, the QuinLED An-Penta-Plus: It's a box that has 5 channels of PWM, does up to 10A per channel, or up to 30A combined per box -- at up to 48VDC.
That's [up to] 30*48=1440 Watts of LED, which is getting in the realm of the silly. But environment/projects come in all sizes, people do silly things with LEDs sometimes, and that's all perfectly OK. WLED projects don't have to be small. :)
wolvoleo 8 hours ago [-]
I know how WS2812's work :) Like I said I use them.
My question was why use bare LEDs with a separate PWM controller like QuinnLED instead of WS2812. But yes size could be an issue. Long strings of WS2812 tend to get slow and if they all need to do the same thing at the same time it's ok.
ssl-3 40 minutes ago [-]
Yes, but I mean: WS2812 and its other addressable friends aren't the whole story in LED lighting, and neither is RGB.
Maybe my project involves developing automatically-adjustable color temperature indirect lighting for a semi-permanent exhibit space, where the color temperature is based on that of the light cascading in through the glass windows during the day and softening things to a low color temperature at night.
That space doesn't ever need to be colorful, but it does need to be bright. And while adjustable CT lighting does exist in the commercially-available form, perhaps there's nothing off-the-shelf that fits this space so I have to DIY parts of it.
And maybe doing good stuff with WLED is already a skill that I already have, so I want to use WLED.
Hardware-wise, I can get there with dense parallel strips of warm and cool white LEDs with a good color rendering index from vendors like BTF. I'll already have a lot of work ahead of me with the design and installation challenges (like managing heat, power distribution, and diffusion). I can reduce the work required by driving it with a pre-fab controller from QuinnLED.
And no aspect of this project needs colors other than two shades of white that are carefully mixed together, and none of it needs things to be pixel-addressable. It's not that WS2812 is slow (nothing here needs to be fast); it's that the advantages of WS2812 aren't wanted or useful.
Including extra features detracts from the main goal, and isn't KISS. :)
So instead, dumb LEDs can make sense. They don't have to be smart.
Those are easy-enough to buy, but they're ~$4,000 each and that's way out of my budget.
Besides, they talk DMX instead of WLED, and DMX is a very different universe. WS2812 is straight out, just because WS2812 in any form lacks the density required for the intensity desired.
So I'll have to come up with something -- maybe I can refit a Chinese "UFO light" that runs on 36 or 48VDC or something internally, if I can find one, so as to reduce it to being just a collection of dumb LEDs.
And then, again, I'll need a controller for whatever I come up with.
I may just buy a controller for those dumb LEDs from QuinnLED for $40 -- I certainly can't build a box like that for this kind of price.
[1]: I was in front of a row of these at a Nine Inch Nails concert several months ago. Their use was very conservative until the very end -- at which point I felt like the intensity of the strobe effects was melting a part of my brain. The flashes were the brightest white imaginable, but the after-images were a bizarre and murky background haze of red and blue that lacked a definite source. 10/10, don't try this at home.
gedy 1 days ago [-]
WLED is a system that runs on the ESP32 for some cool capabilities to drive the ws2812s, OP linked above.
wolvoleo 24 hours ago [-]
Yes but these don't need controller hardware. The OP is using a dedicated controller and I was asking why.
poyu 22 hours ago [-]
Probably the scale and usability of things. It's different if you're controlling 100 LEDs vs 5,000.
wolvoleo 22 hours ago [-]
Yeah exactly that's what I was wondering about.
I use a few hundred at most and in those cases I just feed power at several points in the chain to reduce resistive losses in the wiring. But yeah I'm kinda interested what kind of huge installations would need that and how they work.
leptons 23 hours ago [-]
WS2812 absolutely need a controller, without one they would simply not light up.
wolvoleo 22 hours ago [-]
I mean a power controller. This is part of every WS2812 itself but with regular LEDs (be it RGB or not) you need power drivers for it, which I call the 'controller' too. You need to drive them at a certain amperage, then PWM them to get the right brightness. But with WS2812 you don't need to mess with power driver circuitry the OP mentioned. You just chain them to a microcontroller pin.
It was probably my use of the word 'controller' that is a bit confusing.
gedy 22 hours ago [-]
Maybe not following, but I buy strips of WS2812 and if I wanted to for them to turn on and, say, display a rainbow, I need something to drive that. Not USB from another device, e.g. standalone.
wolvoleo 22 hours ago [-]
Yes but as far as I understand the OP is not doing that, they are just using raw LEDs with power drivers and the whole shebang that is so nicely built into the ws2812s for us. Otherwise they wouldn't need these components they're talking about.
I just connect them to a microcontroller pin and be done with it. I power them separately off a power bank (my LEDs are almost always worn, if they are static I just use an off-the-shelf 5V supply).
stragies 24 hours ago [-]
cr.yp.to/ is also a pretty cool URL, and has been around for a looong time
redfast00 20 hours ago [-]
From the datasheet, I see that there is a Bitscrambler peripheral that seems to be very similar in flexibility to the Raspberry Pi Pico's PIO:
> Since bitwise operations can be relatively CPU-intensive and DMA is designed specifically to offload such work from the CPU, ESP32-S31 integrates two dedicated peripherals called BitScramblers. These modules are designed to transform data formats during transfers between memory and peripherals. One BitScrambler handles memory-to-peripheral (or memory-to-memory) transfers, while the other is dedicated to peripheral-to-memory transfers. While BitScramblers can handle the bitwise operations mentioned earlier, they are in fact flexible, programmable state machines capable of performing more advanced transformations as well.
Here's hoping that it's as useful as the Pi Pico's PIO
utopcell 19 hours ago [-]
neat!
oritron 1 days 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 the prices remain relatively similar this is going to be incredible value! I might have to procrastinate on my current side projects to go back to another side project I'm procrastinating on because of optimization issues on an older ESP32.
polpo 21 hours ago [-]
They've already released the ESP32-S31-WROOM-3 and two development boards based on it: the ESP32-S31-Function-CoreBoard-1 and ESP32-S31-Korvo-1. All are available on Espressif's official Aliexpress store.
rbanffy 4 hours ago [-]
These little devices are extremely interesting. I have a side project I will one day get started - to place 32 SoCs (or fewer SoCs with more cores), connect them via PCB traces to an ethernet hub (I need to learn how to do that), and leave one or more "upstream" network ports for connecting multiple boards together. Each core would light up a red LED on the front-side of the board via 90-degree LED holders.
Then I'd pack 16 of them, and build a tiny Connection Machine cube.
Not sure what I'd use a cluster of 512 very puny servers for though... I guess it'd be for learning how to manage clusters with unreasonable numbers of nodes.
Lerc 4 hours ago [-]
I have always wanted to make a n-cube machine. I prefer the rp2350 myself, and have been quite keen on the thought of what you can do with PIO <-> PIO between chips.
And yes the main goal is to figure out how to program the thing in a way that balances ease of use with performance.
I also like the idea of a PSRAM junction, so that every core gets a PSRAM, but neighbours can swap ownership.
I had wondered what happens to the wireless spectrum if you tried it with ESP32. 512 devices in a small space yelling at each other.
goodpoint 4 hours ago [-]
little?
rbanffy 4 hours ago [-]
Once I figure out how to join that many cores via ethernet on PCB, it's a little project. SMD soldering should not be that troublesome.
throwup238 3 hours ago [-]
What are you having trouble figuring out?
ESP32 RGMII (32x) -> PHY (32x RTL8211F) -> Slave switch (6x RTL8367) -> master switch (1x) -> magnetics (for the external port). You’ll probably want a better IC for the master switch so I can’t name one of the top of my head but this would be a relatively simple, if large, PCB.
The hard part I think is verifying that all the PHYs and switches will work correctly without magnetics on a board to board connection.
Damn, I’ve only checked the last month for duplicates.
Aurornis 1 days 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.
apitman 24 hours ago [-]
Dang would love to have both in the same chip.
tetris11 1 days ago [-]
How does wired internet technically work on these chips? Is it just 8 dedicated GPIO pins?
LeifCarrotson 1 days 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.
Oh it's an ADC of some type. GPIO takes 0 or 3.3/5V at low frequencies, ethernet signals are a continuous range of 0 to 2V at high frequencies. Fundamentally incompatible without the PHY+magnetics
BenjiWiebe 1 days 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.
alnwlsn 1 days 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.
lucamark 23 hours ago [-]
Great to hear the adoption of RISC-V across the ESP32 line. The old Xtensa-based parts were fine, but RISC-V should make tooling, compiler support, and long-term ecosystem work cleaner
skybrian 1 days 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?
oritron 1 days 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.
timothyb89 1 days 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
oritron 22 hours ago [-]
I haven't benchmarked Bluetooth on these devices but have you looked at your uncompressed audio rates over WiFi? OP was asking about Bluetooth at high quality and low latency, which I don't think is a possible combo, hence suggesting another ESP32 if wireless is necessary. If it isn't, a wire difficult to beat.
ESP-NOW is another option to look at, which of course won't work to transmit to a phone directly but can do a point-to-point or multicast transmission between ESP32 devices. I've used it in some projects but not for audio, I couldn't tell you how much of a buffer would be needed to make that work smoothly.
Another option for OP, if the audio is being synthesized then the parameters could be transmitted rather than the audio samples themselves and do synthesizing on the receiving device.
timothyb89 4 hours ago [-]
Fair point, I’ve been evaluating WiFi for my project as well and the ESP32-S3 certainly has better link rates and latency, though I’ve not determined if it can truly run uncompressed. UX-wise my project is pairing to a smartphone so I’m not eager to require that users bring a WiFi network with them (something neither Android or iOS handle particularly gracefully), but regardless it would be good to have the option.
bschwindHN 14 hours ago [-]
I have a (WIP) project that transfers audio over ESP-NOW. I haven't touched it in forever, but I remember it did work decently. I had to bring the audio sample rate down to 16kHz though, and it was just sending uncompressed audio. I probably could have dug more into configuring the radios for better throughput, or adding some basic compression to relax the bandwidth requirements.
I was not aware that _any_ Espressif hardware even supported classic bluetooth other than the very first ESP32 (which I am not sure if they're even available). And I was getting around 50ms latency back then (with the original ESP32 and SBC!)
What exactly did you try?
timothyb89 4 hours ago [-]
I’m using BLE GATT messaging with an upgrade path to L2CAP CoC channels for clients that support it. Roughly the path is: audio input -> opus encode -> BLE transmit -> smartphone/desktop. The latency floor ends up being ~80ms due to jitter buffer sizing, etc.
AshamedCaptain 2 hours ago [-]
While this explains the bw limit, I'm still surprised re latency, it sounds really bad even for L2CAP.
bobmcnamara 23 hours ago [-]
You don't just use four simultaneously connected audio profiles and interleave them?
AshamedCaptain 10 hours ago [-]
Espressif products are not ideal for Bluetooth audio since support for classic Bluetooth (which is what is still mostly used for Bluetooth audio) is hit or miss , and on newer models often entirely missing.
tliltocatl 1 days 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.
numpad0 21 hours ago [-]
There aren't many choices of cheap hackable A2DP receivers if you were somehow looking for one. Not all headphone chips are programmed to run at slightly under 3.3V on VBAT pins so to protect the supposed battery, with no means to reprogram for lower voltages, officially or not.
skybrian 1 days 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.
mrandish 1 days 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.
bobmcnamara 23 hours ago [-]
I'll mention that you usually need to put the BT connection in a low latency audio profile or else you're likely to get something more suitable for mp3-style high buffer playback.
mrandish 21 hours ago [-]
Thanks for the tip. I'm about to revisit this again soon (new laptop + some free time for fun). Have you been able to get BT latency low enough on Windows to hit a MIDI key and hear the note without noticeable lag?
It's been a few years since the last time I actually tried it myself, instead of just checking user reports. I do remember I followed the DAW company's FAQ, set a mode in the DAW, and switched something in Windows settings related to BT. The wired latency (MIDI in and audio out) was excellent but switching either to BT tanked it.
It's frustrating that it appears to not have improved at all in a decade. I get the whole "good, fast, cheap" triangle and that most of the BT ecosystem only cares about "cheap" while being just good enough 128Kbps MP3s don't sound too much worse on $50 cuff link-sized earbuds. But I can't help naively thinking that on decadal timescales, the rising tide should lift even the "cheapest" corner of the triangle enough to yield slightly better minimum baseline quality - especially when it's been stuck forever at barely usable. Even more surprising is that BT gaming controllers still have such high latency, most BT controllers also come with a proprietary wireless dongle. Talk about pointless COGS and landfill.
I guess maybe the reason is those who really care can go wired, use non-BT wireless dongles or lock themselves to a proprietary vendor who controls both ends of the stack. But it kind of nerfs the point of having a short range wireless "standard" if doesn't cut COGS, landfill waste and never improves more 'serious' use cases even a little.
hackingonempty 1 days ago [-]
[dead]
dsign 10 hours ago [-]
I very much respect Espressif products, specially because how good their documentation is. I wish though somebody would package an ESP board with 256 Mb of RAM or more... From what I've seen, that amount of RAM seems to be exclusive Linux SBC territory, but Linux doesn't make sense for a lot of projects.
andynerd 10 hours ago [-]
Sadly this S31 can address up to 64 MiB of PSRAM at most. And only 32 MiB SKU has been released.
orphea 1 days 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?
topspin 1 days 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.
orphea 1 days 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.
topspin 1 days 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 that's 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.
topspin 22 hours ago [-]
This is how Jeroen Domburg, Espressif Technical Marketing Manager, addressed this matter in a post on hackaday.io:
"We actually never intended the CPU architecture to be part of the name, as for 99.9% of all users, it doesn’t matter: you write your code in C or some other language, and the compiler plasters over any difference in ISA. Available peripherals, supported radio protocols and CPU power and memory are more important."
thot_experiment 22 hours ago [-]
This is so sick except it only has 2 pulse counters instead of the 4 on the S3 which means I can't use it as a drop in replacement on my current project. Not really complaining, I cut my teeth as an embedded dev on the ESP8266 and for years now all of my personal projects (and a fair few professional ones) have been based on the ESP32 line of chips. They're all pretty incredible for the cost, absolutely my favorite embedded target.
v1ne 10 hours ago [-]
It's sad to see Xtensa go. Their architecture was a clean design, a treat to read the assembly code. I get it, RISC-V comes without licensing costs, but that's one of the few positive things about it. For a fresh start, it is just already in this "we pile stuff on stuff on stuff" state that you expect of an architecture after 10-20 years of productive use.
MrBuddyCasino 10 hours ago [-]
The inevitable result of Risc-v trying to be everything to everyone, so everything is half-baked.
mort96 1 days 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.
swiftcoder 1 days ago [-]
Can it cope with TLS? The esp32 having a viable TLS stack has been a big win
flowerthoughts 23 hours ago [-]
Has TLS been an issue since ESP32? I know ESP8266 had to increase CPU speed to be able to do RSA without timing out the watchdog. Wonderful hack. Didn't think ESP32 had the same issue.
It looks like they've been adding more hardware crypto offloads too!
topspin 1 days 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.
thehk 1 days 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?
mattalex 22 hours ago [-]
Regarding specifically depth anything: You're not running this on a microcontroller.
In general, CNNs still reign supreme on microcontrollers since you have a way lower peak memory demand which is what usually kills you. Here in this case you have a couple of _kilobytes_ of SRAM, potentially extendable to a couple of megabytes of PSRAM.
Even for small CNNs you often need to do some quite complex interleaving of layers (i.e. running parts of layer 1 and layer 2 in parallel interleaved to take advantage of the downsampling of CNNs) to keep performance and memory impact reasonable (see e.g. https://openreview.net/pdf?id=2O8qbyxH6X).
Think more "image classifier" less "run an image to image transformer". For depth anything, a single layer's activation is probably significantly larger than the available SRAM (I think it is (224/16)^2 patches each with activations [48, 96, 192, 384] for depth anything small: You aren't running this.)
otterdude 1 days 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.
Memory is the main constraint. You have what, 8mb of psram.
Compute wise you can manage. You can do quantisation and run a small 10-15 layer CNN perhaps. Image classification is possible. Keep in mind the channel count and input resolution cannot be high since memory will be a problem. You can maybe do face _detection_, "is my cat on my keyboard" classification as well maybe.
Audio, you can do a lot more. Wake word detection happens on _much_ smaller accelerators inside iphones. In this one you can do slightly heavier classifications. Maybe speaker identification "which member of family" or maybe "which dog is barking"
asadm 23 hours ago [-]
nope. not happening. at most YOLO or mayyybe FastDepth
cbdevidal 20 hours ago [-]
I personally am itching for more hardware H.264 or even H.265. There's the ESP32-P4 but it requires a second ESP32 to handle the WiFi. I got it working, but it feels like a hack, and the BOM cost is more than 2x a single chip.
Course more PSRAM and hardware encoding would drive up the price...
hart_russell 1 days ago [-]
Any reason why this device wouldn't have Z-Wave? Is the wireless protocol significantly different than Thread and Zigbee?
wiml 1 days 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.
jon-wood 1 days 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.
adamfeldman 22 hours ago [-]
Zigbee supports binding, allowing devices to directly control each other without the intervention of a controller. For example, I've Inovelli light switches that communicate directly with Zigbee smart bulbs.
jon-wood 8 hours ago [-]
Oh neat, I'd not seen that exposed in the UI of anything I'm using with Zigbee so had assumed it wasn't a thing.
mherkender 1 days 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)
Aurornis 1 days ago [-]
This device only has a 2.4GHz radio. Z-Wave is sub-1GHz.
wildekek 21 hours ago [-]
Z-Wave works on a different frequency and would separate radio hardware. And then comes the licensing cost.
cyberax 1 days 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.
jareklupinski 14 hours ago [-]
> Bluetooth 5.4 LE Audio enables high-quality, low-power streaming with LC3 codec and multi-stream audio
finally i can make party mode home speaker arrays
MrBuddyCasino 10 hours ago [-]
Is that really what multi-stream is?
zuzululu 1 days 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?
chrisco255 1 days 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.
zuzululu 1 days ago [-]
ty!!!!
rie_t 1 days ago [-]
Love to see more RISC-V in the wild
george_max 18 hours ago [-]
It's good news Espressif is using RISC-V over something like Xtensa; it's much more open and flexible. Excited to play around with this
jeremywho 1 days ago [-]
When can we buy these?
zimpenfish 23 hours ago [-]
Apparently available on AliExpress as a dev board[0]
[0] "ESP32-S31-Korvo-1 Development Board Espressif System AI Intelligent Multimedia Development Board Engineering Sample" for £54.79 from the (allegedly official) Espressif store at https://www.aliexpress.com/item/1005012333744553.html
Scene_Cast2 1 days 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.
topspin 1 days 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.
1 days ago [-]
einpoklum 23 hours ago [-]
I'm the maintainer of a standalone printf library, targeting mostly embedded devices and other no-standard-library use cases:
I would like to make sure the library can be used on this SoC, and other RISC-V systems; which it probably can, but if there are any issues cross-compiling for it, or using the toolchain Espressif provides, please consider filing a bug report on GitHub at the link above. Same of course goes for any FOSS librar/tool that you're trying out.
Let's help foster a rich(er) ecosystem of software available on these babies!
kjlldld 1 days ago [-]
Is anyone else worried that these chips are all made in China?
abdullahkhalids 24 hours ago [-]
I am concerned by all chips and software made by giant corporations. None of them are trustable, and any one of them will sell me out for a buck.
We must constantly fight to have open source and audited chips and software made in commodity fashion.
No they're not? Anyway I assume GP was asking due to procurement concerns, not security.
chrisco255 1 days 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.
poulpy123 13 hours ago [-]
No, not really
1 days ago [-]
Imustaskforhelp 1 days ago [-]
The 1GB bandwidth is interesting. It also has Simd instructions too.
Could this theoretically be used as a router or wireguard vpn instance?
KZerda 1 days 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.
jon-wood 1 days ago [-]
Yeah, I’m not entirely sure what use cases there are which include both an ESP32 and gigabit networking.
KZerda 1 days 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.
nubinetwork 1 days ago [-]
This looks like a nucleo144, except its risc-v... but why would I use it over said nucleo144?
thot_experiment 21 hours ago [-]
Because it's like 5x cheaper and beats it out spec wise in almost every way?
KZerda 1 days 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.
bobmcnamara 1 days ago [-]
WiFi+BLE?
mort96 1 days 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.
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.
nancyminusone 1 days ago [-]
if it were American it probably would have been hostile-takeovered by Qualcomm or someone else and tightened down long ago.
nottorp 12 hours ago [-]
To elaborate, all their documentation would be behind a login that has to be manually approved and they wouldn't talk to you unless you ordered 1 million pieces.
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.
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.
I don't know much about motor control, is it normal to need that fast of feedback?
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.
Fast feedback loops are also necessary in SMPS, another area where precision, low latency MCU peripherals and software are actively displacing traditional approaches.
I’ll see myself out of the Internet now.
If the sensor has a limited bandwidth, you add the conversion delay and then the computation delay on top of that you end up with a max workable loop bandwidth in the low tens of kHz and anything higher will have overshoots, oscillations, etc.
If one is trying to do some assembly line (max # of operations per second), the power requirements alone get hard to manage. And then you're managing back EMF, eddy currents, heck, air resistance!
My rule: have dedicated low-level hw provide smooth PID response, mostly on the P term; and have a higher-level control produce the setpoint. Faster response means less need to rely on I or D terms as much (just because delta-T is so relatively small).
Well no. Probably not...
[0]: https://github.com/esp-rs/esp-hal/
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
Needn't use the long thing.
The point I wanted to make is that nowadays a lot of the extensions do not have such a nice (semi) easy to remember name.
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.
* https://docs.riscv.org/reference/isa/unpriv/m-st-ext.html
Something that combines: 3d printing; auto procurement of parts; custom software writing; maybe a robot arms or something, all in a nice box on my desk that I feed parts into like a mail slot. PROFIT.
- PCB etching/engraving
- Solder placement
- component placement
- solder oven
This gets you one layer populated PCBs out the other side. Commercial systems like this exist in various forms, and open source projects for all of these also exist. It would be up to you to integrate them together.
As it stands, the frontier models are actually pretty ok at firmware dev at a high level. If you need max performance, they won't be any good at all (learning from the dregs of the internet isn't exactly helpful here). You'll also need to bring at least a willingness to learn about what is involved so you can debug the machine's mistakes.
But with the weird alignment thing fixed
I place far, far more blame on companies like Qualcomm, Broadcom, Imagination Technologies (PowerVR), etc.
Go look at any of the non-microcontroller RISC-V based SoCs. It's not any better on any metric. Upstream software support is little to non-existent. Basically every RISC-V board needs a vendor kernel and they all have device tree and u-boot hell.
The SoC providers that make powerful chips are in the market of selling more chips - bad external support is a feature for them. Means that when they stop supporting the product you have to come buy a new chip. And if everyone does that, there's no better company to switch to because they all treat you the same.
About the only SoC vendor I have any respect for is Texas Instruments because they actually upstream a bunch of their code. Honestly I think this is because most of their parts are aimed industrial products and have support cycles >10 years.
I intentionally didn't say Rockchip because while they're in a bunch of hobby boards they don't really help with open source hardware work. They just take the position of "we won't stop you, but we're not going to help you".
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.
There's not 10+ versions with different features. The word version strongly implies that there's an incremental progression over time, and they keep screwing up by adding and taking away modules. What jerks!
What's actually happening is that you have 4-5 different product lines that all share the same SDK, design philosophy, pricing structure, supply chain and support channels. Each one of these dimensions is extremely important to engineering teams designing products around them. It's not about hobbyists who are learning the ropes, although IMO they do a pretty good job of supporting those folks, too.
Within those lines (at this point, primarily S, C, H and P) you actually do have versions; for example, ESP32-S2 is no longer recommended for new designs because you should use ESP32-S3.
Ultimately, the lens you need to use to understand this stuff is: can I place an ESP32-labeled chip on my PCB and program it using the same SDK?
The same is true for the RP2XXX series of MCUs; if someone is confused by the difference between a microcontroller and a SBC then they might just be in the wrong place.
Bigger picture, some advice: when confronted by something like this, you will get further faster if you don't lead with the assumption that you have things figured out and everyone else is doing it wrong. Instead, keep an open mind and ask lots of questions. We're living in a golden era of enabling autodidacts but that's only true for folks who go long on humble curiosity.
Espressif only have 312 SKUs [0]. You're telling me nobody could come up with a naming scheme where more than 2/3 of them don't have part numbers longer than 18 characters?
Doesn't really matter either way, but short part numbers do fit nicely in a BOM table without using really wide columns. (even though I usually find capacitors to have even longer names).
0 - https://products.espressif.com/#/product-selector
https://www.digikey.ca/short/2v4t0n5m
Part number was still just 15 characters, and that's enough to specify if you want the tape and reel version. Not that anyone's counting :).
I guess those long part numbers do get burned into your head after a while after all.
You're seeing either incompetence or conspiracy when the opposite is true.
(I don't have an issue with Espressif's ESP32-* naming scheme, but I don't think the ESP-IDF angle is a good argument for not changing it.)
They've been hanging around with Sony.
Apple: AirPods
Sony: WMDF559J649Q-1
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.
WS2812 with any ESP32 board is one way, and that's a perfectly fine way; individual addressable LEDs sure are neat as hell. Amazing stuff can be done with them. And as you already know, a Chinese ESP32 dev kit costing $2 is enough to do ~all the things with this on the controller side. :)
But there's other ways, too. At perhaps its simplest: Maybe RGB isn't your bag, and you just want groups (which could be strips or any other shape) of all one color that are smoothly-controllable with WLED.
This is electrically simpler: While individual WS2812 pixels each work as a little computer-brain repeater for a serial bus, a group of dumb LEDs can be as simple as just being a group of dumb LEDs. And that's easy; perhaps as easy as one PWM channel.
Or maybe it's more complex: Maybe the goal is something like a par can that shines RGBAW all in one direction. Now we need 5 PWM channels.
Anyway, the power electronics for doing PWM with dumb LEDs can be built or they can be bought, but they need to exist and to live somewhere.
QuinnLED sells devices with power electronics in packages ranging from bare boards, to complete units with metal housings that have power and real ethernet on one side of the box and LED outputs on the other side.
Since skillsets and willingness to go full-DIY vary, they present pretty nice range of options.
One box I just looked at, the QuinLED An-Penta-Plus: It's a box that has 5 channels of PWM, does up to 10A per channel, or up to 30A combined per box -- at up to 48VDC.
That's [up to] 30*48=1440 Watts of LED, which is getting in the realm of the silly. But environment/projects come in all sizes, people do silly things with LEDs sometimes, and that's all perfectly OK. WLED projects don't have to be small. :)
My question was why use bare LEDs with a separate PWM controller like QuinnLED instead of WS2812. But yes size could be an issue. Long strings of WS2812 tend to get slow and if they all need to do the same thing at the same time it's ok.
Maybe my project involves developing automatically-adjustable color temperature indirect lighting for a semi-permanent exhibit space, where the color temperature is based on that of the light cascading in through the glass windows during the day and softening things to a low color temperature at night.
That space doesn't ever need to be colorful, but it does need to be bright. And while adjustable CT lighting does exist in the commercially-available form, perhaps there's nothing off-the-shelf that fits this space so I have to DIY parts of it.
And maybe doing good stuff with WLED is already a skill that I already have, so I want to use WLED.
Hardware-wise, I can get there with dense parallel strips of warm and cool white LEDs with a good color rendering index from vendors like BTF. I'll already have a lot of work ahead of me with the design and installation challenges (like managing heat, power distribution, and diffusion). I can reduce the work required by driving it with a pre-fab controller from QuinnLED.
And no aspect of this project needs colors other than two shades of white that are carefully mixed together, and none of it needs things to be pixel-addressable. It's not that WS2812 is slow (nothing here needs to be fast); it's that the advantages of WS2812 aren't wanted or useful.
Including extra features detracts from the main goal, and isn't KISS. :)
So instead, dumb LEDs can make sense. They don't have to be smart.
---
Or: Maybe my project wants density, instead. Maybe it involves a carnival attraction, and wants aspects of something like an Atomic 3000 LED from Martin[1]: https://www.martin.com/en-US/products/atomic-3000-led
Those are easy-enough to buy, but they're ~$4,000 each and that's way out of my budget.
Besides, they talk DMX instead of WLED, and DMX is a very different universe. WS2812 is straight out, just because WS2812 in any form lacks the density required for the intensity desired.
So I'll have to come up with something -- maybe I can refit a Chinese "UFO light" that runs on 36 or 48VDC or something internally, if I can find one, so as to reduce it to being just a collection of dumb LEDs.
And then, again, I'll need a controller for whatever I come up with.
I may just buy a controller for those dumb LEDs from QuinnLED for $40 -- I certainly can't build a box like that for this kind of price.
[1]: I was in front of a row of these at a Nine Inch Nails concert several months ago. Their use was very conservative until the very end -- at which point I felt like the intensity of the strobe effects was melting a part of my brain. The flashes were the brightest white imaginable, but the after-images were a bizarre and murky background haze of red and blue that lacked a definite source. 10/10, don't try this at home.
I use a few hundred at most and in those cases I just feed power at several points in the chain to reduce resistive losses in the wiring. But yeah I'm kinda interested what kind of huge installations would need that and how they work.
It was probably my use of the word 'controller' that is a bit confusing.
I just connect them to a microcontroller pin and be done with it. I power them separately off a power bank (my LEDs are almost always worn, if they are static I just use an off-the-shelf 5V supply).
> Since bitwise operations can be relatively CPU-intensive and DMA is designed specifically to offload such work from the CPU, ESP32-S31 integrates two dedicated peripherals called BitScramblers. These modules are designed to transform data formats during transfers between memory and peripherals. One BitScrambler handles memory-to-peripheral (or memory-to-memory) transfers, while the other is dedicated to peripheral-to-memory transfers. While BitScramblers can handle the bitwise operations mentioned earlier, they are in fact flexible, programmable state machines capable of performing more advanced transformations as well.
Here's hoping that it's as useful as the Pi Pico's PIO
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...
Then I'd pack 16 of them, and build a tiny Connection Machine cube.
Not sure what I'd use a cluster of 512 very puny servers for though... I guess it'd be for learning how to manage clusters with unreasonable numbers of nodes.
And yes the main goal is to figure out how to program the thing in a way that balances ease of use with performance.
I also like the idea of a PSRAM junction, so that every core gets a PSRAM, but neighbours can swap ownership.
I had wondered what happens to the wireless spectrum if you tried it with ESP32. 512 devices in a small space yelling at each other.
ESP32 RGMII (32x) -> PHY (32x RTL8211F) -> Slave switch (6x RTL8367) -> master switch (1x) -> magnetics (for the external port). You’ll probably want a better IC for the master switch so I can’t name one of the top of my head but this would be a relatively simple, if large, PCB.
The hard part I think is verifying that all the PHYs and switches will work correctly without magnetics on a board to board connection.
Although we lost the MIPI support that the P4 dual-core RISC-V line has.
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...
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.
What's the state of Bluetooth audio out on microcontrollers? Is low latency and high quality output possible?
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.
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
ESP-NOW is another option to look at, which of course won't work to transmit to a phone directly but can do a point-to-point or multicast transmission between ESP32 devices. I've used it in some projects but not for audio, I couldn't tell you how much of a buffer would be needed to make that work smoothly.
Another option for OP, if the audio is being synthesized then the parameters could be transmitted rather than the audio samples themselves and do synthesizing on the receiving device.
Code is here:
https://github.com/bschwind/walkie-talkie
What exactly did you try?
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.
It's been a few years since the last time I actually tried it myself, instead of just checking user reports. I do remember I followed the DAW company's FAQ, set a mode in the DAW, and switched something in Windows settings related to BT. The wired latency (MIDI in and audio out) was excellent but switching either to BT tanked it.
It's frustrating that it appears to not have improved at all in a decade. I get the whole "good, fast, cheap" triangle and that most of the BT ecosystem only cares about "cheap" while being just good enough 128Kbps MP3s don't sound too much worse on $50 cuff link-sized earbuds. But I can't help naively thinking that on decadal timescales, the rising tide should lift even the "cheapest" corner of the triangle enough to yield slightly better minimum baseline quality - especially when it's been stuck forever at barely usable. Even more surprising is that BT gaming controllers still have such high latency, most BT controllers also come with a proprietary wireless dongle. Talk about pointless COGS and landfill.
I guess maybe the reason is those who really care can go wired, use non-BT wireless dongles or lock themselves to a proprietary vendor who controls both ends of the stack. But it kind of nerfs the point of having a short range wireless "standard" if doesn't cut COGS, landfill waste and never improves more 'serious' use cases even a little.
Just appending 1 to S3 is odd though. This MCU is step change for Espressif. S4 or something would make more sense.
BTW, S3 has an RISC-V core in addition to the XTensa cores. That's the part that's 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.
"We actually never intended the CPU architecture to be part of the name, as for 99.9% of all users, it doesn’t matter: you write your code in C or some other language, and the compiler plasters over any difference in ISA. Available peripherals, supported radio protocols and CPU power and memory are more important."
Anyway, the S31 has SHA, AES, ECC, RSA, and ECDSA accelerators, so that should be fine. https://documentation.espressif.com/esp32-s31_datasheet_en.p...
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.
Any way to know what kind of performance one could expect running e.g. a depth anything model on there?
Even for small CNNs you often need to do some quite complex interleaving of layers (i.e. running parts of layer 1 and layer 2 in parallel interleaved to take advantage of the downsampling of CNNs) to keep performance and memory impact reasonable (see e.g. https://openreview.net/pdf?id=2O8qbyxH6X).
Think more "image classifier" less "run an image to image transformer". For depth anything, a single layer's activation is probably significantly larger than the available SRAM (I think it is (224/16)^2 patches each with activations [48, 96, 192, 384] for depth anything small: You aren't running this.)
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.
Compute wise you can manage. You can do quantisation and run a small 10-15 layer CNN perhaps. Image classification is possible. Keep in mind the channel count and input resolution cannot be high since memory will be a problem. You can maybe do face _detection_, "is my cat on my keyboard" classification as well maybe.
Audio, you can do a lot more. Wake word detection happens on _much_ smaller accelerators inside iphones. In this one you can do slightly heavier classifications. Maybe speaker identification "which member of family" or maybe "which dog is barking"
Course more PSRAM and hardware encoding would drive up the price...
(at least in the US, not sure about other countries)
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.
finally i can make party mode home speaker arrays
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?
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.
[0] "ESP32-S31-Korvo-1 Development Board Espressif System AI Intelligent Multimedia Development Board Engineering Sample" for £54.79 from the (allegedly official) Espressif store at https://www.aliexpress.com/item/1005012333744553.html
I didn't expect to see that for a while yet. Not the usual Espressif announce and wait a year+ pattern.
https://github.com/eyalroz/printf/
I would like to make sure the library can be used on this SoC, and other RISC-V systems; which it probably can, but if there are any issues cross-compiling for it, or using the toolchain Espressif provides, please consider filing a bug report on GitHub at the link above. Same of course goes for any FOSS librar/tool that you're trying out.
Let's help foster a rich(er) ecosystem of software available on these babies!
We must constantly fight to have open source and audited chips and software made in commodity fashion.
https://www.crowdsupply.com/baochip/dabao/updates/our-campai...
Probably the most open chip on the market, and sits between a pi and a pico
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/
No they're not? Anyway I assume GP was asking due to procurement concerns, not security.
Could this theoretically be used as a router or wireguard vpn instance?
0. https://news.ycombinator.com/item?id=48378136
https://news.ycombinator.com/item?id=48386133
Their product naming could be better; S3 is going to show S31 in the search results.