Dual Core Microcontroller Battle Royale - Performance and Power Efficiency

Поделиться
HTML-код
  • Опубликовано: 5 окт 2022
  • Some microcontrollers have two CPU cores like the RP2040, in the Raspberry Pi Pico; the ESP32; and the ESP32-S3. Does using the second core incur a power usage penalty? Which one is the most efficient? Which one is the fastest? Let's find out.
    ---
    Let Me Explain T-shirt: teespring.com/...
    Twitter: / garyexplains
    Instagram: / garyexplains
    #garyexplains

Комментарии • 60

  • @bluegizmo1983
    @bluegizmo1983 Год назад +19

    If your going to continue doing power consumption tests on microcontrollers, you should get a Nordic Power Profiler Kit 2. It only $99 and it allows you to get MUCH more detailed current usage over time compared to just using a shunt and voltmeter. It can also accurately measure down to the very low uA and even nA range.

  • @marklewus5468
    @marklewus5468 Год назад +3

    hi Gary, great work as always. I wanted to add my voice to the chorus who thinks you should test the pico at the same clock rate as the ESP 32. As others have mentioned, the Pico is capable of clocking well in excess of 300 MHz. It would give a more fair comparison

    • @GaryExplains
      @GaryExplains  Год назад

      I would say it was a chorus of people saying that!!! Because, I did that in previous video. Try here: ruclips.net/video/XJawv8xGtX4/видео.html

  • @parapotamus
    @parapotamus Год назад +4

    What voltage was used for powering the boards? If it was 5 V, then the results are skewed in favor of Pi Pico, which has an efficient switching mode 3.3 V regulator instead of a linear one wasting about 1/3 of the power.

    • @GaryExplains
      @GaryExplains  Год назад

      As I have stated in other videos in this series, the testing was done using 5v and 3.3v (for all boards). The relative results don't change.

    • @timlai1091
      @timlai1091 Год назад

      @@GaryExplains it is not reasonable. Normally, switching regulation have much higher energy efficiency than linear regulation, such as 90% vs 66%. Normally, switching power regulation has more noise than linear one and it affect the ADC noise much.

  • @PaulSpades
    @PaulSpades 10 месяцев назад

    Amazing. Despite different architectures and features in silicon, these 3 perform basically the same amount of computation for the power used. And it sort of makes sense, for this test they mostly move the same amount of data between registers, trough mostly the same cmos circuits, with the same size transistors.
    I would've thought the tensilica cores had an edge with their divide circuit, but I guess it just requires it to power a whole lot of transistors. So, maybe faster but with the power expense.
    Maybe us software guys get too hung up on architecture and api debates, the cmos circuits and sram blocks just do what they do.

  • @avejst
    @avejst Год назад +1

    great video as always 👍
    thanks for sharing your experience with all of us 👍🙂

  • @TheEulerID
    @TheEulerID Год назад +1

    I suspect that the most important power issue with microcontrollers is not how many micro-joules are required per million instructions (or whatever you care to use), but the total amount of energy used for what is often intermittent usage. Of course, if there's a simple-minded program that runs in a tight loop, as is often the case, then that won't help much. However, with a well designed micro-controller and software which is interrupt driven and has the ability to put it into a proper "sleep" mode when not executing code, then I would hope that the power consumption can be minimised.
    Also, those CPU architectures which have power saving modes when running light usage applications might have an advantage, although I suspect that sort of thing doesn't apply to micro-controllers in general, and is more likely to be found on the sort of processors to be found in tablets and smartphones.

  • @likewisepro
    @likewisepro 27 дней назад

    Despite being dual core, esp32 has a big problem when connecting and disconnecting wifi events happens. It causes delays , even if you are using a second core

  • @bennguyen1313
    @bennguyen1313 Год назад +2

    Any thoughts how the TWO Ultra-Low co-processors on the ESP32-S3 (ULP-RISC-V , ULP-FSM) could be used to improve performance / power-efficiency?

  • @WhiteError37
    @WhiteError37 8 месяцев назад +1

    Excellent video

  • @gizmoguyar
    @gizmoguyar 11 месяцев назад

    I'd be very interested to hear how these powerful microcontrollers compare to some of the old 8 bit ultra low power microcontrollers such as ATMEGA AVR line. Often my projects have no speed requirement. Maybe they only need to wake up and read some sensors every few minutes. In these cases, I'd be curious to know what is the absolute most efficient. Additionally, those chips can run without any external components at voltages as low as 1.8V, and clock speeds around 250 kHz. ...would be cool to compare all of those options.

  • @marklewus5468
    @marklewus5468 Год назад +4

    One more comment, given that the RP2040 does not have single cycle divide (STM32 M3/M4/M7 all do) I was surprised at how well it performed on the clock for clock basis against the LX6 and LX7. it might be interesting to repeat this test against an STM32M4.

    • @GaryExplains
      @GaryExplains  Год назад +1

      I have tested it against the STM32 M4 in other videos in this series.

  • @Bismuth208
    @Bismuth208 Год назад +2

    Results are strange...
    In my case, when i switched from ESP32 to ESP32-S3 i've got more performance when decoding Jpg from ov2640 on the fly. Like +15FPS on avg. in HQVGA, what allowed me to move into QVGA mode.
    Now i'm wondering how... Could it be due to better IRAM/DRAM cache subsystem?

    • @peterschets1380
      @peterschets1380 Год назад

      The S3 has 512 KB sram, this is more than the older models. Also the S3 has AI Acceleration Support. This can also help to decode JPG. Anyhow, how much FPS do you get with the ESP32-S3 and the ov2640?

    • @Bismuth208
      @Bismuth208 Год назад

      @@peterschets1380 A bit of pre-conditions:
      - ESP-CAM (From Ai-Thinker) transmits over ESP_NOW with cap at 1Mbit/s and LR mode;
      - Camera is set to QVGA and quality=20 with 2 framebuffers in PSRAM;
      - On receiver side there is a ESP32-S3 which decode received data at one core (APP_CPU) and draw image on another (PRO_CPU) via SPI;
      - I use modified by myself Tjpg C library (added IRAM_ATTR to all functions and DRAM_ATTR to const arrays);
      - In menuconfig for ESP32-S3 set I/D cache sizes to maximum (32/64 KB);
      So, with an average data rate as:
      - something like ~86kB/s, i have 27±1.5FPS (Complex scene with bunch of text and objects).
      - something like ~54kB/s, i have 33±1.5FPS (Just blank dark image with closed camera lens).
      As a side effect:
      - I'm using active cooling for ESP-CAM, otherwise it will burn within 1 minute \(o_0)/
      Hehe, entirely not the best to make an FPV cam :)

    • @peterschets1380
      @peterschets1380 Год назад

      @@Bismuth208 Ow, and if you send 5 fps, can you use a pasive cooler?

    • @Bismuth208
      @Bismuth208 Год назад

      @@peterschets1380 Hi! Well, i've tested ESP_CAM with 80MHz CPU freq. and 5fps limit at max Tx power (19.5dBm) for 20mins. With a room temp. at +24C it heated up to +50±2C. (Measured with non calibrated DIY thermal camera). Also, one heatsink (10x10x10mm) was attached to ESP module and another on top of AMS1117 voltage regulator.
      So, yeah, passive cooling is possible.

  • @daveb7999
    @daveb7999 Год назад

    Thanks Gary, great comparison, well explained. I'm curious how the 'Arduino Nano RP2040 Connect' would do in this "Battle Royale". My guess is that it would be close to the Raspberry Pi Pico, but not sure. Any ideas?

    • @GaryExplains
      @GaryExplains  Год назад +1

      I suspect it would be close to the Pico since they have the same processor. However I am measuring the board current, so if the Arduino one has a more sophisticated board then it could draw more current.

  • @jyvben1520
    @jyvben1520 Год назад +1

    presented with double efficiency

  • @AmauryJacquot
    @AmauryJacquot Месяц назад

    you could have overclocked the pico via an API call

  • @TomLeg
    @TomLeg Месяц назад

    In the mAh chart, the differences are 2% and 5%, not very significant.

  • @olafschermann1592
    @olafschermann1592 Год назад

    Are there boards with the same CPU that are more power efficient (because of better regulator, …)

  • @theugobosschannel8466
    @theugobosschannel8466 Год назад

    Good video Garry. Have you had a chance to play with the ESP32-S3?
    I want to know if migrating an Arduino ESP32 project to the ESP32-S3 is straightforward.
    Either way, ill be working on that this week to find out for myself.

    • @GaryExplains
      @GaryExplains  Год назад

      I have used the S3 while making this video. Anything in particular you wanted to know?

    • @GaryExplains
      @GaryExplains  Год назад +1

      Ah, I see your edit now. You should be able to run your Arduino project on the S3 with no alterations, assuming the pinout is the same on the new board.

  • @robingrosset6941
    @robingrosset6941 Год назад

    Hey Gary, nice video. The RPI Pico W has a configurable clock speed up to about 400Mhz. You could set the Pico to 240MHz to exactly match the ESP32 boards. I usually run the clock on the Pico at application specific speeds for example HD Video output needs specific speed depending on resolution. I suspect higher clock speeds might be less power efficient but faster to complete your test. I wonder how this might impact things? 😬 as always great content

    • @GaryExplains
      @GaryExplains  Год назад

      Yes, I already did that in a previous video, no need to repeat myself.

    • @robingrosset6941
      @robingrosset6941 Год назад

      @@GaryExplains This video compares performance and power consumption, in your previous video does it show click speed changes does not change power usage? Can you share your prime factor code so I can test this?

    • @santosvella
      @santosvella Год назад

      @@GaryExplains bench-marking with different clock speeds is a bit misleading though.

    • @GaryExplains
      @GaryExplains  Год назад +1

      @Robin Grosset Yes clock speed changes the power usage, as I show here: ruclips.net/video/XJawv8xGtX4/видео.html

    • @GaryExplains
      @GaryExplains  Год назад

      @rob d I don't understand. I show the performance and the power usage (across several videos now) at the default clock speed and at overclocked/underclocked frequencies. Are you saying that if I have an i7 Intel CPU I can't compare it to an AMD Ryzen 7 CPU if the clock speeds are different?

  • @heliosak
    @heliosak Год назад

    Hey Gary, can you do speedtest G for Galaxy Z Fold 4 vs iphone 14 pro/max?

    • @GaryExplains
      @GaryExplains  Год назад

      Sadly no. Speed Test G is on pause, it wasn't popular.

  • @yuai339
    @yuai339 Год назад

    esp32 c3 is the risc v single core, and the frequency is low. maybe you can have a test for risc v controllors.

    • @GaryExplains
      @GaryExplains  Год назад

      I tested the ESP32-C3 in the previous video in this series.

  • @thibdub2752
    @thibdub2752 Год назад

    What is the efficiency with Wifi enabled ?

  • @edgejayronneaguilar573
    @edgejayronneaguilar573 Год назад

    Esp32 with 9sec, 87mA
    Pico with 20sec, 38mA
    Esp 2.22 times faster, devide the 87mA with 2.22 To make it even, its gonna be 39mA, So for me same efficiency😁

    • @GaryExplains
      @GaryExplains  Год назад

      Which is what I show in the video, but you are using rounded numbers (i.e. it isn't 9.0 seconds for the ESP32, etc).

  • @lovemadeinjapan
    @lovemadeinjapan 5 месяцев назад

    How would a Teensy 4 do in this test?

    • @GaryExplains
      @GaryExplains  5 месяцев назад

      That is a good question. Of course there are several different models with different CPUs. Unfortunately they are hard to get hold of, very USA-centric sales.

    • @lovemadeinjapan
      @lovemadeinjapan 5 месяцев назад

      @@GaryExplains Hard to get Teensy's? Here (NL) most arduino-like webshops have them in store, I do see half of them have a little delay in shipping right now, but also quite a few options with stock.

    • @GaryExplains
      @GaryExplains  5 месяцев назад

      Could you please suggest a good European website for them, I have wanted to get some for quite a while but the price and/or availability has always been a problem. If RUclips doesn't let you post a URL directly then just spell it out and I will google the store. Many thanks!

    • @lovemadeinjapan
      @lovemadeinjapan 5 месяцев назад

      @@GaryExplains I get them at Tinytronics. They have most in stock right now.

    • @GaryExplains
      @GaryExplains  5 месяцев назад

      Thanks, much appreciated. Unfortunately the cheapest is €27.50, which I think is quite expensive for a microcontroller board. The Pi Pico is more than 3 times cheaper.

  • @MUHAMMADYAWARIFRAHEEM
    @MUHAMMADYAWARIFRAHEEM Год назад

    Can you also test stm32 for fun

    • @GaryExplains
      @GaryExplains  Год назад +1

      I tested some STM32 boards in previous videos in this series.

    • @MUHAMMADYAWARIFRAHEEM
      @MUHAMMADYAWARIFRAHEEM Год назад

      @@GaryExplains i will going to see it 👍

  • @MUHAMMADYAWARIFRAHEEM
    @MUHAMMADYAWARIFRAHEEM Год назад

    Runs more fast in micropython compared to c++