Micropython is VERY slow on the Pico. This is why I use c as my language of choice. I am using bothe cores I'm my projects. In my case I need seemless integration in my projects. Any stalls in my main code will cause visual flickering problems. The second core solves my issues.
Yea you never know what assembly python will be unrolled into. Sometimes it can be quite baffling unrolling a command to 30 -300 operations when C would do it in one or two
It’s worth taking a look at the generated code sometimes to get a sense of just how much slower python must run than native code. Python is much easier to understand though, but I have found it’s performance to be very poor on these boards. Just the libraries and the micropython kernel quickly eat up that 2-4mb of flash. Like really quickly.
Where the RP2040 really shines is with complicated I/O. Rather than bit-banging your protocols on the main core, you can use drivers for the PIO cores to manage the low-level details, and work mostly with filled buffers at your application level. The second core is useful in much the same way - offload a complicated process with sensitive timing, leaving your core application logic untroubled by such things. Also, reports are that it overclocks very nicely. All that said, I still love the ESP32 for some workloads.
If the ESP32-S2 is implemented with a DMA for niche protocols, I don't think the pico's PIO is a straightforward victory. Then again, I'm not too familiar with the ESP's DMA implementation either, so this might be a straight victory for the pico. But for conventional protocols like I2C or SPI, DMA with the ESP32 and DMA or PIO with the pico should be fairly equal. Though I would give extra points to the ESP because its larger ram means it can have a larger buffer. It does seem the pico has a lot more performance left on the table if python isn't used here. I'm curious how it would fair if this test is done on C. Even with Python, deleting the code drawing that progress bar will make the gap between the two smaller.
@@cybermechid9181 that stupid miner/covid/??? related chip crisis kills me. even microcontrollers became more expensive. i remember pico started from 2$. hopefully i have some bought before esp8266 radio can be turned off in settings. tho pico has more pins, better to use it if no wifi required
Just a question: Would it be possible to use the pi with a gpio expander to deal with both i2s audio and a full 107key keyboard setup by dividing the operations between the cores? Could probably benefit using a C-language for that comapred to the rather sluggish circuitPython code that usually runs on these dev board.
I hope you took away lots from this video. Let me know below! PS. I created a course named "Object Oriented Programming Made Easy. Get it here 👉 bit.ly/3NaMfg4
Ok, first thing - progress bar is delayed calculations and on the slower machine doing more delay, what is incorrect. If you don't believe simply do progress bar on the half screen size and check time difference. You should only calculate timestamps in calculation time and the second thing: To be honestly you should calculate PI 2 times, on the RPI paralelly on the two cores, and on the ESP one after one - that wouldbe show really how fast they are. It is not? Cheers
One small thing that I noticed right away is LED on ESP32 compared to Pico. The other side is CH304 chip it's only useful for development but not for actual project so it also uses some current. So if you thinking about project specific current you would emit all those before mesuring. Pico has integraded USB support so it doesn't need to use USB to TTL. So if thinking about actual project you would only use ESP32 module itself not entire dev board. This would give fair comparison between two. Plus WIFI/BT should also be sure to be fully disabled.
There is a huge difference in power consumption among different ESP32 boards. The CH340 oder CP2102 bridges sometimes consume more than the ESP32 itself (especially if you do battery powered applications where the ESP32 consumption can be as low as 0,0025 mA). If you want to compare power consumption you should disable radio and reduce the core speed to about 120 MHz which will bring the ESP32 power consumption below 10 mA.
Second thread is very powerful, can run second task that normally would slow down your code significant on the second core, and it's easy to use in the code. For example, you can run TFT driver on the second core, or serial communication, etc. So your program runs full speed, that can be huge difference in many cases.
Have you verified that the LCD updating doesn't effect the test result. My suggestion would be to remove the progressbar and just write test running at start of test
Yes you are right, the LCD updating is included in the time needed to run the script. I included it on purpose in order the test not to be pure mathematical, to be closer to real life which usually needs driving an updating a display. Thanks for comment.
But 2 cores if you know how to use it. Even under Arduino for beginners is multicore library for using Pico second core. Micro Python is also handy for quick developing.
Was the WIFI radio disabled in your ESP32 sketch? At least for ESP8266 the difference in power use with active WIFI is significant, even when it is not in use.
Regarding power consumption, the led on the ESP32 can be desoldered as it is adding to the total wattage without doing nothing to the performance outcome of his test, also, don’t know if the radios are disabled, witch also adds to the total power consumption.
You can't run python application to measure hardware performance. The implementation of python runtime very much affects the speed of execution and for each MCU the implementation details differ a lot. So you might be measuring the quality of python implementation, not hardware performance.
I agree with what you said. My point of doing the test is not to test the processors, but if someone is using CircuitPython to build his project to know which board is faster running CircuitPython. I think it is useful to know.
@@iliasalaur but by how much? Can Pico's second core close the gap? How well does ESP32 handle IO operations compared to Pico's PIO implementation? This test is the first thing most people will see and it will give them the wrong idea about the potential use cases and performance metrics of these boards. Also I would imagine Pico would win with a proper multithreaded version of this algorithm (maybe even single core when running at 250MHz).
@@artifank2747 man, pico's max clock frequency is 133MHz, while esp32's max clock frequency is 240MHz. That means that it will run faster in all cases.
Nice simple comparison video. Quite informative, although for me the choice of which microcontroller to use in a project generally comes down to the peripheral’s required (eg. Is wireless needed etc.), and also the number of GPIOs I need, and whether I need low power standby (for battery powered), etc. i.e. Given the speed of most cheap MCU’s today, it’s now pretty rare that speed is a deciding factor.
agreed.. Im a big fan of the esp boards, have like 11 of those around the house and in these few years i've been interested in mcu's clock speed has not been a limit so far .. For me it's been mostly connectivity (pins, and ofc wifi) , avilable space (kb's) , physical dimensions, IDE support (dont like the arduino ide and like to use VSCode for all my coding), documentation and specially good pinout maps... However this was a fun video and all, but i feel that benchmarking should be done with C
Which is faster, my tractor or my car? My tractor, of course! Application = Plough a field. If anyone tells you one of these is simply faster than the other, move on. They are likely just a fanboy with no experience of other platforms.
This is quite a nice test but its a bit lacking imo. It would be nice to see two tests running on each device. Since the esp32 can only handle 1 instance at the time (without some fancy asyncronus work), the pi might be a better choice depending on how you can utilize the extra core. Still really intresting, thank you for the video! Also, is it possible to do a calculation on the probable compute strength (flops) and compare it to energy draw? Would be really interesting to see any internal latency meassurements as well. Also, doesnt the rp2040 lack a floating point unit compared to the ESP32-s2?
Very nice and informative video. Would be interesting to see a bare metal programmed comparison. ie. the boards using assembly and not the high(ish) level libraries and functions.
Next comparison: hammer vs screwdriver. ESP32 has its uses, but so does RPi Pico. Pico is unbeatable, when you need a ton of cycle exact IO, thanks to its PIO. Try to output DVI signal on an ESP32, not going to be able to do it. But Pico can do it just fine. Horses for courses. Both are absolutely great uCs and have their niches. You might end up using BOTH of them in the same project!
It would be nice to do a long test and include the 2nd core of the pico. It would like to see if having 2 cores makes up for the slower proformance and if the power differences.
I'd expect the current is proportional to the number of instructions per second, so they should be very close power wise per instruction. In either case, when you are talking about 10's of milliamps for operation, the problem is the same for either platform - long term use with battery power. What is more interesting to me is the low power mode and the current drain under low power mode to judge which to use for battery based applications.
@@EdFrench_uk Thanks Ed. I've been wondering which route to take esp32 or pico and this video nudged me towards the esp32. I will chase up the low power modes on both and see which one to use. I will be using these in a camper running off the house batteries, so although I have plenty of power, leaving it on for months while parked will kill the house batteries and I know, at some point, I will forget to switch it all off, so utilising low power mode will ensure the batteries stay good.
@@MiniLuv-1984 worth posting your ideas on the esp32 reddit first. The ULP is hard even for very simple tasks! Often just waking the main cpu when a pin changes is enough tho'
The processor chip on the pico actually has no Flash, and the Flash device is a serial Flash. This means that the chip has to load code chunks less than 264k and run them then swap them out for new code bits. This is an issue only on larger programs of course, but if you set aside large buffers for USB or WiFi processing then you could see a considerable performance hit. My guess is that the pico is between 80% slower and maybe as much as 1000% slower depending on the application, with smaller applications being favoured. It would be nice to have someone test this with a test suite designed to specifically disadvantage the pico's architecture.
Very nice! I ran simple calculations and CoreMark on Pico and ESP32, the result is similar. The fastest one so far is 912Mhz Teensy 4 especially on 64bit floating point calculation. The K210 600Mhz is good for 64bit integer.
well not really pico have two core so we can do 133hz*2=266 and is bigger than the esp so on multi tasking pico is faster in theory python is monocore so probably not the best choice (maybe cirquitpython is mulricore ?)
Pi Pico is $4 and it is a fixed price. It also has its unique PIO (4 PIO cores for each CPU core), which is a game changer for many applications. It however lacks WiFi/BT capabilities.
This is a good approximation and the results are kind of expected, but it would be good to see the same test running natively instead of through CircuitPython, and without intermediate progress being sent to the display. You're spending time updating the screen and the execution benchmark is skewed by potential differences in the way the two boards communicate with the display. There's no good way to tell what these differences are here. Ideally you'd have them boot, start a timer, run the benchmark, stop the timer, and only use the display to show the results at the end.
First I want to say a wonderful video posting, concise and clear, easy to understand and follow. And I would give this 4.7 stars our of 5.0 . I am just being picky about the units, at 3:50 this video describes the RP2040 board using 10% less POWER (than the ESP32) to perform this calculation. And I agree the the RP2040 uses 10% less SOMETHING, however that SOMETING is not POWER, but it is ENERGY. (NOTE: Most non-technical people don't understand the distinction between Power and Energy)
I use both at the same time in a special application. The esp32 manage the network and the raspi manage the analog signals and the business logic. We have two separated teams of developers, one for each uc.
I’ve been playing with both. I think the ESP32 is the best option! Try to find a Pico W for less than the ESP32. Try to find a basic Pico for under the same price of the ESP32. Cost and functionality; the ESP32 wins! 🎉
This was great.. a good honest appraisal of both boards.. the esp 32 is what I will use.. But not for what you think.. I like the wifi connection.. It makes for easier use in some of my projects..
Thanks a lot for sharing. I have a project now. I need to display some data on multiple oled displays via SPI protocol and within 100 meters. So can I ask you a question? If I need to use 100-200 OLED and use RaspberryPi. Can I complete my project? Please give me some avide.
I wonder what result you get if you compare to the ESP32-C3 RISC V board. According to my experience, the C3 @160MHz is twice as fast as a Pico that is overclocked to 240MHz. Of course, only single core used.
@@iliasalaur That's true, but if you run Pico and ESP32 S2 both at 240MHz, Pico is faster as RISC M0+ is more efficient than LX7. On the other hand, if you compare single cores only, ESP32 C3 RISC V core clocked @160MHz is faster than a Pico @240MHz. That's what I see at least, but not benchmarked under lab conditions... Comparing single vs dual core uC is a difficult one I don't dare, because too many other dependencies like SW quality, thermal power capability, RAM and Flash channel bandwidth, mem paging ect. have large influence on result.
@@deehigh3359 actually, we shouldn't compare pico and esp32. Both of them are designed for different reasons. First for simplicity of interacting, second for developing iot stuff. So, that's it
First of all great video. Both are great boards. Let's not forget esp brought wifi to the makers. The pico has a few aces in its sleve like Hardware Divivide and can be overclocked to 266Mhz super easy. Division on micros without dedicated hardware is very , very taxing on performance. If you could try and use the Hardware Divide, and bump up the speed a bit on the pico, it will smoke the esp in this specific case. :) What you did with the pico is like driving a Ferrari in 1st gear : no dual core, no hardware divide, no overclock :)
ESP32 (not S2) is same architecture as ESP32S2, but has two computing cores, so 2x speed vs S2 and 2x cheaper price vs PI. Also You forgot to mention about 8Mhz low power core on both ESP32 and ESP32S2, so computing power is even higher :)
Excellent video ! Did you consider to rerun the test with an RPi Pico W ? I'm not sure if the wireless option has an impact on the result though. Furthermore: Would it make sense to try to make use of the 2nd core by introducing threads (AFAIK the 2nd core is not used in Python code by default) ?
Any project using WIFI or Bluetooth the S2 is the only option and anything using complex fast IO the PICO would be the better option. People need to learn to match the device to their problem. Also you need to make sure you turn off the WIFI/Bluetooth radio on the S2 when testing. By default these use a lot of power even when not being used unless explicitly turned off.
At 3:08 it seems like the ESP32 knew you were testing it and was live on camera, so it wanted to flex. LOL. It gave you the time of 3.14, the same as the pi result :)
I hate libraries and it was much faster to write a bit of code in MMBasic to begin with. I can focus on the tasks, hardware and the modules for things. I bought some ESP32 stuff anyway and it's the same SPI, I2C, Serial, Display and whatnot protocols with more wireless functionality on the ESP32 side. Low power and no heat is a major factor sometimes. They can easily communicate together, so just do you.
My guess, before watching your benchmark run is that it would be the ARM RPi board who wins. Compiler should be better, and the Python runtime should be more optimized for an arch that is mainstream these days
Thanks for an interesting video. Isn't the IO-processor of the Pico the most prominent difference if comparing them? I would guess that makes stuff possible on the Pico which would still be impossible (much harder) using ESP32.
Not sure it makes a lot of sense to compare on that task, and inside CircuitPython... except if you plan to use it with CircuitPython. I think the Pico has no floating point math and is using library to do the math... and that might not be the case for the ESP32S2 so on some mathematical activities. I think the size of the community, the documentation, the support, ... are big factor for the maker community. Price and availability are also important.
The ESP32 S2 takes approximately Pi seconds or 3.14 seconds and the Raspberry Pi takes approximately 2 Pi seconds or 6.4 seconds. Interesting. and a bargain price for both.
The benchmark itself is quite limited. It's certainly shows some specific aspects of relative performance, but there needs to be a broader set of tests.
Whoa.... A benchmark but in Python? Not only is Python slow but the runtime for the language is probably compiled a bit different for each platform. I think straight C or C++ would be a better indicator.
You should compare these to a Teeny 4.1. Single core, but at 600 Mhz, which can be overclocked. Much more powerful, with a lot more I/O. I would use C libraries for the comparison however.
thonny ide (uses an interpreter) made my pico run 10x slower than my nano, idk it’s useless to have 8x times 2cores more processing power and be 10x slower than a poor nano. I’ve just switched to arduino ide and it now runs about 500 times faster but there is another problem. compilation takes several minutes makes it very difficult to debug.
The comparison is somewhat useless. 1.) Price: on paper PICO is cheaper, and yes in some countries, but mostly it is the Raspberry Pi monopoly and it sold through their distributors like element14 in India, making it not so cheaper. While ESP32 is mostly open and generic boards are available everywhere, and so no dealing with shit companies like element14 or RS components . 2.) Features: ESP outperforms with WiFi in all aspects, PICO is no match. 3.) Power: Most of the power was consumed by the LCD, and because PICO was slower, the LCD was on for a longer duration. As per me this comparison of power measurement is completely flawed 4.) Documentation: Though PICO documentation looks prettier, its no match for the number of projects and code written for the ESP32.
Thanks for taking the time to write your opinion! I appreciate it. It is always great to hear different opinions and hear the point of view of other people. Thanks for the insights!
I agree that if your project involves WiFi then ESP32 certainly makes more sense. Apart from that, your personal opinion about companies like Element14 and RS Components really doesn’t weigh in on this speed comparison. Also, the LCD is powered all of the time showing the calculation results and it’s power consumption will be the same in both circuits, so not really a factor in power consumption comparison when the total power consumed of each circuit was measured while the application was running.
У ESP32 тоже два ядра, первое обслуживает модули WiFi и BLE. Это ядро так же можно задействовать в работе. Вопрос только в распараллеливании вычислительной задачи.
It's a great video. Can you make a video about the serial communication between Raspberry pi pico and Matlab, or could you help me by showing me how I could do it?
I don't have one, but since the ESP32-S3 has two cores, which are exactly the same as the the core of the S2, I think they have exaclty the same performance. I will get one to test it though. Cheers!
Yes, the ESP32 v1 is dual core but it features two cores of an earlier LX6 architecture. The new ESP32 S3 is dual core with the newest LX7 architecture but the cores should have identical performance with the ESP32 S2.
The Pico is more popular? Definitely not among makers. I will juxtapose that with the fact I think the people behind the esp need to add more logic blocks to it's risc v cpu so it at least can draw 3d graphics better. A flatshaded 3d cube brings it to its knees. I can't speak to the pico's ability as I don't have the patience to copy code over to it and reset it like it's a thunbdrive with a crappy dual core cpu strapped to it that has to be taken out and put back in after every time you put something on it. From what I read the Pico is the next board to get an update from the rpi corporation. I'm sick of these companies giving makers the shaft because we had to deal with 8bit stuff for so long. A pico2 should be at least as powerful as a 10 year old rpi2
why use a microcontroller processor to draw 3d in the 1st place and no matter how fast a microcontroller is it will never be capable for 3d such as the architecture is not for that purpose, use an soc with mali gpu or a stand alone gpu for that
@@destrukt4life I agree but why do they sell (relatively) big ipa screens for microcontrollers and people make 3d graphics on them. I'm not asking for a Mali or soc. It was just an example of where mcu tech is at relative to their slightly bigger brothers. Just a bit faster isn't too much to ask for.
Yes, I only used one core of the pico because CircuitPython does not support multi-core programming. I plan to do the same test on Arduino and use both cores of the Pico, so stay tuned.
nice video, but I'm not quite sure if python is the best language to compare the power that lies behind some architecture.
That's what I thought. It's like comparing athletic performance of two runners by only letting them walk on their hands.
Micropython is VERY slow on the Pico. This is why I use c as my language of choice. I am using bothe cores I'm my projects. In my case I need seemless integration in my projects. Any stalls in my main code will cause visual flickering problems. The second core solves my issues.
Yea you never know what assembly python will be unrolled into. Sometimes it can be quite baffling unrolling a command to 30 -300 operations when C would do it in one or two
A better approach would be just to use advertised IPC x Clock (instructions per clock) to get instructions per second
It’s worth taking a look at the generated code sometimes to get a sense of just how much slower python must run than native code. Python is much easier to understand though, but I have found it’s performance to be very poor on these boards. Just the libraries and the micropython kernel quickly eat up that 2-4mb of flash. Like really quickly.
They have to estimate Pi, and the ESP32 took 3.14 seconds to do it... That's a sign
Where the RP2040 really shines is with complicated I/O. Rather than bit-banging your protocols on the main core, you can use drivers for the PIO cores to manage the low-level details, and work mostly with filled buffers at your application level. The second core is useful in much the same way - offload a complicated process with sensitive timing, leaving your core application logic untroubled by such things. Also, reports are that it overclocks very nicely. All that said, I still love the ESP32 for some workloads.
esp has wifi and Bluetooth, it is very handy feature. for projects that don't require internet connection i use good old arduino nano
If the ESP32-S2 is implemented with a DMA for niche protocols, I don't think the pico's PIO is a straightforward victory. Then again, I'm not too familiar with the ESP's DMA implementation either, so this might be a straight victory for the pico. But for conventional protocols like I2C or SPI, DMA with the ESP32 and DMA or PIO with the pico should be fairly equal. Though I would give extra points to the ESP because its larger ram means it can have a larger buffer.
It does seem the pico has a lot more performance left on the table if python isn't used here. I'm curious how it would fair if this test is done on C. Even with Python, deleting the code drawing that progress bar will make the gap between the two smaller.
@@cybermechid9181 that stupid miner/covid/??? related chip crisis kills me. even microcontrollers became more expensive. i remember pico started from 2$. hopefully i have some bought before
esp8266 radio can be turned off in settings. tho pico has more pins, better to use it if no wifi required
@@Gameplayer55055 Coward.
Just a question: Would it be possible to use the pi with a gpio expander to deal with both i2s audio and a full 107key keyboard setup by dividing the operations between the cores? Could probably benefit using a C-language for that comapred to the rather sluggish circuitPython code that usually runs on these dev board.
I hope you took away lots from this video. Let me know below!
PS. I created a course named "Object Oriented Programming Made Easy. Get it here 👉 bit.ly/3NaMfg4
You can overclock the pi pico to 250mhz
Can still get the pico for $4 from official distributors.
Ok, first thing - progress bar is delayed calculations and on the slower machine doing more delay, what is incorrect. If you don't believe simply do progress bar on the half screen size and check time difference. You should only calculate timestamps in calculation time and the second thing: To be honestly you should calculate PI 2 times, on the RPI paralelly on the two cores, and on the ESP one after one - that wouldbe show really how fast they are. It is not? Cheers
I will try to do a parallel computer of Pi in the future. In this video I just test single core performance. Thanks for the tips!
Great vid!
One small thing that I noticed right away is LED on ESP32 compared to Pico. The other side is CH304 chip it's only useful for development but not for actual project so it also uses some current. So if you thinking about project specific current you would emit all those before mesuring. Pico has integraded USB support so it doesn't need to use USB to TTL. So if thinking about actual project you would only use ESP32 module itself not entire dev board. This would give fair comparison between two. Plus WIFI/BT should also be sure to be fully disabled.
There is a huge difference in power consumption among different ESP32 boards. The CH340 oder CP2102 bridges sometimes consume more than the ESP32 itself (especially if you do battery powered applications where the ESP32 consumption can be as low as 0,0025 mA).
If you want to compare power consumption you should disable radio and reduce the core speed to about 120 MHz which will bring the ESP32 power consumption below 10 mA.
Thanks for the very useful information!
Second thread is very powerful, can run second task that normally would slow down your code significant on the second core, and it's easy to use in the code. For example, you can run TFT driver on the second core, or serial communication, etc. So your program runs full speed, that can be huge difference in many cases.
Have you verified that the LCD updating doesn't effect the test result. My suggestion would be to remove the progressbar and just write test running at start of test
Yes you are right, the LCD updating is included in the time needed to run the script. I included it on purpose in order the test not to be pure mathematical, to be closer to real life which usually needs driving an updating a display. Thanks for comment.
I've seen people say you can o/c the pico to 436Mhz. You could probably safely run it at 266Mhz and you'd be at same speed as ESP32.
But 2 cores if you know how to use it. Even under Arduino for beginners is multicore library for using Pico second core. Micro Python is also handy for quick developing.
Just started running the Picomite (Pico with MMBASIC) at 378MHz. Seems solid and no significant temperature rise 👍😎
Was the WIFI radio disabled in your ESP32 sketch? At least for ESP8266 the difference in power use with active WIFI is significant, even when it is not in use.
Regarding power consumption, the led on the ESP32 can be desoldered as it is adding to the total wattage without doing nothing to the performance outcome of his test, also, don’t know if the radios are disabled, witch also adds to the total power consumption.
I will try that as well. Thanks!
You can't run python application to measure hardware performance. The implementation of python runtime very much affects the speed of execution and for each MCU the implementation details differ a lot. So you might be measuring the quality of python implementation, not hardware performance.
I agree with what you said. My point of doing the test is not to test the processors, but if someone is using CircuitPython to build his project to know which board is faster running CircuitPython. I think it is useful to know.
Actually, if he would use pure c++, the esp32 would be also faster.
@@iliasalaur but by how much? Can Pico's second core close the gap? How well does ESP32 handle IO operations compared to Pico's PIO implementation? This test is the first thing most people will see and it will give them the wrong idea about the potential use cases and performance metrics of these boards. Also I would imagine Pico would win with a proper multithreaded version of this algorithm (maybe even single core when running at 250MHz).
@@artifank2747 man, pico's max clock frequency is 133MHz, while esp32's max clock frequency is 240MHz. That means that it will run faster in all cases.
@@artifank2747 and btw, esp32 has 2 performance cores and 1 ulp core.
Nice simple comparison video. Quite informative, although for me the choice of which microcontroller to use in a project generally comes down to the peripheral’s required (eg. Is wireless needed etc.), and also the number of GPIOs I need, and whether I need low power standby (for battery powered), etc. i.e. Given the speed of most cheap MCU’s today, it’s now pretty rare that speed is a deciding factor.
agreed.. Im a big fan of the esp boards, have like 11 of those around the house and in these few years i've been interested in mcu's clock speed has not been a limit so far .. For me it's been mostly connectivity (pins, and ofc wifi) , avilable space (kb's) , physical dimensions, IDE support (dont like the arduino ide and like to use VSCode for all my coding), documentation and specially good pinout maps... However this was a fun video and all, but i feel that benchmarking should be done with C
the rp2040 is around 0.70$ - 0.80$ and can be overclocked it has less IO if i remember correctly but has 2 cores, is pretty fast and cheap
Which is faster, my tractor or my car?
My tractor, of course!
Application = Plough a field.
If anyone tells you one of these is simply faster than the other, move on. They are likely just a fanboy with no experience of other platforms.
This is quite a nice test but its a bit lacking imo. It would be nice to see two tests running on each device. Since the esp32 can only handle 1 instance at the time (without some fancy asyncronus work), the pi might be a better choice depending on how you can utilize the extra core.
Still really intresting, thank you for the video!
Also, is it possible to do a calculation on the probable compute strength (flops) and compare it to energy draw? Would be really interesting to see any internal latency meassurements as well.
Also, doesnt the rp2040 lack a floating point unit compared to the ESP32-s2?
Very nice and informative video.
Would be interesting to see a bare metal programmed comparison. ie. the boards using assembly and not the high(ish) level libraries and functions.
Next comparison: hammer vs screwdriver. ESP32 has its uses, but so does RPi Pico. Pico is unbeatable, when you need a ton of cycle exact IO, thanks to its PIO. Try to output DVI signal on an ESP32, not going to be able to do it. But Pico can do it just fine.
Horses for courses. Both are absolutely great uCs and have their niches. You might end up using BOTH of them in the same project!
There's nothing ESP32 can't do.
@@jaedson-barbosa VGA with zero CPU usage, and PWM at 200 MHz please. Working fine on the Pico, but would like to move it to a ESP32. Can it do it?
@@dazzer_ you know the PWM frequency is configurable, don't you?
@@jaedson-barbosa Yes, I do, but that wasn't the question.
@@dazzer_ I'm pretty knowledgable on the esp32, and it can't do either of the things you ask.
It would be nice to do a long test and include the 2nd core of the pico.
It would like to see if having 2 cores makes up for the slower proformance and if the power differences.
Yes, I will try to do it in a future video, but in C, since CircuitPython does not yet support the two cores of the Pico
It would be interesting to see how the esp32 did with it's clock slowed - it should reduce the power consumption.
I'd expect the current is proportional to the number of instructions per second, so they should be very close power wise per instruction. In either case, when you are talking about 10's of milliamps for operation, the problem is the same for either platform - long term use with battery power.
What is more interesting to me is the low power mode and the current drain under low power mode to judge which to use for battery based applications.
The ESP32 S2 does also have a low-power core. I've used it on the older esp32 and it's very handy for battery-based applications
@@EdFrench_uk Thanks Ed. I've been wondering which route to take esp32 or pico and this video nudged me towards the esp32. I will chase up the low power modes on both and see which one to use. I will be using these in a camper running off the house batteries, so although I have plenty of power, leaving it on for months while parked will kill the house batteries and I know, at some point, I will forget to switch it all off, so utilising low power mode will ensure the batteries stay good.
@@MiniLuv-1984 worth posting your ideas on the esp32 reddit first. The ULP is hard even for very simple tasks! Often just waking the main cpu when a pin changes is enough tho'
The processor chip on the pico actually has no Flash, and the Flash device is a serial Flash. This means that the chip has to load code chunks less than 264k and run them then swap them out for new code bits. This is an issue only on larger programs of course, but if you set aside large buffers for USB or WiFi processing then you could see a considerable performance hit. My guess is that the pico is between 80% slower and maybe as much as 1000% slower depending on the application, with smaller applications being favoured. It would be nice to have someone test this with a test suite designed to specifically disadvantage the pico's architecture.
Interesting info. Thanks for sharing!
Very nice!
I ran simple calculations and CoreMark on Pico and ESP32, the result is similar.
The fastest one so far is 912Mhz Teensy 4 especially on 64bit floating point calculation. The K210 600Mhz is good for 64bit integer.
The pico can be overclocked to 250mhz and be se to with -O3 flag
Cool! Thanks for sharing. I will try it!
well not really
pico have two core so we can do
133hz*2=266 and is bigger than the esp
so on multi tasking pico is faster in theory
python is monocore so probably not the best choice (maybe cirquitpython is mulricore ?)
Pi Pico is $4 and it is a fixed price. It also has its unique PIO (4 PIO cores for each CPU core), which is a game changer for many applications. It however lacks WiFi/BT capabilities.
ESP32 S2 is also $2-$4, he probably got it from some resale shop in his country that doubles the price. (which is very common)
You can get rp2040 board for 3$ weact rp2040 , doesn't have buck boost converter but high quality board. S2 with psram for 4$ wemos s2 mini
This is a good approximation and the results are kind of expected, but it would be good to see the same test running natively instead of through CircuitPython, and without intermediate progress being sent to the display. You're spending time updating the screen and the execution benchmark is skewed by potential differences in the way the two boards communicate with the display. There's no good way to tell what these differences are here. Ideally you'd have them boot, start a timer, run the benchmark, stop the timer, and only use the display to show the results at the end.
Great video as always 👍
Thanks for sharing your expirence with all of us:-)
Nice touch to include a watt-hour figure (even in the form of time-domain), thank you.
Could be the USB converter responsible of 15-18mA of power consumption in the ESP32 board?
Your esp32s2 devboard has a led driven with ~10mA. Might want to remove that before doing low power work.
Muito bom o vídeo. Parabéns.
I bought the ESP32-S3 as I couldn't find any S2.
Awesome Video thanks :) I need single core power.
First I want to say a wonderful video posting, concise and clear, easy to understand and follow. And I would give this 4.7 stars our of 5.0 .
I am just being picky about the units, at 3:50 this video describes the RP2040 board using 10% less POWER (than the ESP32) to perform this calculation.
And I agree the the RP2040 uses 10% less SOMETHING, however that SOMETING is not POWER, but it is ENERGY.
(NOTE: Most non-technical people don't understand the distinction between Power and Energy)
I use both at the same time in a special application. The esp32 manage the network and the raspi manage the analog signals and the business logic. We have two separated teams of developers, one for each uc.
I’ve been playing with both. I think the ESP32 is the best option! Try to find a Pico W for less than the ESP32. Try to find a basic Pico for under the same price of the ESP32. Cost and functionality; the ESP32 wins! 🎉
Hi Nick! Thanks for the comparison! Do you like the new S2 more than the original ESP32?
S2 is lower consumption with 1 core instead of 2.
brilliant. always love your videos 👍
This was great.. a good honest appraisal of both boards.. the esp 32 is what I will use.. But not for what you think.. I like the wifi connection.. It makes for easier use in some of my projects..
ok...
Thanks a lot for sharing. I have a project now. I need to display some data on multiple oled displays via SPI protocol and within 100 meters. So can I ask you a question? If I need to use 100-200 OLED and use RaspberryPi. Can I complete my project? Please give me some avide.
I wonder what result you get if you compare to the ESP32-C3 RISC V board. According to my experience, the C3 @160MHz is twice as fast as a Pico that is overclocked to 240MHz. Of course, only single core used.
Same with the esp32 board, it can also be overclocked to 240MHz, and has a second core
@@iliasalaur That's true, but if you run Pico and ESP32 S2 both at 240MHz, Pico is faster as RISC M0+ is more efficient than LX7. On the other hand, if you compare single cores only, ESP32 C3 RISC V core clocked @160MHz is faster than a Pico @240MHz. That's what I see at least, but not benchmarked under lab conditions...
Comparing single vs dual core uC is a difficult one I don't dare, because too many other dependencies like SW quality, thermal power capability, RAM and Flash channel bandwidth, mem paging ect. have large influence on result.
@@deehigh3359 actually, we shouldn't compare pico and esp32. Both of them are designed for different reasons. First for simplicity of interacting, second for developing iot stuff. So, that's it
To make it fair, on the Pico, what happens if you set the CPU frequency to 250Mhz? machine.freq(250000000)
Can I do that on CyrcuitPython?
Now there is a pico W with wifi but still ESP32 boards can accomodate an external antenna, which makes them much more useful in many cases.
First of all great video. Both are great boards. Let's not forget esp brought wifi to the makers. The pico has a few aces in its sleve like Hardware Divivide and can be overclocked to 266Mhz super easy. Division on micros without dedicated hardware is very , very taxing on performance. If you could try and use the Hardware Divide, and bump up the speed a bit on the pico, it will smoke the esp in this specific case. :)
What you did with the pico is like driving a Ferrari in 1st gear : no dual core, no hardware divide, no overclock :)
Thanks for the info. It is very interesting, I would love to try it.
Salut din România
ESP32 (not S2) is same architecture as ESP32S2, but has two computing cores, so 2x speed vs S2 and 2x cheaper price vs PI.
Also You forgot to mention about 8Mhz low power core on both ESP32 and ESP32S2, so computing power is even higher :)
Actually the pico has an additional 8 programmable IO cores
Great video, exactly what I wanted to know. Thanks.
ESP32 is growing faster and it's getting cheaper. I would use esp32.
Excellent video ! Did you consider to rerun the test with an RPi Pico W ? I'm not sure if the wireless option has an impact on the result though. Furthermore: Would it make sense to try to make use of the 2nd core by introducing threads (AFAIK the 2nd core is not used in Python code by default) ?
I recently ordered a esp32s3 board. Circuitpython still doesn't have multithreading support though 😔
The ESP32 S3 is beast. I have to develop a dual-core benchmark to make a comparison with the Pi Pico when we get multithreading support.
Be a man, use C
Any project using WIFI or Bluetooth the S2 is the only option and anything using complex fast IO the PICO would be the better option. People need to learn to match the device to their problem. Also you need to make sure you turn off the WIFI/Bluetooth radio on the S2 when testing. By default these use a lot of power even when not being used unless explicitly turned off.
The 2040 chip on the Pico is available as a component and has been used on other implementations including WiFi and Bluetooth boards.
Did you disable the WiFi during the power test?
No, but I didn't enable it either. I thought it would be off by default. I have to look more into it. Thanks for pointing it out!
@@Educ8s The S2 WIFI radio needs to be explicitly disabled or it draws power even when not in use.
At 3:08 it seems like the ESP32 knew you were testing it and was live on camera, so it wanted to flex. LOL.
It gave you the time of 3.14, the same as the pi result :)
Thanks for doing this. It was really interesting
ωραίος! - nice video!
Thanks!
I hate libraries and it was much faster to write a bit of code in MMBasic to begin with. I can focus on the tasks, hardware and the modules for things. I bought some ESP32 stuff anyway and it's the same SPI, I2C, Serial, Display and whatnot protocols with more wireless functionality on the ESP32 side. Low power and no heat is a major factor sometimes. They can easily communicate together, so just do you.
Long live ESP32!
Kicking ass while chewing gum.
My guess, before watching your benchmark run is that it would be the ARM RPi board who wins. Compiler should be better, and the Python runtime should be more optimized for an arch that is mainstream these days
That's a good point!
Was the WIFI module turned off on the ESP during the current consumption test?
Thanks for an interesting video. Isn't the IO-processor of the Pico the most prominent difference if comparing them? I would guess that makes stuff possible on the Pico which would still be impossible (much harder) using ESP32.
Exactly my thought, the IO processor on the PICO is a game changer for complex IO.
Very nice comparisons you made, comparing boards and libraries (CircuitPy vs Arduino, for example).
Good info. Thanks. I would like to same test adding the esp32-s3
Not sure it makes a lot of sense to compare on that task, and inside CircuitPython... except if you plan to use it with CircuitPython.
I think the Pico has no floating point math and is using library to do the math... and that might not be the case for the ESP32S2 so on some mathematical activities.
I think the size of the community, the documentation, the support, ... are big factor for the maker community.
Price and availability are also important.
The ESP32 S2 takes approximately Pi seconds or 3.14 seconds and the Raspberry Pi takes approximately 2 Pi seconds or 6.4 seconds. Interesting. and a bargain price for both.
How did the pico perform at max overclock (280 MHz)? Default is 125.
The comments on a TH-cam video are actually helpful and informative. Imagine that!
The benchmark itself is quite limited. It's certainly shows some specific aspects of relative performance, but there needs to be a broader set of tests.
Damn nice job, thanks!
Whoa.... A benchmark but in Python? Not only is Python slow but the runtime for the language is probably compiled a bit different for each platform. I think straight C or C++ would be a better indicator.
On the esp is a LED lightning. That costs the 10 percent 😀
You should compare these to a Teeny 4.1. Single core, but at 600 Mhz, which can be overclocked. Much more powerful, with a lot more I/O. I would use C libraries for the comparison however.
Yes, Teensy is a beast. I would love to test it!
LILYGO® TTGO T-CAN485 ESP32 CAN Modbus rtu RS-485 Supports TF Card WIFI Bluetooth Wireless is a great project board. thanks. great video.😎
ESP32 also has Bluetooth, in addition to the WiFi.
Nice work 👏👏
This benchmark is great idea for tiny boards.
thonny ide (uses an interpreter) made my pico run 10x slower than my nano, idk it’s useless to have 8x times 2cores more processing power and be 10x slower than a poor nano. I’ve just switched to arduino ide and it now runs about 500 times faster but there is another problem. compilation takes several minutes makes it very difficult to debug.
Very informative video 😊
Do you have video comparing esp32 and esp32-s3??
A great video, thank you.
Is there anyway to do this same benchmark using both cores instead of one from the RPi?
Yes, I will try that soon but on Arduino since CircuitPython does not support multicore applications yet.
Could the script be modified to use 1 core on the pico for the calculation and the other to drive the display? how would that change?
Yes, but unfortunately not with CircuitPython. I have to rewrite the test in C.
you can operate up to 240MHz with the pico so in that case it could be as fast as ESP32 in my opinion
I hope you understand you can disable the wifi and Bluetooth modules on the esp32 to make it use much less power
Note that Pi Pico can easily run at twice the frequency
This is a great comparison. I prefer a non fruit powered device.
hi, can I connect raspberry pi pico with stm32 black pill? Is it possible?
The comparison is somewhat useless.
1.) Price: on paper PICO is cheaper, and yes in some countries, but mostly it is the Raspberry Pi monopoly and it sold through their distributors like element14 in India, making it not so cheaper. While ESP32 is mostly open and generic boards are available everywhere, and so no dealing with shit companies like element14 or RS components .
2.) Features: ESP outperforms with WiFi in all aspects, PICO is no match.
3.) Power: Most of the power was consumed by the LCD, and because PICO was slower, the LCD was on for a longer duration. As per me this comparison of power measurement is completely flawed
4.) Documentation: Though PICO documentation looks prettier, its no match for the number of projects and code written for the ESP32.
Thanks for taking the time to write your opinion! I appreciate it. It is always great to hear different opinions and hear the point of view of other people. Thanks for the insights!
I agree that if your project involves WiFi then ESP32 certainly makes more sense. Apart from that, your personal opinion about companies like Element14 and RS Components really doesn’t weigh in on this speed comparison. Also, the LCD is powered all of the time showing the calculation results and it’s power consumption will be the same in both circuits, so not really a factor in power consumption comparison when the total power consumed of each circuit was measured while the application was running.
Not sure how it works to India, but I ordered 3x Pico boards for about $3 each from AliExpress, couldn't find any full size S2 boards for that price.
Got mine from digikey at $4 a piece, dooshbag.
something interesting might be to overlock the pi and see what performance it can achieve
I have tried to overclock pico, and it works fine up to 250mhz. Yes, it gets slightly warm but 2x processing speed is noticeable.
У ESP32 тоже два ядра, первое обслуживает модули WiFi и BLE. Это ядро так же можно задействовать в работе. Вопрос только в распараллеливании вычислительной задачи.
Great video! Are you Spanish?
Thanks! I am Greek.
It's a great video. Can you make a video about the serial communication between Raspberry pi pico and Matlab, or could you help me by showing me how I could do it?
Congrats, you proved c/c++ is faster than micropython. Since there's a C/C++ sdk for the RP2040, why didn't you run the same code on both chips?
do you have the ESP32 S3?
I don't have one, but since the ESP32-S3 has two cores, which are exactly the same as the the core of the S2, I think they have exaclty the same performance. I will get one to test it though. Cheers!
I heard the ESP 32 devkit v1 has 2 cores not sure tho...
I would love to see the comparison if it's true.
Love your video❤️
Yes, the ESP32 v1 is dual core but it features two cores of an earlier LX6 architecture. The new ESP32 S3 is dual core with the newest LX7 architecture but the cores should have identical performance with the ESP32 S2.
👏👏👏
Deos this test utilize FPU?
Also compare ESP32 with DUE
ESP32 is waaaay faster than almost everything. Except Teensy 4.0
3:07 it took 3.14 seconds on the ESP ;D
The Pico is more popular? Definitely not among makers. I will juxtapose that with the fact I think the people behind the esp need to add more logic blocks to it's risc v cpu so it at least can draw 3d graphics better. A flatshaded 3d cube brings it to its knees. I can't speak to the pico's ability as I don't have the patience to copy code over to it and reset it like it's a thunbdrive with a crappy dual core cpu strapped to it that has to be taken out and put back in after every time you put something on it. From what I read the Pico is the next board to get an update from the rpi corporation. I'm sick of these companies giving makers the shaft because we had to deal with 8bit stuff for so long. A pico2 should be at least as powerful as a 10 year old rpi2
why use a microcontroller processor to draw 3d in the 1st place and no matter how fast a microcontroller is it will never be capable for 3d such as the architecture is not for that purpose, use an soc with mali gpu or a stand alone gpu for that
@@destrukt4life I agree but why do they sell (relatively) big ipa screens for microcontrollers and people make 3d graphics on them. I'm not asking for a Mali or soc. It was just an example of where mcu tech is at relative to their slightly bigger brothers. Just a bit faster isn't too much to ask for.
Why are you using esp32 s2? Ordinary esp32 is much cheaper, have 2 cores and more memory
Interesting and thanks but I think it is a little lopsided as the Pi Pico has two cores and you only used one.
Yes, I only used one core of the pico because CircuitPython does not support multi-core programming. I plan to do the same test on Arduino and use both cores of the Pico, so stay tuned.
The non s version of the esp32 are nominally more expensive and feature 2 cores
Yes, but of an earlier architecture, LX6 vs LX7 of the ESP32 S2.
Mmmh the power consuption test is not very accurate, the ESP32 S2 have the USB2UART ic and a red LED....
Yes, I tested the boards without any modification..