Live data from Hacker News

ESP32-P4: High-performance MCU with IO-connectivity and security features

espressif.com

41–50 of 95 posts

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#41
post #29

Earlier quoted context omitted.

It’s strange that in their examples they don’t show any I/O (apart from print). I would expect support from such a language to support me with I/O while I concentrate on my program. For example by providing an event loop. Of course, if I need a more performant approach I would switch to a low level language.

I concur that's strange; the homepage code examples are standard imperative things. Clean IO, peripheral APIs, scheduling/code structure, and resource sharing is what I'd expect as priorities from an embedded-dedicated lang.

I think they mostly try to introduce the new language itself.

But surely quick "How to do Esp32 things" mirroring this http://docs.micropython.org/en/latest/esp32/quickref.html would be very nice.

Without it you need to look for tutorials and documentation tree or even documentation for specific packages providing embedded functionalities.

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#42
post #6

Huge huge fan of ESP32s over Arduino/RPi/etc for any/all projects where I can do so. I’ve probably got 15-20 ESP32 projects around the house, and have done somewhere around 80-100 for other people. Arduino does a great job with marketing but at the end of the day you could do 99% of Arduino projects with an ESP32 for 1/10th the cost, use less power, and get way more features at the same time, while still using the Ar…

> use less power, I was about to go off on a rant about how power hungry the ESP32 is. But having a look its not as bad as I remembered (or perhaps I was thinking about the 8266) https://diyi0t.com/reduce-the-esp32-power-consumption/ depending on the board you can get it to as low as 15ma in "normal" use(light sleep microprocessor only, modems off). But when the wifi is on it chows down powers.

The chips various Arduino-like chips are 5mA active, 500uA when light sleeping, 5uA in deeper sleep, and hundreds-nanoamps in deepest sleep.

15mA "light sleep" is really heavy actually compared to most things IMO. Hell, the Nordic Semiconductor nRF5340 uses 5mA _WHEN TRANSMITTING ON ITS RADIO_.

https://www.nordicsemi.com/Products/nRF5340

-----------

ESP32 is in that zone between the low-power (and ultra-low power) uCs and Raspberry Pi. ESP32 is ~20mA to 50mA, comparable to RP2040 (which I also consider to be very "heavy").

Arduino-chips, like the ATMega328pb (as old as it is), is on the scale of "Years on AA batteries of sleep". While chips like ESP32 are on "Hours of AA batteries of sleep".

--------

The only advantage to ESP32 is its WiFi. If you need anything else at all, there's a lot of better chips available. In particular, Teensy is probably the best board for ~50mA to ~100mA levels that the ESP32 finds itself in.

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#43
post #29

There's a very nice language dedicated to ESP32 programming that has semantics very similar to ruby and python and very clean minimalistic syntax. It called toit https://toitlang.org/

It’s strange that in their examples they don’t show any I/O (apart from print). I would expect support from such a language to support me with I/O while I concentrate on my program. For example by providing an event loop. Of course, if I need a more performant approach I would switch to a low level language.

There is no event loop. You make lightweight threads called tasks, and they can block on things or wait for each other.

https://docs.toit.io/language/tasks

Synchronization: https://libs.toit.io/monitor/library-summary

For example the GPIO pin has a wait_for method which pauses a task until a signal is seen. https://libs.toit.io/gpio/class-Pin

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#44
post #39
post #6

Huge huge fan of ESP32s over Arduino/RPi/etc for any/all projects where I can do so. I’ve probably got 15-20 ESP32 projects around the house, and have done somewhere around 80-100 for other people. Arduino does a great job with marketing but at the end of the day you could do 99% of Arduino projects with an ESP32 for 1/10th the cost, use less power, and get way more features at the same time, while still using the Ar…

A little off topic: Is there a video compression chip that I can put on a board with an ESP32 to make a live streaming camera similar to what can be done with an RPi or Jetson Nano?

Why not use an ESP32-CAM board?

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#45
post #17

