Hey guys. This is Eric. The YouTube Algorithm is always amazing. It clearly knows what I like. Among the videos it recommended, there was
a video comparing Raspberry Pi Pico and ESP32-S2. It was enough to catch my eye and it was very
interesting. If you are curious about that, you can find
the video link in the video description below. Similar to this video, I'm trying to compare
the Portenta H7 which is the Arduino Pro, with my favorite one, ESP32-S3 board made
by Espressif. Let's take a look at the specifications first. Just by looking at it slightly, H7 has much
more functionality than S3. But the problem is the price. This is always the biggest problem. H7 is now available for $113 and $15 for S3
Devkitc. If you have money to buy one H7, you can buy
seven S3 boards. There's a huge price difference. Most people, including me, will hesitate to
buy this. Do I really need this? It's too over-spec for my project. We know it's normal to think like this. In this video, I'm gonna compare the MCU's
core first. The H7 consists of an Arm Cortex M7 operating
at 480 MHz and a low-power M4 operating at 240 MHz. The S3 has a dual-core 32-bit LX7 operating
at 240 MHz. So let's look at how good the H7 is compared
to S3. This test compares the computational speed
of the two MCUs when running a single task. The algorithm used here is Leibniz Formula,
and the higher the number of iterations, the closer to the actual pi value. Both devices used the same code. You can get this source code from my GitHub
repository. The LCD is SPI-connected and used the same
ILI9341 3.2-inch 320x280 display. As you see the result of H7,
it performed 10 million iterations in approximately 6 seconds and obtained a pi value with an
error of 0.0000001. On the other hand, the S3 took approximately
37 seconds to complete the same task. This is a huge difference. The clock speed is twice as different, but
the computational speed is more than that. This time, Let's try to find prime numbers
between 1 and 300000. For your information, H7 is slow to draw the
screen through SPI when drawing the progress bar. The GFX library has not been optimized for
Mbed OS Portenta, the architecture of H7. So I'd like to inform you that when calculating
the elapsed time, I subtract the time required to draw the screen. Currently, both use the Arduino GFX library. Finding prime numbers is noticeably slower
as the number gets higher. If the algorithm is optimized, the work may
be done faster, but it applies the same to H7, so I don't think it's a big deal for this
test. There are 25997 prime numbers from 1 to 300000. The H7 took approximately 51 seconds on a
single task. I think S3 will take a long time, so let me
speed up the video. Finally, S3's work is done. It took about 79 seconds and also it found
the same number of H7. This time, they use both dual cores. The H7's dual cores are physically separated. This has the same effect as having two MCUs
on a single board. So, the code must be uploaded to each MCU. The two cores operate independently and can
send and receive data through the RPC. In the case of S3, it operates based on FreeRTOS
and usually exchanges data through Queue. In this test, a single task is assigned to
each core. In H7, the M7 core will calculate Pi, and
the M4 core will find prime numbers between 1 and 300000. In S3, Pi is calculated at core 0, and finding
prime numbers is performed at core 1. What I want to know here is how the speed
difference occurs when it does a single task and does two tasks that are assigned in the
different cores. Both tasks are performed independently. As expected, the pi calculation of H7's M7
core was completed first. It took about 6 seconds. It shows great performance despite doing calculations
on different cores. Next, the pi calculation assigned to the 0th
core of S3 is finished. It took about three seconds longer
than it did with just a single core. Let me speed up this part. The H7's low-power core took about 113 seconds, and the task assigned to the first core of
S3 took 161 seconds. The performance difference between the M7
and the M4 of the H7 is huge. Of course, because the M4 is low-powered,
it's relatively lacking in everything. On the other hand, in the case of S3, two
cores operate with constant performance, and when there are two tasks, the speed of the
second task is reduced by half. To sum up, it shows that computational performance
can make a big difference depending on the calculation you are trying to do. I'm not sure what to test with this H7. Please let me know if you have any code you'd
like to test with H7 or S3. I'll test it. In today's video, we compared the computing
power of H7 and S3. In every way, H7 overwhelms the hardware specifications. But again, the problem is the price. I prefer S3 because H7 is too expensive. But one thing, H7 has the extra function to connect to an
external display. The screen you're looking at now is a typical
HDMI display. An LVGL demo is playing on the screen. It's very fast and works great. I know it's expensive, but depending on what
kind of project you're doing, it might be necessary. Either way, there is no doubt this is a great
device. Let's think more about what projects we can
do with this device. That's it for today. Thanks for watching. See you on the next project.