Comparison Between STM32 and Arduino: Which One is Better?

01

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

He is a junior, and after looking at his resume, I found he has almost no project experience. For companies, such students are like a blank sheet of paper, and it is naturally difficult for such students to get a good offer.

I remember having written many articles about learning paths, and I have mentioned it many times in knowledge-sharing platforms. Regardless of who you are, if you want to engage in embedded systems, you should start with the 51 series. Today, I saw this article and had a new idea. If you want to engage in application development, you can try mature development boards like Arduino, as they offer better encapsulation and stability, requiring you to care less about many details of the underlying hardware.

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

While studying, you should also learn about common peripherals and buses, as bus timing is fundamental to embedded systems.

02

So, who is better in performance comparison between Arduino and STM32?
Many electronics enthusiasts face a dilemma when choosing between Arduino and STM32.
Arduino has always been popular, but STM32 has more interfaces, stronger performance, and faster speed?
Characteristics of Arduino and STM32.
Arduino:

Comparison Between STM32 and Arduino: Which One is Better?

Arduino is more inclined towards creativity, downplaying specific hardware operations. Its functions and syntax are very simple and very “foolproof”.
Most Arduino controllers are AVR microcontrollers. The advantage of Arduino is its high code encapsulation, requiring fewer statements and reducing software development difficulty.
Arduino is relatively easy to get started with; as long as you understand a little hardware and C++, you can develop.
Most functions on Arduino have well-prepared libraries, making it very simple to use, but for slightly more complex functions, the controllability is relatively poor.
STM32:
Comparison Between STM32 and Arduino: Which One is Better?
For applications requiring computation or control, 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 engineering practicality. In fact, many simple instruments in factories, such as temperature controllers, ordinary motor controllers, low-end PLCs, and some consumer toys like game controllers, wired keyboards, and mice, as well as POS machines in university cafeterias, are widely used.
STM32 is mainly used for product development by professional developers, requiring certain professional knowledge, but writing code to achieve functionality is relatively complex.
For example, outputting a simple string via serial port may take about 10 lines of code for Arduino from creating a new project, but using STM32 development tools like Keil may require hundreds of lines of code or even more.

03

Comparison Between Arduino and STM32

Arduino has many versions, and its features are not consistent. If we take Arduino UNO R3, which is the most common, its controller is the AVR 138 microcontroller, and in terms of performance, it is not on the same level as STM32. This model is somewhat similar to the STC12 series from Macrochip (only in terms of computation).
Arduino MEGA 2560 is considered the leader among MCU versions of Arduino, with rich interfaces and should be comparable to the STM32F1 series, but it has a relatively high power consumption, and the chip heats up significantly. In contrast, the STM32F1ZET6 with the same package only gets slightly warm, and in low ambient temperatures, you might not even feel any heat.
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 than STM32.
Basic programming concepts required: Arduino uses an object-oriented class based on C++ and Java, while STM32 mainly uses standard C language 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 its accompanying circuit modules, you will only stay at the basic programming level.
Openness:
Things made with STM32 can be open-sourced if desired, or kept completely private.
Ease 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 you make something with the same functionality, Arduino is more expensive than STM32.

04

To summarize, if you are still unsure how to choose, here are some suggestions:
If you are an ordinary student with little understanding of programming languages, I recommend starting with Arduino.
If your C foundation is weak, jumping straight into STM32 will likely lead to frustration.
If you are learning just for employment, go for STM32 microcontrollers decisively.
If you are learning just for fun, and you are not from an electronics background and lack confidence, I recommend Arduino.
If you have a solid programming foundation, I suggest STM32. Once you master it, you can check out what the Arduino open-source community has created, and you can easily implement it with STM32.
Of course, if you have the ability, try to get familiar with both. Generally, within a week, you can grasp 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 chosen by electronics enthusiasts and DIYers, while STM32 is often used for the research and manufacturing of actual products.
However, the Arduino series now also supports STM32 chips. By downloading the Arduino firmware first, you can then use the Arduino development environment for programming. Choosing the right one based on your project type and needs is the most important.
Source: Big Fish Robotics
Copyright belongs to the original author. If there is any infringement, please contact for deletion.

Leave a Comment

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