ESP32 is my go to MCU to use now. Their tooling and libraries are so far ahead of the competition especially when you factor in the choice of CLI or VS Code - an actually good IDE. ESP-IDF is so reliable and easy to use I don’t feel the need to JTAG/SWD debug anymore…

I use it at work, and while it’s quite good, I find some of the ESP libraries on top of FreeRTOS to actually be a step backwards. As soon as esp adds their event loop, you’re pushed towards using that architecture, and while I’ve found that good for single use devices, for devices that are doing multiple things at the same time, fitting in memory has been a chore. I also would love some higher performance networking with zero copy, most of the interface boundaries in the esp code involve a memory copy.

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#46
post #7
post #6

Huge huge fan of ESP32s over Arduino/RPi/etc for any/all projects where I can do so. I’ve probably got 15-20 ESP32 projects around the house, and have done somewhere around 80-100 for other people. Arduino does a great job with marketing but at the end of the day you could do 99% of Arduino projects with an ESP32 for 1/10th the cost, use less power, and get way more features at the same time, while still using the Ar…

How do you connect them? I would actually love to have a few PoE powered and connected ESP's since you have to power these things anyway.

Why use ESP32 if you're powering with PoE? Might as well use an "Ethernet-on-board" like Teensy 4.1, and then use a PoE splitter (ex: https://www.adafruit.com/product/3239) to power it.

Why pay for WiFi power (which is rather expensive) when you literally are sending Ethernet communication wires to your uC ?

https://www.pjrc.com/store/teensy41.html

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#47
post #22

What's the industry's consensus on Espressif modules? As a layman they look like an insane deal. With western manufacturers $3.5 doesn't even get you a firm handshake whereas Espressif gives you a fully intergrated module with everything already on board. https://www.digikey.com/en/products/detail/espressif-systems...

Espressif also has a bookstore direct outlet. The “module” prices look spendy but are sold in strips of 10. Here is ESP32-C3 at 1.90/module

https://www.amazon.com/Espressif-ESP32-C3-WROOM-02-N4-Module...

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#48
post #39
post #6

Huge huge fan of ESP32s over Arduino/RPi/etc for any/all projects where I can do so. I’ve probably got 15-20 ESP32 projects around the house, and have done somewhere around 80-100 for other people. Arduino does a great job with marketing but at the end of the day you could do 99% of Arduino projects with an ESP32 for 1/10th the cost, use less power, and get way more features at the same time, while still using the Ar…

A little off topic: Is there a video compression chip that I can put on a board with an ESP32 to make a live streaming camera similar to what can be done with an RPi or Jetson Nano?

I don't understand the question - this chip has an H.264 encoder on board.

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#49
Looks broadly similar to the stm32h7 series that I'm familiar with. Of course all of those are out of stock and cost up to $25. Presumably these are cheaper, though don't have onboard flash memory.

The documentation for the STM32s is probably better though still not impressive, and the STM32 software libraries are nothing to write home about. I think the ESP IDF might actually be better though I don't have a lot of experience with it.

Re: ESP32-P4: High-performance MCU with IO-connectivity and security features

#50
post #17

ESP32 is my go to MCU to use now. Their tooling and libraries are so far ahead of the competition especially when you factor in the choice of CLI or VS Code - an actually good IDE. ESP-IDF is so reliable and easy to use I don’t feel the need to JTAG/SWD debug anymore…

I use it at work, and while it’s quite good, I find some of the ESP libraries on top of FreeRTOS to actually be a step backwards. As soon as esp adds their event loop, you’re pushed towards using that architecture, and while I’ve found that good for single use devices, for devices that are doing multiple things at the same time, fitting in memory has been a chore. I also would love some higher performance networking…

Yes its easy to use but a bit wasteful. I suspect that the innovative stuff will come from the Rust side of things, with zero copy, shared stack etc. They are actively funding efforts here [0]. The RTIC [1] project looks really neat, but only supports Cortex-M afaik.

[0] https://github.com/esp-rs

[1] https://github.com/rtic-rs/

Post reply on HN