Hi, how are you? Well, about the title, which microcontroller do you prefer to use and in what situation do you use it? The question comes from the fact that I am buying some microcontrollers to use throughout my university career, specifically I bought an Arduino nano, a Raspberry Pi Pico , a STM32F103C8T6 and an ESP32, I would like to know your opinion about these and about any other that may be useful to me
I prefer to use ones that I am familiar with and have experience with. Makes it much, much quicker to get up and running on a new project.
When we are evaluating totally new micros, I look at things like vendor support and dev environment.
edit: for your situation, I would skip all the ones you mentioned and look at something like an ST Nucleo dev board. The NUCLEO-F446RE is about $15, has way more peripherals to play with than an RP2040 or an F103, and includes on onboard STLink debugger.
Once you've outgrown that, you can look in to something like the STM32F469I-DISCO, which has a nice LCD, but I wouldn't start out with that.
PICs are fun to use for battery powered projects. The difference between mA and μA can be quite astonishing in practice. Currently playing with a PIC10LF320 for my battery powered car alarm project 😌
“Battery powered car alarm”? Could you elaborate?
Yeah a few months ago someone broke into my BMW and stole all the displays and the navigation system in the car. It was a $10 000 repair (paid by the insurance company 😅). But a major headache for me.
Since then I’ve been parking in the garage. Those burglaries are most common in the winter here in Sweden, and during the summer I want to use the garage for woodworking.
So to calm my nerves I’m building an additional car alarm that blasts 12V 120 dB sirens in the car and alerts my Home Assistant smart home system to turn on blinking lights and fire alarm sirens in the whole house. That might scare them away 😅
It will play the start of Rick Astley’s Never Gonna Give You Up on a piezo buzzer and if a hidden button isn’t pressed until it ends to disarm it the alarm will go off😬
The PIC would get input from a magnet sensor in the door. Once door opened it will turn on a secondary circuit with the more power hungry ESP8266 that will eventually start the in-car siren and communicate with the house to do more alerting (if I’m parked in range).
I want it decoupled from the car’s electrical system and alarm (since they apparently knew how to silence that). And I want to keep it mainly low current so I only have to charge its battery like once per year.
No one should use the STM32F103 in 2024. STM is making the world a worse place by still selling it (although to be fair, 99% of those sold are fake labelled Chinese clones, not ST's).
What were the followup generations from ST? I'm guessing StM32F4, but then it gets fuzzy (having not been watching all those years). Now I look at U5 and it's got no bit-banding and looks crazy complex. Price and memory are great though.
Thanks.
I'd also like to see a release timeline,, but I can search for that later.
The first direct replacement for the F1 was the F3 (the idea there was fix a few bugs, replace the M3 with an M4F), they're also pretty obsolete now. They implemented the peripherals closer to the F1 than any other series since. However, the peripherals have been significantly improved in later series.
What is the suggested "entry level" replacement for the F1s? Looking at replacing the F1 in a board now, but I'm much more familiar with their high end than their low end and am sort of bewildered by the options. I'd like something with at least 512k of flash and in a QFN-48 or small BGA package, but beyond that anything goes. What lines would you suggest?
I get that they're still selling them because of legacy products. The bigger problem is those starting on them, despite improved lines having been around almost 15 years now. Really should mark them "not recommended for new products", but no one would look at that
"not recommended for new products" only means that the supply will start to dwindle
if something fits needs and is cheap enough, it will continue to exist
I'm shocked that people in this thread are just going "ohhh shiny" at newer chips
Rookie question however aren’t stm32 and pic widely used? & Is there some sort of list or rule of thumb that says avoid this stm32 line up?
I didn't say avoid STM32. I said avoid the STM32F1. It's ancient. It's outdated. It's a pain to use. It doesn't even have a USB bootloader. Use a more modern STM32 family.
Should clarify, they do have a USB bootloader, it was just buggy to the point of not working at all in their first release (everything before the -C flash size and above), and now they can't fix it
I agree that the F1 line is older and that there are better chips for the price, but having a USB bootloader really isn't in my top 10 priorities. It's nice for when you are releasing a product so that it can be updated, but for development(and learning), a USB bootloader would be of very limited use.
I disagree. We just had someone ask how he could program his Blue Pill board despite not having an ST-Link. If the Blue Pill didn't have the outdated F1, he could have just used the USB bootloader. Especially for development and learning, having a built-in easy way to program the device is great. That's true even if you have an ST-Link. I myself once accidentally reconfigured the SWD pins, thereby making debugging impossible. But pulling BOOT0 high and going into the bootloader DFU mode allowed me to easily fix that.
The USART bootloader works fine even if slightly less convenient than USB-DFU https://www.st.com/resource/en/application_note/an3155-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf.
Can't you use UART bootloader with a FTDI adapter tho?
....
Get a debugger. Even a $15 STM32 nucleo board has a built-in stlink, which can be disconnected from the onboard micro and used to debug other ST chips.
I agree with not buying outdated(or knockoff) chips, but let's take that a step further - don't buy boards with those chips either and you won't have that problem.
I have a really hard time recommending people learn embedded development without a debugger. That's like crippling them. With a debugger, you can see what your code(and the hardware itself) is doing. Programming over USB, you are just running blindly. That's why I say USB bootloaders are great for release when you know it works, but for development its use is very limited.
No you misunderstood. For mass produced part easier firmware update is a great boost and the firmware can be updated by any service engineer anywhere anytime even using an android app like a zflasher. For development you need a debugger i absolutely agree. Also if you're building your own custom pcbs, its easier to update with the USB and not have to worry about having a programmer.
I'm not sure what I misunderstood? That's pretty much what I was saying.
yeah ok
Which mainstream series is that? I don't need wireless or low power.
Will it still be available 10 years later?
Will Chinese be selling knock-off chips of it (once STM stops supporting it)?
that's stupid, they would have massive sales contracts for existing designs with that chip, there's nothing wrong with that
What is your application?
I really don't have a specific project for these microcontrollers, I'm buying them to be able to experiment with them and when the time comes to have them on hand and know how to use them
Get a Raspberry Pico board and an ESP32 board.
And look at some of ST's Nucleo and Discovery boards.
Second the Pico, great board for learning, and surprisingly capable
then that means your application is experimentation, I would get ESP32, crazy amounts of memory and Wi-Fi and Bluetooth, excellent for experimentation
I like using SAMD MCUs for fun hobby projects or small professional embedded projects. Any ARM Cortex-M family really.
Arm Cortex-A for embedded systems that need more, especially if Linux (yocto+bitbake) is desired
Intel Core i7 for computer projects
Usually all my hobby projects require connectivity. So, I always strive to use ESP32. If need low power I use BLE with Nordic NRF5340.
I like the teensy 3.2 and 4.0/4.1 line of micro controllers. I only do automotive projects that require CAN bus.
I use to choose stm32 microcontrollers because I’m very confident with them, but they also cost a lot of money if you need some features such as wireless connectivity and/or dual cores. So now I started using some cheaper microcontrollers from cypress whose also provide Bluetooth and PCB antenna for few dollars.
I only do hobby projects now. I worked in the embedded industry for 40+ years and worked with nearly every CPU/MCU known to man during that time, but out of all of them the Cortex-M architecture is my favorite. Of those, I like the STM32 line.
When developing a hobby project, I'll usually start with an ST Nucleo board which I've converted the on-board ST/Link to JLink and when I get everything working I'll lay out a 4-layer custom PCB in KiCad and have it fabricated by a board house.
I don't bother with the STM32 libraries--either the HAL or LL. I've written my own drivers for all of the peripherals on these MCUs and reuse them as needed in my projects.
If the project is simple and straightforward I go the 8bit route. Less room for error.
Otherwise I love the quirky stuff usually, PIC32MZ-EF, MPC5748G, GD32VF, C2000s, even obscure Chinese stuff like the 32bit 8051 from STC 😂
Of course for real work, Atmel SAM series or STM32 are usually the easiest options.
I’ll say unfortunately cause with ARM almost total domination (for good reasons, though) I feel we lost a little bit of diversity and fun in the job.
This is a common question for beginners in this world. The answer is: it depends on your project requirements. Sometimes an Attiny85 will do, other times a PIC16F877 and other times a Beagle Bone Black. It is interesting for you to get to know the most platforms, but generally in your carreer you will focus on a single tech and stick to it.
You're probably going to need whatever your classes that use microcontrollers will require - but you've got a good coverage in general for your own projects. That said, it's difficult to speak in general terms. You need to start with your specific requirements first, and go from there.
By the way, Arduino is not a microcontroller. Arduino is a hobbyist software framework that "dumbs down" programming. Their kits use microcontrollers such as Atmels and ESP32s. If you're studying software/firmware as part of your degree, I'd skip Arduino and go with manufacturer official C SDKs.