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)
@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.
@beauslim4 жыл бұрын
You always seem to know exactly what I'm wondering about. Thanks so much for the comprehensive comparison.
@AndreasSpiess4 жыл бұрын
You are welcome!
@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.
@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...
@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.
@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)
@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!
@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!
@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?
@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
@TheAoab503 жыл бұрын
Many thanks again for the great efforts to give us comparison results ready and free.
@AndreasSpiess3 жыл бұрын
My pleasure!
@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!
@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.
@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!
@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
@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...
@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.
@shabbarvejlani4 жыл бұрын
Thank you Sir for your analysis ! Appreciate!
@AndreasSpiess4 жыл бұрын
My pleasure!
@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
@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.
@moudi00824 жыл бұрын
stm32 f4 and f7 series have built in FPU for floating point operations
@AndreasSpiess4 жыл бұрын
You are right!
@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!
@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.
@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 ;-)
@mr.meticulous12414 жыл бұрын
Exactly the video I was waiting for! Thanks Andreas :)
@AndreasSpiess4 жыл бұрын
Glad you enjoyed it!
@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 🥴
@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.
@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.
@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.
@newburypi4 жыл бұрын
Yet again, both useful and interesting. Thank you.
@AndreasSpiess4 жыл бұрын
My pleasure!
@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?
@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.
@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.
@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
@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!
@leonardoh61403 жыл бұрын
@ 7:14 a wise man said: When you "pluck" the usb "pluck"... Just kiddind, nice video as always!
@AndreasSpiess3 жыл бұрын
:-)
@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..
@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.
@FilipLamparski4 жыл бұрын
Many STM32 MCUs support Arm's mbed environment which is somewhat similar to Arduino but can be used across many different Arm microcontrollers, and has a number of cross platform libraries that work across a wide range of boards. Heck, some of the newer Arm based arduinos are implemented on top of mbed. It's also very easy to use since you don't have to install anything if you don't want to - you can code in the browser, download a BIN file, and then drag it into a USB mass storage device presented by the debugger circuitry on your board. I think most "official" boards support this workflow, like the Nucleos.
@AndreasSpiess4 жыл бұрын
Sounds simple. On this channel I will stick with the Arduino IDE because it is the "smallest common denominator"...
@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.
@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
@phymacillustrator Жыл бұрын
Thank you so much, It helped me to understand options to program STM32. Thanks again.
@AndreasSpiess Жыл бұрын
You are welcome!
@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.
@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
@johanmartijn4 жыл бұрын
The advantage of the STM32 is native USB support. I use them as a USB microphone with the ADC. But the programming is done in STCubeMX and not Arduino
@AndreasSpiess4 жыл бұрын
I concentrate on the Arduino IDE on this channel because most of the viewers use it. This can be a disadvantage compared with the native IDEs. But it is well known and also work for other chips.
@xConundrumx2 жыл бұрын
The main advantage imho to the STM32 boards is the STM32Cube software that allows you to configure the chips truly purpose driven ways and turning off anything you do not need. The memory depends on the type of STM32 you are using and the implementation. Some even exceed the ESP32 memory setups.
@user-mr3mf8lo7y2 жыл бұрын
True.. but that targets less than 20% of general makers. The rest (including me) either does not have enough knowledge of what to set in that software or, simply do not care.
@xConundrumx2 жыл бұрын
@@user-mr3mf8lo7y And so that is why there is now support in the Arduino IDE I guess. Even so, it is there if you want it and especially for people that are looking for low power (to name but one example) the STM32Cube route is a definite option. On top of that there is tons of information on what to set and when available. Plus a ton of YT videos on it. All I am saying is it is worth looking into.
@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!
@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...
@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.
@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.
@user-mr3mf8lo7y2 жыл бұрын
When I finalized a RFID project, storage/EEPROM was the main consideration. Having 4MB of storage, clearly, ESP8266 was the winner. Still is.
@AndreasSpiess2 жыл бұрын
Indeed, most other MCU boards do not offer this amount of flash...
@PhG19614 жыл бұрын
Thnxs for this very well explained overview. A nice wrap up !
@AndreasSpiess4 жыл бұрын
Glad you enjoyed it!
@PhG19614 жыл бұрын
@@AndreasSpiess I always do ;-)
@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.
@riscy009 ай бұрын
Wondered why cubIDE and Mx is not covered
@AndreasSpiess9 ай бұрын
Because I do not use proprietary IDEs on this channel.
@riscy009 ай бұрын
@@AndreasSpiess That fair, Visual Code?, I just set up ESP32-C3 on Visual Code. It supports both STM32 and ESP32.
@riscy009 ай бұрын
@@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.
@riscy009 ай бұрын
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.
@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
@user-qr4jf4tv2xАй бұрын
The beachmark part is like watching linus if microprocessor don't exist yet
@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.
@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...
@noweare14 жыл бұрын
There are higher performance boards that ST has written arduino cores for like the F4 and F7. It really comes down to if you need BT or Wifi then the choice is clear. One thing though, migrating from arduino to HAL (ST native API) is much easier than going from arduino to IDF (Espressif native API) which is just overwhelming. Hard to beat form factor and price of the esp32. There is one thing that is hard to quantify is the fun factor of programming an 8 bit processor in an arduino environment. Even experienced enginners have to admit that it doesn't get much "funner" than that.
@AndreasSpiess4 жыл бұрын
I think I mentioned that you get also support for other families and I should get some F4 blackpills. A lot of the viewers on this channel are not software engineers and they love the Arduino IDE also because of the help of a large community. Already finding information for the STM32 was much harder...
@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...
@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.
@hebersolisbravo45024 жыл бұрын
Excelente análisis, me ayudo mucho en la selección para el proyecto. Muy bueno
@AndreasSpiess4 жыл бұрын
Glad it helped!
@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.
@R3VISION34 жыл бұрын
I personally had to install the USB bootloader using the ST-Link only since the FTDI boards I ordered are still in the mail. I was about to recommend the video guide made by Caleb Marting back in February until I noticed it in the description, since that's the one that helped me figure out the bootloader flashing without having to use FTDI boards like most other videos seem to show.
@AndreasSpiess4 жыл бұрын
Calebs video is very good. I found quite a few references on how to use ST-Link to flash the bootloader. But only blogs, not videos.
@electronic79794 жыл бұрын
Very helpful video 👍
@AndreasSpiess4 жыл бұрын
Glad you think so!
@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...
@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
@deangreenhough34794 жыл бұрын
Good work Andreas 😁🏴
@AndreasSpiess4 жыл бұрын
Thank you!
@lmamakos4 жыл бұрын
I believe the interrupt response time latency is actually better than it appears. I believe that the Arduino GPIO "pin" library functions are rather slow; look at the width of the pulse on the scope, almost a microsecond to toggle the pin on and off. The STM32 processors have this "bit banding" memory region which maps a memory reference to a piece of address space to an individual pin, so you don't need to do a read OR/AND and write cycle to twiddle an individual bit in a GPIO control register.
@AndreasSpiess4 жыл бұрын
You are right. I got to the same results after a few viewers mentioned the fact.
@villageidiot87184 жыл бұрын
If physical space is not an issue, I prefer the ESP32 with the external ADC. Thanks for this video
@AndreasSpiess4 жыл бұрын
Good concept!
@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!
@phinok.m.6284 жыл бұрын
The ATmega328P also has an internal reference voltage, you just have to activate it. Also, there are many STM32s. The STM32s with the Cortex-M7 cores running at 400 MHz for example also have FPUs and they are most certainly faster than the ESP32.
@AndreasSpiess4 жыл бұрын
Video#10 shows how to use this internal reference. And when the Blackpills arrive I will for sure check them out.
@blekenbleu4 жыл бұрын
Thanks; looking forward to a similar comparison for Nordic dongles
@AndreasSpiess4 жыл бұрын
This is definitively on my list!
@methauchohnegaming93274 жыл бұрын
Other pros for the stm32: -for thr prize of the esp32 you can get a stmf411 Board which is faster has more ram/flash and floating point unit - CubeIde which makes complex programs and features like dma easy to access/use
@AndreasSpiess4 жыл бұрын
I should get some Blackpills with an F4 chip
@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 !
@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!
@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.
@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.
@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.
@robsinHL4 жыл бұрын
ESP-NOW makes it a no brainer if connecting multiple devices. ESP32 is fast, cheap with a ton of RAM. I stick with Espressif boards available on Mouser for like $10. Can get ESP32-S2 for $8 which handles low power properly, minus a processing core though.
@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...
@TheNamelessOne123574 жыл бұрын
STM32F1 is a very old MCU series, but even so it performed very well. You should compare ESP32 with STM32F4. It has more or less same price, but outperforms ESP32 by factor of 6 in floating point operations, and the interrupts will be much faster too because of the much higher frequency compared to F1. And for the low power application there is L-series. They can change their freqency, have many sleep modes and turn on/off peripherials on the fly to acheive minimal power consumption over time. Much better and easier than ESP32's ULP.
@AndreasSpiess4 жыл бұрын
As said, I have F4 Blackpills in the mail. And a few others (including L0) on order. So stay tuned...
@TheNamelessOne123574 жыл бұрын
@@AndreasSpiess You should also try WB series - they are like L4, but with WiFi and Bluetooth. Maybe they will eventually replace that ugly complicated ESP32. :)
@hzrnbugsie4 жыл бұрын
The latest and greatest Arduino Portena uses STM32 now
@thomasscheidegger28474 жыл бұрын
Yes, its Portenta H7 (STM32H747)
@AndreasSpiess4 жыл бұрын
This board is probably too specialized for this channel. I also see no use case :-(
@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.
@AureliusR4 жыл бұрын
They are completely different microcontrollers for completely different applications. One isn't "better" than the other. If you need integrated wifi and are looking for low-cost, you go with the ESP32. If you need ARM Cortex power, and traceability/supply chain, you go STM32. They aren't really the kind you could just swap out.
@AndreasSpiess4 жыл бұрын
You are right. I meant "Better for a particular purpose"
@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
@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 ^^
@FearedSpark4 жыл бұрын
I use STM32 MCUs for most of my projects because of the awesome HAL. They are very capable chips, but as for every other chip, the Arduino library is limiting their capabilities (to the advantage of making them more accessible). I only use the ESP32 when I need the WiFI connectivity. The chip tested here is one of the first Cortex-M they released back in 2007. I think a better comparison would be with a STM32F4 series. As for development boards, several people already pointed out the awesome NUCLEO boards, the large ones coming with Arduino compatible headers, and integrated ST-LINK and serial port via USB. They also have a smaller form factor called the NUCLEO-32 if compared with an Arduino Nano.
@FearedSpark4 жыл бұрын
As for the libraries, you should check PlatformIO, a little more complicated than Arduino, but has an ever growing support
@AndreasSpiess4 жыл бұрын
1. I agree that I used an old chip. But most of the comments mentioned this Bluepill because it seems to be very common. I should get F4 blackpills and eventually will use one in a future video. 2. The only problem I have with Nucleo boards is their availability here. I have to go through digikey or mouser which doubles their price because of freight :-( Then they are as expensive as a Raspberry Pi.
@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
@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!
@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.