The guy with the Swiss Accent - Smashing the Arduino learning curve into a pancake since Video #1.
@AndreasSpiess4 жыл бұрын
Thank you!
@Bravo_L Жыл бұрын
The guy with the Swiss accent knows alot of cool things for sure 👍
@iforce2d4 жыл бұрын
Depending on what you're making, the larger memory of the ESP32 can be a HUUUGE win, probably should have been given a mention in your summary
@AndreasSpiess4 жыл бұрын
Thanks for the addition. Coming from the ESPs I did not think too much about memory. Maybe I will miss it when I do more with STM32... BTW: Did not see a Video since a Long time on your channel. Always love them!
@Stopinvadingmyhardware Жыл бұрын
@@AndreasSpiessstop the pill shit. These people don’t even care what they did to our lives
@bananaman2495 Жыл бұрын
@@Stopinvadingmyhardware what?
@Stopinvadingmyhardware Жыл бұрын
@@bananaman2495 Nobody asked you a damn thing
@mattmurphy7030 Жыл бұрын
@@Stopinvadingmyhardwaresomeone needs their pills…
@anvz64 жыл бұрын
Atvantages of stm32: it can act as USB keyboard, serial, even as USB storage... All at the same time if needed.
@AndreasSpiess4 жыл бұрын
True. I did not mention this fact explicitly. I only used this feature for upload.
@ami6packs4 жыл бұрын
@@cambouiscom it supports hid.
@ami6packs4 жыл бұрын
And DMA too. It makes coding a lot easier in case of data sampling e.g. ADC Samp.
@arduinoguru72334 жыл бұрын
@@cambouiscom HID works on it .
@crosswick4 жыл бұрын
Also, the F105 and F107 have USB-OTG functionality (as do some more expensive ones)
@beauslim4 жыл бұрын
You always seem to know exactly what I'm wondering about. Thanks so much for the comprehensive comparison.
@AndreasSpiess4 жыл бұрын
You are welcome!
@RTmadnesstoo4 жыл бұрын
I always wait a while to watch your videos so the comment section can fill up. Sometimes the comments are almost as good as the video. Almost. Thanks for your efforts.
@AndreasSpiess4 жыл бұрын
You are right. I am proud of my commenters. They know much more than me alone.
@RTmadnesstoo4 жыл бұрын
@@AndreasSpiess Well, nobody has taught me more than you. Thanks, again.
@EdFrench_uk4 жыл бұрын
Most of the "Blue Pills" have an incorrect resistor, which means the USB interface wont be recognised on a lot of machines (I think it depends on your PC's USB driver chip). I think there is also some software problem as I haven't been able to get it to work consistently even when I fix the bad resistor.
@giorgioboiero4 жыл бұрын
The problem with the USB is sometime related to the use of clones of the STM32 chip , not only the wrong USB resistor www.cnx-software.com/2020/03/22/how-to-detect-stm32-fakes/ List of STM32 compatible chips www.richis-lab.de/STM32.htm A good work around is to upload the firmware using the ST-LINK and then upload an USB HID bootloader github.com/Serasidis/STM32_HID_Bootloader
@AndreasSpiess4 жыл бұрын
Thank you for the hint. I saw a remark about that resistor, but have no blue pill.
@cbm80amiga4 жыл бұрын
@@AndreasSpiess In most cases "wrong" resistor doesn't cause any issues. At least I tested it on 9 computers I have at home - USB works as expected.
@marcovalenti26214 жыл бұрын
@@giorgioboiero where may i find a "healthy" Blue Pill ( For Healthy i mean that it doesn't have problem with HID)? (sorry for my bad english)
@TomaszStachewicz4 жыл бұрын
@@marcovalenti2621 most new sold blue pills now have corrected usb pullup resistor. check out the photo of the boards underside, it's resistor r10. it should read 152 (1.5k ohm) and definitely not 103 (10k ohm)
@drbra1n4 жыл бұрын
STM32F4xx has FPU, USB OTG working in both, device and host mode (some MCUs have 2 ports), support for external FLASH/SRAM/LCD screen, internal RTC clock, support for SD cards. The debugging capabilities are also awesome - breakpoints, single stepping, memory & register view, SWO tracing. AFAIK, ESP32 can be debugged too :)
@AndreasSpiess4 жыл бұрын
You are right. I made a video about debugging the ESP32. And I should get some F4 boards...
@jessiegashler4273 жыл бұрын
A genuinely clear and concise comparison of the two. I'll be subscribing to your channel based solely on this video. Fantastic work.
@AndreasSpiess3 жыл бұрын
Welcome aboard the channel!
@TimSavage-drummer4 жыл бұрын
The one big advantage I found for the STM32 is the ease at which I can set up a hardware debugger with the STM32Cube IDE. The STM32 Discovery boards are great for prototyping and cheap, I only use ESP boards now for wifi connectivity. Have a black pill driving my DIY modular synth as a MIDI to CV converter, the hardware debugger came in really handy for developing that.
@AndreasSpiess4 жыл бұрын
You are right: A debugger is a good thing. I probably will try to use it, but with platformIO.
@Brandon-rc9vp3 жыл бұрын
Thank you for freely sharing such great content. It is intellectually interesting, quirkily entertaining, and best of all technically informative for us trying to get back to our roots in electronics and learn how to operate todays newfangled gadgets :) If I had to guess I would say you are one of those rare individuals that know what an exciter is and at the same time can hold your own at any maker fair today. Good on you sir!
@AndreasSpiess3 жыл бұрын
Thank you for your kind words! And enjoy your hobby (again). Quite a few of my viewers report the same. We live in a beautiful (electronics) time.
@EdFrench_uk4 жыл бұрын
I like both, I haven't looked much at power consumption on the stm32- that might be something where it wins a bit? I don't think anyone has done a video on stm32 sleep modes and power consumption with Arduino?
@AndreasSpiess4 жыл бұрын
Power consumption is also on my list...
@edwitte47524 жыл бұрын
I believe Stm32 supports DMA for peripherals (ADC/ I2C etc). This can free up the processor for other tasks... Maybe add this one to the 'to do' list?
@damny0utoobe4 жыл бұрын
@@AndreasSpiess STM32 also has the L0 lineup which is the ultra low power line. This one can run on a small battery for years. It's much more energy efficient than ESP32
@mxmxjrjr4 жыл бұрын
The most kind heart to make this video
@AndreasSpiess4 жыл бұрын
Unfortunately I do not understand :-(
@mxmxjrjr4 жыл бұрын
@@AndreasSpiess someone like you who have resources showing knowledge like this on internet makes a lot of different for people who want to learn and only have youtube. If some day i want to build something and need to compare what you did, i do not need to try and error by buying each of those. Now i know what to choose for my project all thanks to your video. Great job you have done.
@derecwilsom45464 жыл бұрын
that little hand makes me so happy, i giggle every time I see it!
@jankomuzykant18444 жыл бұрын
Deadpool hand ;o)
@derecwilsom45464 жыл бұрын
@@jankomuzykant1844 lol now i like it even more!
@victorlacerda96594 жыл бұрын
The blackpill stm32f411 or stm32f410 both was floating point hardware and a faster clock speed than the bluepill. This make thinking if stm32f4 could be a better choice for floating point calculation.
@AndreasSpiess4 жыл бұрын
True! The Blackpills are in the mail...
@m0rph1714 жыл бұрын
@@AndreasSpiess Would be really interesting to see the calculation result for the f4 blackpill!
@rcfreakamit4 жыл бұрын
Great video! For me though, the main motivation for going with stm32 over arduino or esp32 is the much more capable (and more difficult to learn) STM CubeMX config suite with the STM32 eclipse IDE, with St-link debugger, rather than the difference in sheer hardware capabilities.
@AndreasSpiess4 жыл бұрын
Good point!
@evabaroni66934 жыл бұрын
System workbench for STM32 (SW4STM32) by AC6 tools with cubeMX is my go to for these CPUs. Sorry but can't call Arduino an IDE after using SW4STM32.
@RustedCroaker3 жыл бұрын
@@evabaroni6693 Did you tried Keil by any chance?
@trevorvanbremen47184 жыл бұрын
At around 10:30-11:00 you talk about the (comparatively) s-l-o-w interrupts on both STM32 and ESP32. However, your example code makes use of the digitalWrite() function with the ISR. My experimentation on the Arduino Due (which is admittedly neither STM32 nor ESP32 - It's an ARM based ATMEL/Micrchip) showed that the digitalWrite() function is disgustingly s-l-o-w. I am willing to bet that your 2.5uS to 3uS of interrupt latency would drop to nanosecond levels if you were to emply direct port writes instead.
@AndreasSpiess4 жыл бұрын
You are right with the STM. About 50% of the time is used for the digitalwrite. I posted the measurements in another comment.
@NotMarkKnopfler4 жыл бұрын
Great video. What I would really like to see is an STM32 video showing how the low power modes work. Particularly wake-on-interrupt. I would really like to see that. Thanks again, Andreas.
@AndreasSpiess4 жыл бұрын
Power consuption is stuff for a whole video...
@ch940864 жыл бұрын
ST has some nice dev boards with the STM32L low power series. These dev boards (discovery) have a separate processor to measure chip power down to nanoamps, and there are tutorials demonstrating all the power modes. After wake, it can read the sleep power and show on the epaper display.
@RRits574 жыл бұрын
Would love to see this comparison as well
@nicolaw68294 жыл бұрын
I am a bit confused about the code on @11:38, and I think that this might not actually be adequate as integer benchmark. On each iteration, you set a pin as output, then you toggle it, then you set it as input (I think without any PU/PD), and you read it 3 times. If it is high, then you perform a multiplication (single cycle in a CM3), otherwise a remainder operation (the division takes 2-12 cycles on CM3). This code has some issues in my opinion: 1) If the pin is left floating, then it might perform randomly divisions or multiplications, depending on external noise and board layout. 2) Instead, if you force externally a logic level using a pull-up/pull-down resistor, then you are not actually getting the integer performance, as, for instance, the multiplication (and probably the division too) is much faster than the "digitalRead/Write" and "pinMode", functions, as they have a lot of overhead. I think that in this case you are just measuring how optimized is the bsp for a particular board instead. This might explain why a Cortex M3 at 84 MHz (Arduino 2) is more than 2 times slower than a Cortex M3 at 72 MHz (Maple)... (different flash caches on the STM32 and ATSAM3X8E might impact on the speed, but I would not expect a factor 2).
@AndreasSpiess4 жыл бұрын
You are right and I should have corrected this if statement. But I wanted to keep it the same as in the first video. Also because it was not very important for me. Next time I will try to use a better sketch like calculating primes or so.
@RickB3n4 жыл бұрын
I have a suggestion: Try also the ST Nucleo boards, i think it's a good alternative to "blue pill" or other.
@AndreasSpiess4 жыл бұрын
I thought they were bigger and more expensive?
@RickB3n4 жыл бұрын
@@AndreasSpiess I understand, but an original Arduino UNO is more expensive. The ST Nucleo costs between 10 and 40$ For a hobbist it's possible. ST if you read this give me more boards 😂
@anvz64 жыл бұрын
@@RickB3n You can buy an UNO or a mini for 3€
@RickB3n4 жыл бұрын
@@anvz6 It's true, but a chinese copy. They often also use a low quality clone for the atmega 328p.
@SamupamIn4 жыл бұрын
@@AndreasSpiess you can buy stmf407vgt etc boards with more I/0 then mega or due at 10 USD from AliExpress.
@TheAoab503 жыл бұрын
Many thanks again for the great efforts to give us comparison results ready and free.
@AndreasSpiess3 жыл бұрын
My pleasure!
@crckdns4 жыл бұрын
I personally am using the blackpill for smaller projects. Great video as always! Please more STM32 content 😻👍 (we use them also in our flight controllers ^^)
@AndreasSpiess4 жыл бұрын
I think I will have a look at the interest and decide about the future plans.
@giorgioboiero4 жыл бұрын
Some information about the Black Pill STM32F4x1 from the chinese designer github.com/WeActTC/MiniF4-STM32F4x1 It's now supported by STM32Duino but it's not yet integrated the USB Bootloader of WeAct
@happysingh-gk2dj2 жыл бұрын
Hiii brother can u send your email.i want to learn black pill
@alfredopreciadomolina15764 жыл бұрын
wow, just what I was looking for, you can't ask for a better explanation, as always, master.
@AndreasSpiess4 жыл бұрын
Glad you liked it!
@sharana.p59214 жыл бұрын
My favourite is STM32. Please make video to program esp8266 using embedded c or bare metal programming. Thank you.
@AndreasSpiess4 жыл бұрын
I will stick to the Arduino IDE :-( But I did a video about assembler programming of the ESP32
@sharana.p59214 жыл бұрын
@@AndreasSpiess Oh ok thank you Mr. Andreas and another one is there, what about making a RF circuit like 435 MHz 4 channel or 8 channel circuit from scratch? Would you make it si, please.
@lohikarhu7344 жыл бұрын
I missed a comparison of power consumption when running benchmarks... Also, just a note that the differences in non-floating-point are quite a bit smaller than the clock speed difference. Thanks very much for this work, i especially like the walk-through on software setup. Alles gute, MfG'n
@AndreasSpiess4 жыл бұрын
I was also astonished about the small difference... This was an introduction and, depending on the response, I plan to do something with power consumption in the future.
@lohikarhu7344 жыл бұрын
@@AndreasSpiess very good comparison, and i know that you are guided by comments, so it's clearly a fine response to those... as you probably note, i'm a bit of a 'picky' one on some things ;-) i kind of wonder at these microsecond(s) interrupt times, it would, perhaps, be interesting to see what code the compiler generates for IRQ handling, how much is stacked on entry. With 80 MHz clock rates, a fast IRQ should be sub-microsecond.... maybe a bit too deep for the average user?
@AndreasSpiess4 жыл бұрын
I posted the measurements done for digitalwrite in another comment. It takes nearly half of the time...
@wingedrhinotv4 жыл бұрын
This is the first thing I'm seeing after waking up late on a Sunday, having spent the whole night dreaming about pitch detection algorithms. Wish I was a little more normal 😂
@AndreasSpiess4 жыл бұрын
Nice you remember what you dreamed of. I never remember :-(
@MiniLuv-19844 жыл бұрын
I think the correct word is fretting rather than dreaming.
@hamjudo4 жыл бұрын
An FFT is a common way to get a list of approximate frequencies out of a microphone or other noisy analog source. I've never needed very precise frequencies, so I haven't any experience with those algorithms.
@stephenborntrager65424 жыл бұрын
FFT is probably better, but one simple method that I know if is to set a window of a several thousand samples (maybe 4x the max frequency you care about), measure the time between peaks, and then average the periods. 1 / period (seconds) = frequency (Hz). From there, tables can be used to lookup "notes" ie A4 = 440Hz. I don't know how well it works, since it was a very crude method and I never actually used it. Probably won't work with lots of harmonic content. Might need to weigh the sample periods by the amplitude or something... or add some sort of hysteresis to keep the output stable... Great. Now I'M stuck thinking about them!
@williamdunn50814 жыл бұрын
Normal is totally overrated.
@stefkpl4 жыл бұрын
@15:04 floating point is better on ESP32 because STM32 tested was a cortex M3 mcu @72Mhz (ESP32 run @240Mhz). If you use a black pill, I think the result will be better. It's cortex M4 @ 100Mhz but the price is closer to the ESP32.
@AndreasSpiess4 жыл бұрын
You are right. But as I said, I had none available. Maybe later...
@mr.meticulous12414 жыл бұрын
Exactly the video I was waiting for! Thanks Andreas :)
@AndreasSpiess4 жыл бұрын
Glad you enjoyed it!
@santorcuato4 жыл бұрын
Thanks Andreas. I do mainly IoT so WiFi is a must, even bluetooth to read some sensors, so... The ESP32 is not perfect but as a maker I focused on it and it works for me. Nevertheless it's always interesting to know some other alternatives to right choose in the future. Good job!
@AndreasSpiess4 жыл бұрын
That was the purpose of the video. To know the choices.
@AttilaAsztalos4 жыл бұрын
If one needs WiFi there's simply no alternative to the ESP32 series. On the other hand, not a single project I did ever needed WiFi and at that point that RTOS and WiFi stack preempting everything you do is just a liability.
@bobblaine14374 жыл бұрын
Thank you for the very useful video. I've been curious where the STM32 fit in the micro controller pecking order, and when to use it.
@AndreasSpiess4 жыл бұрын
There are many more STM chips. I assume I will cover a few more to get an overview.
@theboots394 жыл бұрын
Thank you for this video. I was trying to answer this exact question for the last week. I've been using esp32, but I rarely have any need for internet connectivity. At the moment, I don't think it's worth changing over, but definitely a consideration for future projects. Perfect timing!
@AndreasSpiess4 жыл бұрын
Without Wi-Fi the STM32 boards are a good selection, I think
@curlybrace66944 жыл бұрын
bluepill has software floating point implementation. esp32 has hardware. stm32f4 also has hardware floating point. xtensa is a very slow core, compared to cortex. even having much faster clock, it wins only a little bit in speed.
@AndreasSpiess4 жыл бұрын
You are right with the speed difference: It was very small for port I/O and integer. Maybe I will do some tests with the F4 when I get it.
@thegittubaba4 жыл бұрын
@@AndreasSpiess can you run ESP32 at slower clock? It'd be interesting to see the comparison when both are running at same clock frequency.
@ragesmirk4 жыл бұрын
@@AndreasSpiess Use these boards: www.aliexpress.com/item/4000103610226.html I have them they are very high quality
@Cracked1ce4 жыл бұрын
@@AndreasSpiess The F4 black pill is a beast. i am doing floating point calculations for engine management and the speed difference is astronomical. it takes nearly 700 clock cycles for the F1 for a floating point multiply or divide whereas it is instantaneous on the F4.
@happysingh-gk2dj2 жыл бұрын
@@Cracked1ce hii brother can you send your contact or email I facing problem in blue pills ..thankyou
@Promilus19844 жыл бұрын
Comparison of ESP32 with really old Cortex-M3 based STM32F1 proved bluepill is pretty decent hw. Blackpill is even faster. Usually there's nearly 50% performance gain just by using higher clock rate and STM32F4 does have integrated FPU as well so doesn't suffer such penalty as STM32F1. Both flash and ram are significantly bigger as well than old F1 and architecture is based on Cortex-M4 so with additional dsp instructions. That makes it pretty big improvement. I hope you will be so kind to repeat tests once you get hold on STM32F411 based black pill :)
@AndreasSpiess4 жыл бұрын
You are right. But I think, speed and flash size are not real limitations for most makers. This is why I did not focus on those features. The FPU is a game changer if you need it. This is why I mentioned it. I have no plans for the moment, but this easily can change ;-)
@moudi00824 жыл бұрын
stm32 f4 and f7 series have built in FPU for floating point operations
@AndreasSpiess4 жыл бұрын
You are right!
@shabbarvejlani4 жыл бұрын
Thank you Sir for your analysis ! Appreciate!
@AndreasSpiess4 жыл бұрын
My pleasure!
@mrrboo4 жыл бұрын
Thx for the interesting video. I think it's also a matter of "makers" VS "pro", in a pro embedded development environment STM32 is the king (with ST official boards, mbed dev environment for example more than Arduino) and ESP + Arduino rules the makers market. In my company we use a lot of STM32 dev boards, you can find official STM32 "Arduino nano format" boards with Cortex-M4F for 10€ like the NUCLEO-L432KC
@AndreasSpiess4 жыл бұрын
You are right about the different environments. For professional usage, you usually go with the supplier tools. On this channel, most users use Arduino IDE because they do not use STM chips as a first choice.
@DanDrown4 жыл бұрын
Thank you for creating this nice tutorial on the STM32 boards For the ADC, the Vref channel is not used automatically. You can read from it using readVref on the ADC object, but it looks like the code is incomplete.
@AndreasSpiess4 жыл бұрын
Thanks for the info!
@WacKEDmaN4 жыл бұрын
apples vs oranges... ESP32 has wifi and bluetooth... STM32 does not...it all depends on the use and features needed..
@AndreasSpiess4 жыл бұрын
I thought I covered these things in the video...
@WacKEDmaN4 жыл бұрын
@@AndreasSpiess sorry mate..i deleted that bit after i seen you covered it! :P
@zoli114 жыл бұрын
Not quite. I have been doing stuff with ESP32, but this comparison showed me that even if I don't need wifi, in most cases I don't miss out if I just keep using those, and save myself the trouble of getting familiar with a different setup.
@rondlh204 жыл бұрын
15:00 It would be worth mentioning here that the ESP32 has much more ram and flash than the STM32 Arduinos (Uno, Nano etc.), it's shown at 4:00, but should be part of the conclusions too
@AndreasSpiess4 жыл бұрын
You are right.
@tigercat38644 жыл бұрын
I abandoned the Blue Pill because there's no reliable supply of legit or even consistent boards. Too many of them are fakes or bad clones that don't work reliably. It's ESP8266/ESP32 & Teensy FTW.
@AndreasSpiess4 жыл бұрын
Thank you for sharing your experience!
@Aerrow624 жыл бұрын
There are F versions of STM32 series using M4 cores that have hardware floating point support.
@AndreasSpiess4 жыл бұрын
True. The blackpill in the Mail will be such a F4 version
@Aerrow624 жыл бұрын
@@AndreasSpiess I personally prefer the STM32F303 series. Have full float and are M4 cores. Really cheap. I love the IDE generating initialization code for me. Life is so much simpler with it and the HAL is pretty well written.
@cwbh104 жыл бұрын
Lol I just replaced my "Blue Pill" with an ESP32 on a project I'm working on, since the community support for the ESP32 is just better
@AndreasSpiess4 жыл бұрын
I think you are right with the community.
@cwbh104 жыл бұрын
@@AndreasSpiess In my specific case I was trying to use the NRF24 modules, and it worked flawlessly with the RF24 library on the ESP32 and not the STM32. I figured I could get it working, but for the project the time is important and if it just works, I'm going to go with that device (mostly)
@danielegger64604 жыл бұрын
Outside of Arduino the support and community for Cortex-M MCUs is way beyond the support for ESP32 and AVR MCUs combined. I'm actually slightly disappointed that Andreas Spiess fell back to using the lame Arduino instead of going for platformIO which would have allowed for a much better comparison.
@Vicolaships4 жыл бұрын
Give libopencm3 a chance, it's a great hardware library with a nice community and documentation (libopencm3.org/docs/latest/stm32f1/html/modules.html ). STM32 for Arduino is a little bit dead and the code quality is poor. libopencm3 for Blue-Pill examples here: (C or C++, project configured with CMake): gitlab.com/VictorLamoine/libopencm3_bluepill_examples. You can pick any IDE you like that supports CMake, I like KDevelop. "Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC" (Warren Gay) book is a great way to get started with practical examples and explanations. If you want to do some real-time (detailed in Warren Gay book) check-out: gitlab.com/VictorLamoine/libopencm3_freertos_bluepill_examples Feel free to reach me for help!
@AndreasSpiess4 жыл бұрын
@Daniel: Can you contact me to discuss the integration into platformIO?
@a1nelson4 жыл бұрын
Thanks for all the good work you do channel. I’ve learned a lot from it and look forward to new videos. This one, unfortunately, was the rare exception when I cannot really agree with your conclusions. The main issue is that the STM32 model chosen, while being very cheap and popular, isn’t really in the same class as the ESP32. In STM32F4 or STM32L4 would have been more appropriate, since they have similar clock speeds and feature an FPU (among other things). The other thing is that, in the absence of at least two excellent voltage references, pretty much all ADCs need to be calibrated. Their output magnitude and slope are relative, not absolute - despite what the datasheets imply. As an aside, neither board has very much in the way of decoupling, so noise is going to be a significant factor too. STM recommends a ferrite bead or independent decoupling for the VDDA input, but the blue pill and other low-cost boards do not have those parts. Based on the form factor, I doubt the ESP32 boards have them either. If the data points for the comparison were not collected under the same conditions (at about the same time), that adds a lot of uncertainty. Just things to consider. Thanks again for all your hard work.
@AndreasSpiess4 жыл бұрын
You are right with the FPU. I will look at it in a future video. And about noise reduction on boards: The ADC of the Maple Mini was better than the ESP32 in the configuration bought by my viewers. And this is what counts on this channel. I am sure all boards could be improved if buyers would see the differences pay a little more. But platforms like AliExpress support a race to the bottom price. So, if you want a decent board, you have to make your own. Which is also not too complicated anymore.
@a1nelson4 жыл бұрын
Andreas Spiess Thanks for your quick and thoughtful reply. What you said makes very good sense. It caused me to check my assumptions. The first is that, as one moves beyond just flashing an LED, the cost of the MCU board becomes a smaller and smaller part of the total system cost. Using a board with better ADCs or more IO pins may be easily justified by eliminating the need for IO expanders, external ADCs, more complicated software, etc. But, importantly, not every project requires that. You mentioned checking battery voltage, which is a good example of a situation when high accuracy isn’t critical. My second assumption was related to your final comment. Although I have a handful of STM dev boards, Teensys, etc., for non-trivial projects, I often just roll a new board. And, although it’s pretty easy to do so, it’s definitely not for everyone. So, after a bit of reflection, I do appreciate your position much better. Thanks again. Be well.
@Ottmar5554 жыл бұрын
@@a1nelson Do you have the reference about using ferrite in the VDDA input? I'm having a little more noise than I'd like for my application in my ADC, and a moving average is not a good option, since I need fast code. Do you have any suggestions?
@breedj14 жыл бұрын
When using the esp32 be sure to use float and not double when optimizing for speed. Using floats is about 10 times faster. The floating point unit is not used for doubles.
@AndreasSpiess4 жыл бұрын
Thanks for the info!
@yunshi77863 жыл бұрын
Thank you very much for such a detailed and clear comparison. Since they are all pretty cheap, I’ll buy all of them to have a try and compare the outputs in my projects.
@AndreasSpiess3 жыл бұрын
You are welcome!
@unclejoe83102 жыл бұрын
Where the hell do you get STM32 chips right now 🥴
@newburypi4 жыл бұрын
Yet again, both useful and interesting. Thank you.
@AndreasSpiess4 жыл бұрын
My pleasure!
@MithatKonar4 жыл бұрын
A word of caution around "Black Pills": There are (at least) two different strains of products using the "Black Pill" moniker out there. Before the current crop of STM32F4-based Black Pills were a thing, RobotDyn started making several modules based on the STM32F1 Blue Pill and referred to them as Black Pills. These are very good STM32F1 modules -- in black rather than blue. They are not what the cool kids mean when they talk about Black Pills.
@AndreasSpiess4 жыл бұрын
I odered boards with an F4 chip and hope I will get the right chips..
@leonardoh61403 жыл бұрын
@ 7:14 a wise man said: When you "pluck" the usb "pluck"... Just kiddind, nice video as always!
@AndreasSpiess3 жыл бұрын
:-)
@muflah4 жыл бұрын
It was hard for me to convince my co-workers to look at esp32. Earlier they were using stm32 with esp8266 in master/slave configuration. Now the go-to choice is esp32 for most projects.
@AndreasSpiess4 жыл бұрын
If you need connectivity, the ESP32 is for sure the better choice.
@fullsolutionslab4 жыл бұрын
Dear Andreas. As you told us in another video from you, you are a true swiss biker :) and I dont mean a bicycle-biker but a motorcycle biker! because I'm a Swiss biker too, it would be cool if you can make a motorcycle project. For example to collect multiple data by riding like speed, real-time, position (GPS), temperature, humidity, pressure, angle of the motorcycle, acceleration, break way (how long it takes), distance from the wheels to the chassis (to record if the street is rough), power consumtion an so on. then collect all the data in an excel sheet and do some machine learning to evaluate your driving style and to see if your driving style is good or not. then of course with real time online update with a GSM module and connect all sensors to each other by wifi or something similar like BT. The whole system could be controlled via a voice regonition interface or a gesture sensor and all data could be displayed on a TFT display or maybe a Nextion. And to round up everything an ESP32-Cam could record everything on your way. What do you think? I'm creating something similar at the moment, but it would be realy cool to see how you would do a project like this ;) I hope you stay healthy and keep corona free :o) kind regards, delf from Bern
@AndreasSpiess4 жыл бұрын
As you might know, I am an old man and therefore I own a Harley: So most of the things you want to measure are not of interest to me anymore ;-) The only thing I measure is fun per time... So you need a younger, more ambitious guy for such a project. BTW: I have a Hero on my bike to keep the impressions of our journeys.
@iforce2d4 жыл бұрын
Many of those things could be recorded pretty well by just slapping an Ardupilot board on :)
@fullsolutionslab4 жыл бұрын
@@AndreasSpiess Come on Andreas, you are not an old man yet. Take a look on all miracles you are doing, inventing and sharing with us. I think because of your grey hears you look older than you are ;o) I'm just joking :) I can fully understand, that you arent interessted in a motorcycle data capture project. Thats ok. The reason, why I have proposed this project is, because I miss sometimes some realistic applications in your nearly perfect video's. Everytime you explain very complicated stuff so good, that even the biggest noob can understand what you are teaching. The part, that you are allready doing for long time has nothing on it that I could do critics on it. But unfortunely I often have not enough ideas how to use your content in real life. Maybe if you like you could make a project with a real life application/use. You have done a lot of LoRa instructions and presentations. Some of your LoRa instructions i have successfully achieved. Now I have a LoRa Gateway and some working LoRa modules. But what can I do now with them? For what should or could I use it? Very nice to have, but till now useless for me :) But I had a lot of fun to replicate your instructions.It was very cool ;) Yeah, maybe you have more ideas than me for the future. I hope you stay healthy and I wish you only the best :) Kind regards
@AndreasSpiess4 жыл бұрын
I agree that I often leave the imagination to my viewers. But this is how I am built. My firm belief is, that the wish is the first thing in a project, especially in hobby. I have quite a few videos where I show how I use it (for example the hacked garage door opener below the saddle on my Harley). But often I only want to spark the imagination of my viewers. LoRaWAN is a special case because it is a technology with a lot of enthusiasm but not a lot of applications for the average Maker. I liked it because I am a HAM operator and love RF stuff. I also thought I can help a lot of people with my knowledge in these areas.
@KerbalLauncher4 жыл бұрын
I really never understood why people don't just buy nucelo boards off digikey. They come with an embedded st-link! The PSOC6 prototyping kits are a great alternative to the ESP32 as well, much lower power consumption. The H7 series are really powerful and under $30.
@bm8308104 жыл бұрын
ESP32 adc's where not that bad, you had a few bugs/bad practices in you filtering, I think. --- are both stm32 and esp32 filter coefficients the same at 9:10?
@AndreasSpiess4 жыл бұрын
Maybe you are right. However, I am not the only complaining. And filtering is not sufficient to correct 0.91 to 1 volt...
@bm8308104 жыл бұрын
@@AndreasSpiess I also commented on your last video, maybe this error is the result of accumulation of round of error on the filter you are using, I've seem similar behavior for large filtering coefficients before, also for noises like that I recommend using median filter instead of averaging (there is a great library available for this)
@DavidCaplinGIS4 жыл бұрын
Is there a plethora of weird and wacky STM boards? Like a soil moisture probe that is also a LoRa node?
@AndreasSpiess4 жыл бұрын
I think the STM32 is more used in the professional environment.
@electronic79794 жыл бұрын
Very helpful video 👍
@AndreasSpiess4 жыл бұрын
Glad you think so!
@TristanGomez4 жыл бұрын
I've been playing around with the NRF52832 and the low power BLE capabilities mean I can have it running on coin cells without much problems! It's the younger brother (sister?) of the NRF52840 found in the new Arduino Nano 33 BLE and also programmable with the Arduino IDE. I'd love to see more of the this Nordic Semiconductor chip in your videos :)
@AndreasSpiess4 жыл бұрын
Me too!
@triggerthesound7674 жыл бұрын
You did one video on circuit python and yet you seem determined to stick with the Arduino IDE. why is that? It seems really slow and awkward and terrible. Is it just because it is by now so widely used? If so then why wouldn’t we keep using magnetic tape media, to use one example.
@AndreasSpiess4 жыл бұрын
Which IDE should I use in the future according to your experience? And maybe you read the comments in the Micropython video if you want what would happen to this channel if I would switch to it :-(
@triggerthesound7674 жыл бұрын
Andreas Spiess sure, will do. I would just like to see a video from you using micro python or circuit python, or Make:code, just to see what your opinion is of something other than Arduino.
@riscy008 ай бұрын
Wondered why cubIDE and Mx is not covered
@AndreasSpiess8 ай бұрын
Because I do not use proprietary IDEs on this channel.
@riscy008 ай бұрын
@@AndreasSpiess That fair, Visual Code?, I just set up ESP32-C3 on Visual Code. It supports both STM32 and ESP32.
@riscy008 ай бұрын
@@AndreasSpiess Okay, Visual Code supports both ESP32 and STM32. I just installed an extension from ESP32, which looks like a very complete package. I just ran a few demos.
@riscy008 ай бұрын
I found out it may work out better on Visual Studio for debugging, which is a major shift away from being eclipse-based CubeIDE/MX. At the moment, I am reading through the IoT part with ESP32-C3 and seeing how this worked out in Visual Code and maybe with Platform IO.
@rcpoisond4 жыл бұрын
Regarding ESP32 ADC, have you tried measuring using battery? A quick test shows that I get very stable values when running my ESP32 from a battery and measuring the battery via a voltage divider compared running/measuring from a DPH5005. Maybe the noise is because the ADCs have a much lower sampling time and thus pick up the power supply noise?
@AndreasSpiess4 жыл бұрын
Battery is always good to reduce noise. I used USB for all my tests. Also reducing the sample rate helps a lot. Did you check the linearity?
@rcpoisond4 жыл бұрын
@@AndreasSpiess 'Plotted' a graph a while backand it matches what other people found. it's mostly linear between 0.3 and 3V. Of course since I did it manually it's low resolution. Currently hacking my DPH so I can automate stuff like this ^^
@andys47772 жыл бұрын
Thanks for the great video, but I wouldn refer to STM32F1 as just STM32. STM32 is a huge family, like x64, there is F0 that is even slower and there is STM32H7 that can be clocked at speeds up to 480 MHz with a benchmark performance greater than 1,000 DMIPS, so stating in the table that STM32 is slower than ESP32 on floating point is straight away misleading.
@AndreasSpiess2 жыл бұрын
You are right. But for a comparison I had to chose one of the many boards. I did another comparison video with more STM chips
@silverjohnson31634 жыл бұрын
wifi is important to my projects, it's one of the very cool things about the 8266 and esp32 boards. Thanks for the review
@AndreasSpiess4 жыл бұрын
Same here...
@ivolol4 жыл бұрын
It's great of you to mention the makers of the software/firmware/libraries that enable all the tinkering!
@AndreasSpiess4 жыл бұрын
We all stand on their shoulders and we should know that!
@stewartrv4 жыл бұрын
I like the Bluepill and the newer Blackpill's even more, especially if you get one with the extra memory. For about $5 it's very fast and will also run MicroPython. It's a pity you didn't have the new Blackpill baords yet. I hope you'll do a quick update with them when you get your hands on them. Oh and don't forget to have some USB-C cables on hand the blackpills use that now instead. 73
@AndreasSpiess4 жыл бұрын
I have more and more USB-C cables. That should not be teh limitting factor ;-)
@stewartrv4 жыл бұрын
@@AndreasSpiess I have Android only and so didn't have any USB-C and forgot to order at the same time :) I have a few now though! Of course you can program without a USB-C anyway.
@BluCasper3 жыл бұрын
Thank you for such an amazing content. It was really helpful. Stay safe and have a great day. Best wishes for you.
@AndreasSpiess3 жыл бұрын
You are welcome! I am vaccinated twice already:-)
@BluCasper3 жыл бұрын
@@AndreasSpiess that's great. waiting for your upcoming videos. if possible please make a video how a newbie can program esp with micropython and use AI somehow to make something intelligent.
@AndreasSpiess3 жыл бұрын
This channel is more for the advanced (or at least ambitious) Maker. So you probably will not find stuff for beginners...
@BluCasper3 жыл бұрын
@@AndreasSpiess there are tons of channels for beginners. I like your contents sepcially the comparing. But i think you should make another video comparing different ESPs and different STM MCUs. How good are other ARM products from atmel, TI and other brands. It'd be really helpful. Thanks in advance
@blekenbleu4 жыл бұрын
Thanks; looking forward to a similar comparison for Nordic dongles
@AndreasSpiess4 жыл бұрын
This is definitively on my list!
@franktkalcevic53424 жыл бұрын
Stm32s can do dma transfers which use virtually no cpu. You can get great performance this way. One negative - stm32s don't have eeprom - you can simulate it in flash, but it locks the mcu for a second. Can the debugger be used with the arduino IDE?
@AndreasSpiess4 жыл бұрын
1. The ESP32 has DMA and no EEPROM, too. So no difference here. These features are not often used by makers. 2. The Arduino IDE is a simple tool for beginners. It has no debugging. If you want to debug, you have to use PlatformIO.
@Ramucho254 жыл бұрын
Very interesting video. Many thanks. Have you ever considered testing Teensy boards to make a comparison ? They also used Arduino IDE to be programmed and are good boards too. Regards.
@frankrivers46534 жыл бұрын
I'm a huge fan of Teensy boards too. Their latest one, the Teensy 4.0 (and 4.1) they claim use the fastest microcontroller currently available, 600MHz! Hold onto your hat.
@deangreenhough34794 жыл бұрын
Good work Andreas 😁🏴
@AndreasSpiess4 жыл бұрын
Thank you!
@phymacillustrator Жыл бұрын
Thank you so much, It helped me to understand options to program STM32. Thanks again.
@AndreasSpiess Жыл бұрын
You are welcome!
@jpjude684 жыл бұрын
if i remember correctly, (from forun/errata sheets), the stm32's may have trouble with the ADC due to the integrated PLL which is used to generate the cpu's 72MHz from a simple 8MHz source. Also, it depends how the micocontroller is set at startup : the default configuration is 8MHz cpu clock without PLL.
@AndreasSpiess4 жыл бұрын
Good information. I did not know.
@christianlennertz57804 жыл бұрын
Like always great video. I also like the „Black Pill“. The Stm32F411 is very good in my opinion. What I really like of it, is the integrated USB ports.
@AndreasSpiess4 жыл бұрын
As I said, they are in the mail and for sure I will play with them...
@UReasonIt4 жыл бұрын
The newer Risc-V offerings may be a good thing the look at as well. The GD32VF103 is a little monster of a processor. Built-in floating-point support and a high fast clock rate. It has been fairly easy to use via PlatformIO and the SDK they have. There may be an Arduino like framework for it now, but I have not checked. LillyGo and Sipeed both make a board with the GD32 chip on it.
@AndreasSpiess4 жыл бұрын
There are many cool processors around and these Risc-V ones are for sure interesting. My problem is that I have to produce videos for a big community. So I always have to decide.if the topic would be interesting...
@kanapkazpasztetem4 жыл бұрын
Did you have a look at the Nucleo boards? I've bought one few years ago but didn't really get into STM, it is hard to beat a generic uno/leonardo for quick testing (like when you just want to test some new sensors) and now if I'm going to create some device the wireless connectivity always on the table in some sort so the ESP already having wifi/BT seems like a better choice. The STMs for sure seem to be great if they fit your application but my applications don't fit STMs 😅
@AndreasSpiess4 жыл бұрын
I once used a nucleo board for testing TOF sensors. It was much bigger and, if I remember, also much more expensive.
@TheRainHarvester4 жыл бұрын
There is an archive for the stm32/Roger Clark forums...
I posted the link. Can anyone see it, or is it removed (shadow banned) by KZbin?
@etmoimeme4 жыл бұрын
@@TheRainHarvester Thanks, but why has it been deleted?
@AndreasSpiess4 жыл бұрын
Thank you for the link. I assume the links I googlef were links to his blog, not to his forum.
@TheRainHarvester4 жыл бұрын
@@etmoimeme I could never find why it was deleted. I read that he didn't want to get sued, but I'm not sure why stm, or anyone, would sue him. The forum was so great !
@sullivanzheng95862 жыл бұрын
ESP32 actually has quite fast ADCs with at least 650Ksps speed if using DMA. The problem is lack of documentation to enable this feature. I spent a few weeks hacking and testing this feature. Now I am working on an ESP32 SDR, and I think it is the best MCU for hobbyist to build an SDR, because: 1) ADC with 650 ksps effective sample rate. Sufficient bandwidth to demodulate FM and LORA baseband. 2) dual core + very powerful FPU. No more fixed-point/integer DSP algorithm workarounds. 3) Lots of SRAM compared with similar priced development boards. 4) ESP32 DSP library, integrated into ESP32 Arduino Core v2.0+. Optimized at assembly level and can do FFT 2x faster than arduinoFFT. It has complex number support, IIR, FIR, Matrix manipulations etc. Really amazing. ESP32 really has lots of processing power, and probably the best processing power for the money.
@AndreasSpiess2 жыл бұрын
Welcome to the club! We are already a few who try to use the ESP32 for SDR projects. Maybe you watch my video about a marvellous audio library. It can save a lot of time. NA5Y is one of team. Maybe you watch his channel, too. And I created a Discord channel (sdr-stuff) for us (invitation link: discord.gg/JfgDSa8 ). You have to add https to the address because KZbin does not like links.
@kwazar67254 жыл бұрын
Thanks Andreas. Nice work. Good conclusions. Stm has a higher res adc from specs. Interesting to see floating point comparison though. What about power draw?
@AndreasSpiess4 жыл бұрын
Power consumption is stuff for another video...
@PhG19614 жыл бұрын
Thnxs for this very well explained overview. A nice wrap up !
@AndreasSpiess4 жыл бұрын
Glad you enjoyed it!
@PhG19614 жыл бұрын
@@AndreasSpiess I always do ;-)
@asm_nop4 жыл бұрын
In my college courses, we used a board running an STM32F405. That board runs a Cortex-M4F at up to 168MHz with an integrated FPU. It's more expensive, but it was extremely capable, had multiple separate ADCs/DACs, etc.
@AndreasSpiess4 жыл бұрын
As I mentioned, I should get some F4 blackpills.
@georgegu33742 жыл бұрын
availability of libraries, documentations, and example projects are crucial. price is probably the least of concern, unless you plan for mass production.
@AndreasSpiess2 жыл бұрын
The Maker community is quite price sensitive, I think. Maybe because of the cheap Chinese prices in the past
@korishan4 жыл бұрын
Very nice comparison Andreas. I had wondered what the biggest difference (other than BT/WiFi/cost) between the two would be. Thanks for the info! 😎
@AndreasSpiess4 жыл бұрын
Glad it was helpful!
@anjayv83474 жыл бұрын
Andreas have you checked out the cubemx and cube ide available for the stm32s ?, they are quite easy to use however, do not have inbuilt library support as the arduino ide.
@AndreasSpiess4 жыл бұрын
For the moment I focus on the Arduino IDE because it supports many different chips without relearning. And it is used by most of my subscribers.
@ixpixp4 жыл бұрын
I just started a project with cube mx ide because I need a 4 MHz clock for a sensor chip. With the stm32 you can configure all the clocks inside the stm32, pretty amazing. In code you can switch the oscillating pin on/off. Though I understand you can't cover all of that on your channel
@namesurname50054 жыл бұрын
Combining Visual Studio code with Platform IO and STM32 works great for me. (libraries and debugging are also a plus feature) Why should someone stick on the Arduino IDE?
@glewiss66964 жыл бұрын
What stm32 libraires would you use then on platformio ? Thanks
@AndreasSpiess4 жыл бұрын
Same question here
@namesurname50054 жыл бұрын
@@AndreasSpiess Sorry, i just saw your response! platformio.org/lib/search?query=platform%253Aststm32&page=1
@ami6packs4 жыл бұрын
Stm32 dma feature is quite useful. I don't know if esp32 has this.
@AndreasSpiess4 жыл бұрын
I also do mot know if their DMA features are comparable
@3v1Bunny4 жыл бұрын
I would like an update on the floating point arithmetic on an STM32F3/4 as they have hardware floating point arithmetic(the black pill once it arrives). This is the reason in RC drones most flight controllers are/were using these chips and they run at double the clock speed. 1.3 microseconds still sounds ridiculously high as an interrupt response on the side.
@AndreasSpiess4 жыл бұрын
I plan to cover the STM32 in future video(s).
@VideoDetection4 жыл бұрын
Another interesting and informative video, Andreas, thank you! Watching this video and the Arduino IDE being used made me realise my move to test micropython on the ESP32 was worthwhile. Maybe you can have another look at the ESP family being programmed using micropython and the Thonny IDE. Micropython have a generic board version for ESPs and Thonny makes it all a easy and effective tool. Love to see a future video from you on using this IDE and language!
@AndreasSpiess4 жыл бұрын
I wait for the S2 to do the next MicroPython Video.
@AirzonesBlasters4 жыл бұрын
Regarding the Blue Pill resistor, it really depends on the PC you connect it to. Some are tolerant and some are not. In the STM32F103 based board I put together, it of course uses the correct resistor. However I have since changed the board design over to the STM32F411. And that's such a nice chip.
@AndreasSpiess4 жыл бұрын
Thank you for the info. I will look at it as soon as I get my bluepills...
@user-qr4jf4tv2x25 күн бұрын
The beachmark part is like watching linus if microprocessor don't exist yet
@mjyai2 жыл бұрын
Bluepill is probably refer to movie "The Matrix". But I'm not sure because later an improved version used black pcb and call Blackpill instead of using red pcb.
@AndreasSpiess2 жыл бұрын
Indeed, the newer one is called Blackpill. So it is probably the color...
@jewe374 жыл бұрын
there is also the itm interface for stms programmed via an st link for printing. these st link sticks dont have the right swd pin broken out, but you can solder a wire to it and it works. alternatively you can buy one of those bigger stlink devices with a full jtag port and there it is broken out. you can hook that up to the stm and then print from it. the inoffical stm libraries dont support it, but the logic is fairly self contained and you can just copy paste it from the official package. on linux i am reading out using a very simple openocd config(which also allows very handy gdb debugging!), i dont know how you d do it on windows. it works great if you dont have any spare serial lines or dont wanna break out those pins as well.
@AndreasSpiess4 жыл бұрын
Thanks for teh information. I anyway try to use debugging in the future.
@Kefford6664 жыл бұрын
The thing that bugs me about ESP32 is every time I’ve had a project with it I have spent days faffing about getting the toolchain set up and adjusting paths and installing IDF or MDF. And then the debugging is sooooo slow especially with VisualGDB. I might have to try to arduino approach one day, if you can import the same/proper ESP libs into it and write modular code
@AndreasSpiess4 жыл бұрын
I never worked with the IDF and AFAIK the libs are not compatible. Maybe platformIO is a good compromise for you (see my videos)
@Kefford6664 жыл бұрын
@@AndreasSpiess I did give the Arduino IDE a go after writing my comment and found it made things much easier and quicker! In addition, it seems most examples are written in the Arduino IDE. I'm not sure I would use it for real production code but it certainly makes for a nicer experience than the IDF approach.
@StuartCGadgetRev4 жыл бұрын
Hi, Andreas, you didn’t consider ram or flash space in your comparison? The STM32 may well need external parts for more complex projects. If you’re making a logger for example.
@AndreasSpiess4 жыл бұрын
In a 15 minutes video I have to leave out most of the things :-( But I am sure experienced viewers will find what they need.
@treelibrarian76182 жыл бұрын
a little bit more on the STM32 ADC's ... no experience with ESP32 so I cant say how this stacks up... There are 2 ADC's, both operating at 1us, and can be configured to sample alternately or simultaneously and scan automatically over all 10 inputs in any order and with differing sampling gate times (longer gate times allow for higher impedence sources and greater stability) and can link with DMA for hands-off cyclical filling of a block of memory with ADC values with interrupts at 1/2-buffer intervals for processing. The DMA can also be used to cyclically write hardware registers from a range in memory, triggered by hardware interrupt, for hands-free PWM dithering or block serial send/receive, or anything else you can imagine doing by copying memory to hardware registers on interrupts. Speaking of interrupts, it may be possible to get even much faster interrupt response from the STM32 if you code it yourself and set up the interrupt pin wisely with maximum interrupt priority and minimum disambiguation overhead. Also, using the library functions like digitalwrite will add an overhead from all layers of calculations and function calls required to drill down to the actual hardware write. Should be possible (IRQ to GPIO) in ~14 cpu cycles (0.2µs). Finally, I've only ever used maple-mini clones which all came with the maple bootloader pre-loaded so I've only ever needed a USB cable to program them their only disadvantage was that one of the 10 ADC lines doesn't make it to the edge of the board. I do remember the "Red-pill" boards that were around at the time that STM32 was first being integrated into arduino, I seem to remember them being hard to make work but cheaper (missing something?). Blue-pill/Red-pill were terms coined to distinguish the blue solder-mask ones that worked better from the red solder-mask ones that often didn't in forum threads discussing how to make them work, since there wasn't much else to distinguish them.
@AndreasSpiess2 жыл бұрын
Thank you for the additional information!
@hebersolisbravo45024 жыл бұрын
Excelente análisis, me ayudo mucho en la selección para el proyecto. Muy bueno
@AndreasSpiess4 жыл бұрын
Glad it helped!
@StefanoBettega4 жыл бұрын
Personally I work with STM32F2 and it's a great micro. We are also planning to migrate to an H7 which has a dual core. But all of them lack the wireless connectivity...
@AndreasSpiess4 жыл бұрын
STM is a very successful company in the professional markets and have good products. This is a Maker channel and I will stick to Maker stuff... I am happy we can use a little "Atmel", a little "Espressif" and a little "STM" with our Arduino IDE.
@bacphan75824 жыл бұрын
Nice video, but i have some comments: -the STM32duino project is not as polished as esp32 one, most of people using stm32 will use software from ST or ARM. I'm quite surprised with the interrupt result, 1.3us is too slow for 72mhz mcu. It must be software problem. -both mcu have timers, but not all timers are the same, the timer on stm32 has some neat features. -another advantage of using stm32 is code porting, if you need more GPIO, more flash, just change target mcu and some lines, and you are good to go, but esp32, i dont see any other options if you want more GPIO/peripheral Esp32 is a nice chip, but this test is quite unfair for stm32( especially you are testing F1, not f4, the F4 is much better than F1, and it has FPU which may help in floating point calculation, and i dont know if stm32duino support it)
@AndreasSpiess4 жыл бұрын
As I mentioned, this video is based on my viewers comments. They usually use bluepills. I think, floating point performance is not a big issue. But a good ADC is important for many projects.
@RobertLugg2 жыл бұрын
Great comparison. Because there are so many stm32 variants it would be interesting to compare others. For instance for the same price as esp32, are there stm32 boards with WIFI and Bluetooth and a floating point number?
@AndreasSpiess2 жыл бұрын
No STM32 with WiFi is currently supported by the Arduino IDE :-(
@adrock08014 жыл бұрын
Your comparison applies only if you are using Arduino IDE. In any other case, both chips have not only different hardware, but also completely differenct approaches. On a STM32 you can program "bare metal" with having full control of the MCU. In this case you have a consistent behavior for any aspect of the STM32 MCU (interrupts, memory, speed etc.). On a ESPxx you will never have full control as it has to do housekeeping etc. for the wifi connection, so it behaves like a shared ressource. However, both MCUs have their specific use cases, so like you already stated, there is no "better" MCU.
@AndreasSpiess4 жыл бұрын
You are right. But on this channel, we use the Arduino IDE. That is why I did it this way.
@brycedavey12524 жыл бұрын
This shows how good the esp32 is, given it also has WiFi and Bluetooth!! It also has a core just for the Rf
@AndreasSpiess4 жыл бұрын
The ESP32 is also newer. But it is definitely a good choice for many applications.
@brycedavey12524 жыл бұрын
@@AndreasSpiess One thing I would point out is that the STM32 product line has some very nice development boards. Plus the programmable brushless motor controllers are fantastic for DIY projects :) I do normally recommend the esp32 for beginners though if I'm honest
@ManfredBrauchle4 жыл бұрын
how much time is wasted on interrupts because of the _digitalWrite_ function? I remember that it was not very efficient ...
@AndreasSpiess4 жыл бұрын
I just checked it. It takes about 700ns on the STM32. On the ESP32 it is only 120ns.
@ATS37884 жыл бұрын
The Main Problem with the STM Blue Pill is that the compile Code is huge so I did not even get the Fast LED code in the flash
@vvhat4 жыл бұрын
There's a Timer and a SPI version of WS2812 libraries, all DMA.
@jean-marclugrin19024 жыл бұрын
Thanks. I think you missed an important point: The STM32 has many 5V tolerant pins. This may be useful when you interact with a mixed environment (or just as a protection in case of error). In principle you can use for example 5V RS485 interfaces with it. The ESP32 is very stricly 3.3V. I do not compare the STM32 with the ESP32, but with the standard Arduino. I use them in a project because I can use their hardware serial ports, which is more convenient that the Arduino Nano where you have to use softserial. An Esp32 interfaces between Bluetooth and a driver STM32 (via one serial port), which itself send commands to other STM32 or arduino via RS485.
@AndreasSpiess4 жыл бұрын
I did not start this comparison ;-) As I said, viewers started to compare Bluepills with the ESP32 in my interrupt and ADC videos. That is why I thought it would be valuable to know the differences.