Comparing STM32 and Arduino: Which is More Powerful?

01

A few days ago, a student asked me about the learning path for embedded systems.

He is a junior student, and after looking at his resume, I found that he hardly has any project experience. For companies, such a student is like a blank sheet of paper, making it difficult for them to get a good offer.

I remember having written many articles on the learning path, and I have mentioned it many times in the knowledge community. Regardless of who you are, if you want to engage in embedded systems, you should start with the 51 microcontroller. Today, I saw an article that gave me a new idea: if you want to engage in application development, you can try mature development boards like Arduino. Their encapsulation and stability are 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 the 51 microcontroller, STM32, RTOS, and Linux. Later on, you can choose either RTOS or Linux, as mastering both multitasking systems is quite challenging.

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

02

So who is more powerful, Arduino or STM32?
Many electronics enthusiasts face a dilemma when choosing between Arduino and STM32.
Arduino has always been popular, but STM32 has more interfaces and stronger performance, along with faster speeds?
Characteristics of Arduino and STM32.
Arduino:

Comparing STM32 and Arduino: Which is More Powerful?

Arduino tends to focus on creativity, downplaying the specifics of hardware operations. Its functions and syntax are very simple and quite “foolproof”.
Most Arduino boards use AVR microcontrollers, and its main advantage is high code encapsulation and fewer required statements, which reduces software development difficulty.
Arduino is relatively easy to get started with; anyone with a little hardware and C++ knowledge can develop.
Most of Arduino’s functionalities come with well-prepared libraries, making it simple to use, but it has poor controllability for slightly more complex functionalities.
STM32:
Comparing STM32 and Arduino: Which is More Powerful?
For applications requiring computation or control, STM32 is the 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 products like toys, game controllers, wired keyboards, and mice, are widely used. For example, the POS machines used in campus cafeterias.
STM32 is mainly designed for professional developers to create products, requiring certain professional knowledge, but coding to achieve functionality is relatively complex.
For instance, outputting a simple string via serial may require only about 10 lines of code in Arduino from a new project start, but using STM32’s development tools like Keil may need hundreds of lines of code or more.

03

Comparison of Arduino and STM32

Arduino has many versions, and their characteristics are not consistent. Taking the most common Arduino UNO R3 as an example, its controller is the AVR 138 microcontroller, which does not perform at the same level as STM32. In some aspects, it is somewhat similar to the STC12 series from Holtek (only in terms of computation).
Arduino MEGA 2560 is considered the top among Arduino MCUs, with rich interfaces that should be comparable to the STM32F1 series. However, it has a relatively high power consumption and noticeable heat generation, while the STM32F1ZET6 with the same package has only slight warmth, and sometimes feels cool in low-temperature environments.
Based on the different characteristics of both, we can compare them according to different applications:
In terms of ease of learning: Arduino is significantly easier than STM32.
Basic programming concepts required: Arduino: object-oriented C++, Java-like language, based on C but somewhat ambiguous. STM32 primarily uses standard C for development.
Knowledge gained after learning: Arduino is weaker than STM32.
Because Arduino encapsulates many low-level operations. Unless you try to write libraries for Arduino and supporting circuit modules, you will only remain at the basic programming level.
Openness level:
Things made with STM32 can be open-sourced if desired; if not, nothing needs to be disclosed.
Difficulty of building peripheral circuits: Arduino is much easier than STM32.
Expandability: Arduino and STM32 are comparable, as Arduino basically exposes most of the controller’s pins.
Cost: Assuming the same functionality, Arduino is more expensive than STM32.

04

To summarize, if you’re still unsure how to choose, here are some suggestions:
If you are an ordinary student below the university level with limited programming language knowledge, I recommend starting with Arduino.
If your C foundation is weak, jumping straight into STM32 may lead to quick frustration.
If you’re learning solely for employment, go for STM32 microcontrollers.
If you’re learning just for fun and are not from an electronics background and lack confidence, Arduino is the way to go.
If you have a good programming foundation, I recommend STM32. Once mastered, you can easily replicate what the Arduino open-source community has done using STM32.
Of course, if you have the capability, try both. Generally, within a week, you can master the basic features of Arduino, and later, if needed, you can easily port Arduino code to STM32 or other MCU platforms.
In fact, these two target slightly different directions: Arduino is generally a choice for electronics enthusiasts and DIYers, while STM32 is often used in the development and manufacturing of actual products.
However, the Arduino series now also supports STM32 chips. By downloading the Arduino firmware, you can use the Arduino development environment for programming. Choosing what suits your project type and needs is the most important.

-END-

Previous recommendations: Click the image to jump to read
Comparing STM32 and Arduino: Which is More Powerful?

Summary | From Huawei’s regularization to resignation

Comparing STM32 and Arduino: Which is More Powerful?

What I saw and learned in five months at Huawei!

Comparing STM32 and Arduino: Which is More Powerful?

Programmer’s Survival Guide? Someone actually made an open-source project.

Comparing STM32 and Arduino: Which is More Powerful?

Routing is easy at first, but later becomes a nightmare?

Leave a Comment

Your email address will not be published. Required fields are marked *