. This is Eric. In this video Im going to make a something special comparison.. As you know, RPI Zero 2W is the cheapest SBC.. It works based on a Linux based operating system.. The price is just 15.. You can have an SBC at this ridiculously low, price., Insteadto, be sure its very slow., So you need to buy a higher version. Not this one to do. Internet watch YouTube and play simple games.. Nevertheless, it allows you to install the programs you want and use them. Universally., On the other hand, as far as I know, this Arduino Portenta H7 is the most expensive MCU on the market. As a microcontroller users can program specific tasks to create input, output functions., Because this is MCU, the bootloader is very small and as soon as its Powered on the program is loaded and executed., So usually MCU is used for projects that do one thing or do not require a complicated OS such as Linux and SBC is used for more complex projects.. First lets look at the processors of the two devices.: Zero has a 1 GHz quad core 64 bit Arm Cortex, A53 CPU and for H7 it has a 32 bit Cortex M7 running at 480 MHz and a Cortex M4 running at 240 MHz.. There is a big difference in spec just by looking at this.. Actually, this is about Cortex A series and M series, and they are built for very different purposes.. A series is a general purpose processor designed for use in devices such as smartphones and tablets.

. However, in the case of the A53, it does not support non sequential execution to realize the concept of little core and low power. So the performance isnt that good. For M its designed as a microcontroller for embedded applications., Its the most popular and notable 32 bit microprocessor used in embedded systems in various fields, including drones, smart factories, vehicles, aerospace, home appliances and IoT.. So its designed for applications that value price and power efficiency over performance., Maybe depending on the project you can use MCU or only use SBC. SBC – can be advantageous, especially for projects that require performance.. It generally has a larger RAM and CPU clock than MCU. For RAM. Zero has 512MB SDRAM and H7 has only 8MB SDRAM.. Of course they have different roles, so its natural to have different specifications like this.. So what about the price part SBCs are usually expensive.. The reason is that the resources requiredfor an OS like Linux to operate are more than the MCU, which does simple tasks.. However, the official price for the RPI Zero 2W is only 15.. This is a really crazy price.. You have to buy a micro SD card to install OS, but you can still have an SBC for a very affordable price.. On the other hand, It costs more than 100.. In fact, at this price you can buy a very high performance, SBC.. Most people dont think this price makes sense, but its the price., Its called High End MCU, but its still expensive.

. What about the pinouts? Zero has a 40 GPIOs, but with the exception of Ground 3.3 volts and 5 volts 28 GPIOs are available.. On the other hand, 22 GPIOs are available on H7. For H7, more GPIO, ADC, PWM and I2C are available using Portenta Breakout board., But we have to buy it separately.. The price is about 50.. Everything is expensive.. If you still need to control many sensors with only one MCU, I think this is probably the only solution. Also for Zero. There is no ADC., So if you have a project that requires ADC with RPI Zero, you must purchase a separate ADC. Board. H7 has three 16 bit ADCs and two 12 bit DACs. As a microcontroller. I think everything you need to control. The sensors is here., Since these two devices are in very different categories, the comparison itself could be misleading., But lets do some tests just for fun.. Why not.? The first thing to test is the speed of basic arithmetic operations. Lets benchmark with the same source code.. I got this source code from the Code project and there is a link in the video description below.. Please try it on your system, too.. Only that part was modified so that the result value is output after each operation.. Both work with C code.. The left side is the Arduino IDE, and the right side is the RPI Zero 2 W accessed via ssh. For H7. Only M7 Core is used and my Zero is not overclocked.

. Lets look at the power consumption while running the benchmark., Since SBCs do more work internally than MCUs. It is not easy to compare power consumption for the same task., Of course, its true that Zero consumes more power, but it doesnt make a huge difference. Okay. Lets jump into the result.. I naturally thought that the A53 core would show faster calculation speed, but the result was not.. They show that the basic arithmetic operation, speed of M7 is not slower than that of A53. Slow only on integer division fast on everything, else. Very impressive.. Also, this is a simple single task: comparison.. If the task uses all of the multiple cores, the results can be different.. This time Im going to test using an application. Lets, say we make a system. And lets say theres a special sensor that can collect 512 bytes. Every 10 milliseconds. The purpose of this project is to wirelessly. Send the data obtained from this sensor to the workstation.. Since the sensor does not have a function to send data, wirelessly, SBC or MCU must be used., For example, if you need to run it on batteries, you will have to choose MCU most likely.. What would be the difference in performance between SBC and MCU? If we were to build a system like this, Here is the system. I have prepared. Transferring a 512 byte array with updated data, every 10 milliseconds to the workstation.. Personally, I prefer using WebSocket when transferring a large amount of data.

For H7. I connected an external antenna to make the WiFi connection more seamless.. Zero works as a WebSocket client with Node.js code. H7 operates as a C WebSocket Client.. You can think of what Im holding as a workstation. Itsjust an external, Monitor and connected to a PC.. It works as a WebSocket server and is built with Node.js.. Now lets get started, it. The top one is H7 and the bottom one is RPI Zero, 2 W.. You can see how fast the data is coming in with FPS.. This is 50 Kilobytes per second, if its 100 FPS. Total Byte Size shows the total amount of data obtained from a client, so far. In the case of Total error, its made to count if a byte of a size other than 512 bytes is transferred.. My Zero is a little faster, but both devices show similar FPS. In these constrained systems either has similar performance. Acquiring data from the MCU is not a problem. When inputtingoutputting this data to another place. Very careful control is required.. On the other hand, SBC which allows you to have larger buffers is a very advantageous operation.. What if we sent data every 1 millisecond instead of 10 milliseconds? Unfortunately, this couldnt be done with H7, but it was possible with my Zero.. I was able to send data very quickly and reliably.. The size of the data sent at once could also be larger than MCU. At the application level. I think SBC works greater than MCU.

. Today I compared the cheapest SBC and the most expensive MCU.. If there is a problem with my test, please leave it in the comment.. There may be something I missed in making this test. Personally, It would be better to do a project with MCU if it needs to be operated with simple tasks and batteries.. I think that everything can be handled simply. In the case of SBC. It would be good to use it when the power is always connected and more powerful works are needed.. If you have any interesting ideas, please let me know., I will try it for my project. Thats it for today.. Thanks for watching.