Comparison Between STM32 and Arduino: Which One is Superior?

Recently, a classmate asked me about the learning path for embedded systems.

He is a junior student, and after looking at his resume, I found that he had almost no project experience. For companies, such a student is like a blank sheet of paper, and naturally, it is hard for them to secure a good offer.

I remember that I’ve published many articles about learning paths, and have mentioned them several times in my knowledge community. Regardless of who you are, if you want to engage in embedded systems, you should start with the 51 microcontroller. Today, I came across this article and had a new thought: if you want to engage in application development, you can try using a mature development board like Arduino. Their encapsulation and stability are much better, and you hardly need to worry about many details of the underlying hardware.

However, if you want to focus on embedded software, I still recommend starting with 51, STM32, RTOS, and Linux. Later on, you can choose to focus on either RTOS or Linux, as mastering both multitasking systems is quite challenging.

When learning, you should also study common peripherals and buses, as bus timing is the foundation of embedded systems.

Comparison Between STM32 and Arduino: Which One is Superior?

The following is the main content
—–
Who is superior in performance comparison between Arduino and STM32?
Many electronics enthusiasts face a dilemma when choosing between Arduino and STM32, unsure of which one to use. Arduino has always been popular, but STM32 has more interfaces, stronger performance, and faster speed?
Features of Arduino and STM32
Arduino:
Comparison Between STM32 and Arduino: Which One is Superior?
Arduino is more inclined towards creativity, simplifying specific hardware operations. Its functions and syntax are very simple and user-friendly.
Most Arduino boards use AVR microcontrollers, and Arduino’s advantage lies in its high code encapsulation, requiring fewer statements, which reduces software development difficulty.
Arduino is relatively easy to get started with; you only need a little knowledge of hardware and C++ to develop.
Arduino has many well-prepared libraries for its functionalities, making it easy to use, but it has poor controllability for slightly more complex functions.
STM32:
Comparison Between STM32 and Arduino: Which One is Superior?
For applications with computational or control requirements, STM32 is a better choice. If you buy a development board for STM32, you need to start learning from the hardware level and master its various details.
STM32 focuses more on practical engineering. In fact, many simple instruments in factories, such as temperature controllers, ordinary motor controllers, low-end PLCs, and consumer electronics like toys, game controllers, wired keyboards, and mice, as well as POS machines for card swiping in university canteens, are widely used.
STM32 is primarily designed for professional developers and requires a certain level of expertise. However, writing code to implement functions is relatively complex. For example, outputting a simple string via serial port may take only 10 lines of code in Arduino, but using STM32 development tools like Keil, it may require hundreds of lines of code or more, such as in the case of sending data through the serial port when a button is pressed.
Comparison between Arduino and STM32
Arduino has many versions, and their features are not consistent. Taking the most common Arduino UNO R3 as an example, its controller is the AVR 138 microcontroller, which does not perform on the same level as STM32. In some respects, it is similar to the STC12 series from Macrochip (only in terms of computation). The Arduino MEGA 2560 is considered the leader among MCU versions of Arduino, with rich interfaces, comparable to the STM32F1 series, but it has higher power consumption and noticeable heat generation, while the STM32F1ZET6, with the same package, only generates slight warmth, and in low ambient temperatures, you might not even feel it getting warm.
Based on the different characteristics of the two, we can compare them according to different applications:
In terms of ease of learning: Arduino is much easier compared to STM32.
Required basic programming concepts: Arduino: primarily object-oriented C++ and Java-like, its language is based on C but somewhat different. STM32 mainly uses standard C as its development language. Recommended reading: Why choose C for embedded development?
The knowledge gained after learning: Arduino is weaker than STM32.
This is because Arduino encapsulates many low-level operations. Unless you attempt to write libraries for Arduino and its accompanying circuit modules yourself, you will only remain at a basic programming level.
In terms of openness:
Things made with STM32 can be open-sourced whenever you want; if you don’t want to, you don’t have to disclose anything.
Difficulty of building peripheral circuits: Arduino is much easier than STM32.
Expandability: Arduino and STM32 are comparable, as Arduino has most of the controller’s pins printed out.
Cost: Assuming you create something with the same functions: Arduino is more expensive than STM32.

Comparison Between STM32 and Arduino: Which One is Superior?

In summary
If you’re still unsure how to choose, here are some suggestions:
  • If you are an ordinary student below the university level with a limited understanding of programming languages, it is recommended to start with Arduino.
  • If your C foundation is weak and you jump straight into STM32, you will soon feel like giving up.
  • If you’re learning just for employment, definitely go for STM32 microcontrollers.
  • If you’re learning just for fun, and you’re not from an electronics background and lack confidence, Arduino is recommended.
  • If you have a good programming foundation, STM32 is recommended. Once you master it, you can easily see what the Arduino open-source community has done and replicate it using STM32.
  • Of course, if you have the capability, try both. Generally, within a week, you can grasp the basic features of Arduino, and later, if needed, you can easily adapt Arduino code to other MCU platforms like STM32.
In fact, these two target slightly different directions. Arduino is generally the choice for electronics enthusiasts and DIYers, while STM32 is often used for actual product development and manufacturing. However, the Arduino series can also support STM32 chips by first downloading the Arduino firmware and then using the Arduino development environment for programming. Choosing what suits your project type and needs is the most important.
Comparison Between STM32 and Arduino: Which One is Superior?

Leave a Comment