6

I am currently choosing a processor for my embedded robotics project. I have just completed a prototype with the ESP32 DEVKIT-V1 module.

I hope to commercialize my product in the future, however, when looking at professional boards, I mainly see STM32s being used and no ESP32s.

Why is this the case, even though ESP32 has better performance (clock speed, RAM, flash size, etc.) than most STM32s?

toolic
  • 5,637
  • 5
  • 20
  • 33
Tony
  • 83
  • 1
  • 4
  • 1
    Does ESP32 have a progressive line-up of parts and is it as well supported? I'd ask about reliability of supply too but that's shot right now. – DKNguyen Mar 24 '22 at 14:37
  • 5
    So what if most STM32 models are slower and have less memory? You are comparing apples to oranges and they don't compare. There are also STM32 models that are faster and have more memory so a counter question is why would anyone use ESP32 at all if only memory and speed are concerned. You select something for the job that is enough, and that is different from the question if ESP32 can be used in a commercial product. Yes it can and it has nothing to do with other products using STM32. – Justme Mar 24 '22 at 14:58
  • 2
    Apparently a lot of the pre-made boards for ESP32 are of questionable quality, judging by EMC-related questions about them posted here. You should probably start there: will you CAD the board yourself or buy something pre-made? – Lundin Mar 24 '22 at 15:37
  • @Lundin - thank you for your reply. I will be designing my own board. – Tony Mar 24 '22 at 15:39
  • 3
    Anyway, chose MCU based on your project requirements, not based on some whim. For example if you have a requirement to have misc wireless peripherals on-chip, then that's a specialised requirement which will narrow down your options quite a bit. Things like clock speed and memory size are among the last things to look for, they can easily be up/down scaled. – Lundin Mar 24 '22 at 15:41
  • Esp8266 and esp32 were mainly designed for lightbulbs and other consumer grade IoT devices. However, if you wish to use the WiFi features the security of these chips has been proven to be poor. Whilst the standard ESP32 allows you to encrypt the flash, it is easily cracked. The later versions might have improvements in this area. The esp8266 has no security. Most of the earlier series of STM32 have been cracked as well so many of the newer devices have specific security features. Apart from security issues, I find the esp32 a wonderful chip to use - the RMT and I2S do some high speed logic. – Kartman Mar 25 '22 at 08:59
  • to give an example to illustrate @kartman's comment, if i remember rightly twinkly lights use ESP, I can't remember if ESP32 or another one – northern-bradley Mar 26 '22 at 01:40
  • STM32F103 used to be the king of MCUs because it was widely cloned. Before the chip shortage you could get them for tens of cents and you’ll still find them in just about every consumer device. Today they’re a bit long in the tooth, but still relevant. – Navin Apr 12 '22 at 03:19

2 Answers2

14

The ESP32 is a viable commercially made product and is widely used both by experimenters and in production of commercially made products.

The ESP32 has quite a bit more functionality (i.e. BT and WiFi) than the bare STM32 but many variations of the STM32 may be less expensive. The STM32 also usually has more internal peripherals.

The two are both microcontrollers and therefore have many similarities but they are neither the same nor interchangeable.

If I had designed a product prototype using the ESP32 I would not have any reservations on using it in production provided its cost and availability met the requirements needed there.

jwh20
  • 7,812
  • 1
  • 16
  • 27
  • What's a "bare STM32"? There's literally thousands of them with all manner of different cores and peripherals. – Lundin Mar 24 '22 at 15:38
  • 3
    To my knowledge none of them have built in BT or WiFi. So you need to add external components to accomplish this. – jwh20 Mar 24 '22 at 15:39
  • Well, who said that the OP needs BT and WiFi...? This question without any requirements listed is kind of like "what's best, a long rope or a red rope". – Lundin Mar 24 '22 at 15:45
  • 6
    I was merely pointing out some differences. – jwh20 Mar 24 '22 at 16:06
  • 2
    [STM32W](https://www.st.com/en/microcontrollers-microprocessors/stm32-wireless-mcus.html) series are "bare" micros with built-in radios supporting BLE, IEEE-802.15.4, Lora, etc. – brhans Mar 24 '22 at 17:47
  • Do you know if the esp32 wifi has any FCC/RED certification, or does one have to go through the whole process? – lalala Mar 25 '22 at 12:39
  • 1
    https://www.espressif.com/en/news/esp-wroom-02-module-gains-ce-fcc-and-telec-certifications – jwh20 Mar 25 '22 at 14:09
  • @lalala: The FCC doesn't certify individual chips, so the device has to be certified whether it uses an integrated solution of a collection of building blocks. – Ben Voigt Mar 25 '22 at 21:23
9

Both the ESP32 and STM32 can be used in commercial applications, like any commercially available MCU. It all depends on your requirements, such as:

  1. Do you need Wi-Fi?
  2. Do you need Bluetooth?
  3. Do you need to reduce board space (physical requirement)?
  4. What internal peripherals do you need? How many communication interfaces? How many pins? How many ADC channels with which resolution? Do you need some feature that is specific of one CPU line?
  5. How much program space and RAM do you need (approximate, if you are early in the design process)? Does the CPU line have footprint compatibility so that you can downscale the component at the end of the design phase, to save on component costs?
  6. Do you have realtime requirements? How many cores do you need? How many cores does each CPU have? Do you want to spend time of your cores managing Wi-Fi? Does the SDK hide RTOS details? If your SDK uses a RTOS to manage Wi-Fi, how does that affect your realtime requirements?
  7. Do you have low-energy requirements? How does each CPU fare on the projections for your application?
  8. What is your current project status? If the product is already designed, do you want to spend the resources to port it to another CPU?
  9. What's the cost of each CPU (total BOM cost including support components, assembly cost, etc)?
  10. Are they easy to source in the volume you need?
  11. How is their SDK and library support? Can you design with both? Does learning another toolchain affect your Time-to-market? Did you actually set time-to-market requirements?
  12. What are the costs for the MVP using both, provided your other requirements allow usage of both?

You have to research some of these points to choose in an early stage of development. If, like the OP, you are already in prototype stage, the cost of porting will most likely dominate over other aspects of the product.

Ronan Paixão
  • 1,015
  • 6
  • 7