| FORUM

FEDEVEL
Platform forum

How Do I choose the best microcontroller for my any projects?

Anik , 10-05-2023, 04:44 PM
We can see there are a lot of similar features microcontroller from different company like Rasberry pi, Espressif, STM, Atmega, Microchip etc. How should I choose the best microcontroller for my project.
Thank you.
QDrives , 10-05-2023, 08:00 PM
There are many things to make a selection on:
- performance
- IO count
- memory (RAM, Flash and EEProm)
- peripherals
- power consumption
- automotive
- package
- price
- availability
- documentation
- community and 'commercial' support
- tools (ide, compiler, debuggers, etc.)
- availability of starter kits
- yearly quantity required
- how long do you need (spare) parts? (Long Term Availability)
- reliability (very difficult to determine)
Anik , 10-05-2023, 08:02 PM
Then sir, Why STM32 is very popular than other chip?? I have worked very little with stm chips. But every professionals use stm32
QDrives , 10-05-2023, 08:33 PM
What do you need?
STM32 is from low performance (<=32MHz) to high performance (>=550MHz). From small (CSP 1.7x1.42mm) to QFP. 8 pins to 448 pins, starting from $0.33 up to 4MB flash. A lot of peripherals. Acceptable documentation, wide community support, tools.
But most of all -- marketing!
Biggest problem was availability the last 3 years.
But there is perhaps one thing what makes you like Microchip more compared to STM32. Lets pick one of the most advanced PIC32MZ2048EFG144 and STM32H757. Datasheet PIC is 760 pages, reference manual STM32 is 3556 pages. That is almost 5x difference.
Anik , 10-05-2023, 09:16 PM
I got it.. I have to learn about stm32 also.
Robert Feranec , 10-06-2023, 02:45 PM
I like this question, because I would like to create a tutorial about something well known and it is hard to say which microcontroller is currently popular. When selecting a microcontroller for a project, usually I select based on features I need, pins, availability, size, power and consumption, price and possibly if I have debugging tools already. However, lately I would like to have support for WIFI (possibly Bluetooth) and it limits my options mostly to ESP32 (unless I missed something ?).
Anik , 10-06-2023, 03:13 PM
Yes sir, we need tutorial about this,
If we skip about popularity of the chip, but need proper solution about choosing the chip.
Last time I fall in a problem with module, I was thingking to make a all in one device for my University project, I was thinking to make a device which will have Wifi, bluetooth, gps, gprs, gsm and some other necessary features. So I was confused to use Neo-6m, sim800 or A9G, A9G gives me gps,gprs,gsm in one module but neo-6m and sim800 are different module and consume more space. I decided to use A9G module but I read some forum and know this module has many issue with GSM and GPS. But now I can not change A9G, I have already brought it. Its working I have tested but not stable like Sim800.
On the other hand, If I found wifi bluetooth features with the chip(esp32 Soc) then why should I go for the other?
And about debugging which one is the best, which one easy to make working without minimum hassle which type of project or device need to choose which chipset, please make a tutorial about it sir....
QDrives , 10-06-2023, 08:23 PM
For WiFi and bluetooth there is more than ESP32:
https://www.digikey.nl/en/products/filter/rf-transceiver-modules-and-modems/872
https://en.wikipedia.org/wiki/List_of_Wi-Fi_microcontrollers
Do not forget about RED and/or FCC if you want to create a radio product.
Anik , 10-27-2023, 04:45 AM
Hello sir,
Can anyone help me about the layer 3. I dont understand those line. Please explain these like on layer 3, basically this line "provided that there is a complete GND plane under the RF and Crystal. Its actuall a PCB design guidelines of esp32 c6 module
QDrives , 10-27-2023, 10:33 PM
Do not route signals directly below the crystal and RF section without at least one Gnd layer in between. Better to avoid those area's completely other than Gnd.
Anik , 10-29-2023, 08:46 AM
Thank you
Anik , 12-07-2023, 09:03 PM
Thank you @QDrives sir.
I am sorry to directly request on working on channel.
But again please sir make a video on choosing microcontroller.
The main problem:
Many people want to make everything easy, here esp32 latest chipsets( C, S, H series) can be directly programmed through USB, No ttl converter needed. Also its user friendly with arduino IDE. People like this also. But I can not use esp32 every where its consume too much power. That is not right things for low power device, i can not use it with coin battery. On the other hand if I need very tiny micro controller then also we need ttl converter. Also if I use PIC microcontroller then I can not program it on board. This needed to program separately means its need to program first then you can add it on the PCB.
QDrives , 12-07-2023, 09:35 PM
"...if I use PIC microcontroller then I can not program it on board..." -- Most, if not all PIC micros can be programmed on board. At least all the ones I worked with could.
Low power MCUs:
- Microchip PIC
- Renesas RL78
QDrives , 12-07-2023, 09:37 PM
Some of the PIC micros I worked with can even have a bootloader to program it without needing a programmer.
Anik , 12-07-2023, 09:42 PM
Sir, All of them are ok for personal use. But for the client they dont have proper knowledge. And I give only the hardware design they just manufacture it and program by themself. If I want to give them fully working prototype then I need all the components on my stock. This willbe very expensive for me. But I will try to do it once.
QDrives , 12-08-2023, 09:26 PM
I try to understand what you are saying, but I do not think I understand.
1) "...All of them are ok for personal use..." -- do you mean in low quantities? And with "all" you mean Microchip PIC and Renesas RL78?
2) "...I give only the hardware design they just manufacture it and program by themself..." -- You design the board, 'sell' the design and they handle the production. "Program" -- as in writing the software for it or programming the flash?
3) "...I want to give them fully working prototype then I need all the components on my stock..." -- Yes, you would need components if you want to build a working prototype. But that is regardless of the MCU selected.
4) "...This will be very expensive for me..." -- The components? The board (prototype)? Programmer?

Or is it that you want a MCU that can be programmed via USB? That still requires components (MCU, resistors, connector, ESD protection, capacitors, etc.)
Looking at one of the cheapest MCUs with USB - STM32F070 - can be programmed through USB too. Not a low power MCU though.
Anik , 12-10-2023, 04:59 PM
Sir, I am making the perfect answer about my all problem.
But now I need a little help.
This a 0.66'' display reference design. its told to use 0805 package. Can I not use the small size package?? like 0201 or 0402 cause available space is very minimum for my circuit.
Mini , 12-10-2023, 05:09 PM
Of course you can use smaller package if you can find same capacitance and voltage ratings needed for your use. Just the smaller you get in size the smaller the capacitance possible will be. Same goes for voltage rating.
Anik , 12-10-2023, 05:09 PM
Thank you very much.
Anik , 12-10-2023, 06:47 PM
Will this work??
I need 12V 5A switching but this mosfet can provide 5A at 10V Vgs. So I add a PMOS on its gate to switch 12V to its gate. This PMOS is operating by esp32 which has 3.3V logic.
Through this 12V 5A mosfet I need to controll motor speed. So PWM signal need to be produce. Will it work.
Mini , 12-10-2023, 08:04 PM
It's not gonna work the way you want for sure. I see many problems, but the biggest problem is that you can't keep P channel mosfet(Q5) closed with 3.3V if you supply +12V to source. You need at least +12V on gate to keep it closed. In your schematic Q5 will be always open. Also if you draw schematic's don't ever put positive voltage and GND same side. I mean VCC_3V3 should be opposite side. Resistor values are also way too big in my opinion. They will limit how fast you can switch. And i hope you put snubber circuit for motor as well otherwise ur mosfets will be dead in a second.
Mini , 12-10-2023, 08:05 PM
You can always try to simulate your circuit. Try falstad.com for this simple simulation.
Mini , 12-10-2023, 08:12 PM
I will also note that usually you will use P channel to control something and N channel to switch it with logic voltage. Although it is not only solution, there are endless solutions. You can find better mosfet or paralleel them. You can use npn transistor or just buy a motor driver and so on.
Robert Feranec , 12-11-2023, 04:06 PM
Best way to learn and get confidence in your circuits is to build them. I know this is not the answer you are expecting, but even we build these kind of circuits in our company and we test them. It is a normal way to design boards. Plus, it will help you to learn a lot when you will be measuring and tweaking this (or of course you can simulate it).
Anik , 12-11-2023, 04:14 PM
Thank you sir. I will try to do it by myself first. I am building my lab. But its processing too slow. But will do soon.
QDrives , 12-11-2023, 08:00 PM
Beside the comments that @Mini and @Robert Feranec already have given, both selected MOSFETs are unable to handle 5A. Q5 has 50mOhm when driven to -12V. I²R -> 5² * 0.05 = 1.25W. With Typical 100°C/W Rja, the package would rise 125°C from abiemt. However, at that temperature, things change... for the worse. Q4 is even worse with 160mOhm.
If you want to drive FETs simple, use a dedicated gate driver, like https://www.digikey.nl/en/products/detail/onsemi/NCP81155MNTXG/7220836, or pink one other from the list https://www.digikey.nl/en/products/filter/power-management-pmic/gate-drivers/730
QDrives , 12-11-2023, 08:03 PM
Beside the comments from @Mini you should also note that the DC bias gets worse in a smaller package.
Mini , 12-11-2023, 08:06 PM
Yes indeed.
Mini , 12-11-2023, 08:07 PM
Yes i noticed that too, but didn't want to write another answer since it already went too long. I think it is even worse - i read like 0.13 ohms for 5A at room temperature but anyway you wouldn't choose generally sot23 package for 60 watts of power for obvious reason.
Anik , 12-11-2023, 08:12 PM
Its getting little hard for me. I have aready read all of the explaination many time and still trying to understand. I am thinking I need to gather more knowledge about the mosfet configuration. I am doing it.
Mini , 12-11-2023, 08:26 PM
Google motor control schematic or similar. Internet is full of schematics.
Mini , 12-11-2023, 08:28 PM
Took a random one with NPN transistor. You can replace it with mosfet if you want. Or find a good enough N channel mosfet.
Anik , 12-11-2023, 08:40 PM
ok sir, but I am very unclear and confused for choosing any mosfet. @QDrives sir has been described once but its still unclear for me, When I go for choosing a mosfet there are a lot configuration on the website.
Anik , 12-11-2023, 08:42 PM
I have searched for motor controller but its has more peripheral, I can not arrange with the available space.
Mini , 12-11-2023, 08:48 PM
I gave you schematic. You don't have to use motor controller.
Mini , 12-11-2023, 08:51 PM
If you google schematic examples you can look what others have used. If you find something you can ask us if it fits.
Anik , 12-11-2023, 08:58 PM
Can I use this if my motor is 12v and 1A or lower. The client at first told me this motor can draw 5A. So I was worried. But he give me this motor information. I can not find and specific information about the 5A cause this motor is smaller in size. So I have used your suggestion from the first message to make them parallel. I made it on the morning. If its not ok I will change it to your last one(schematic).
Mini , 12-11-2023, 09:28 PM
Actually paralleel-ing is not that simple. Perhaps i shouldn't of even mentioned it. Better don't use it for this simple schematic. It is quite complex. If you use separate packages mosfets are always a little different and one will open a little before than other and will carry more current and will heat more etc. If you use 2 mosfets in one package they are quite ideal, but one package doesn't help with thermal properties. Better don't use paralleel-ing.
QDrives , 12-12-2023, 07:42 PM
1) The 12V motor has a connection resistance of 36.5 ohm, so it is impossible to get 5A through it if your supply is 12V too.
2) Do you need 1, 2 or 4 quadrant motor control?
3) For 12V use a Vdss >= 30V and pick one with Rdson <= 10mOhm. Select a package that has a good thermal connection to the board. Something like this one: https://www.digikey.nl/en/products/detail/goford-semiconductor/GT095N04D3/21183377
4) Use a gate driver to drive the FET, either low-side for 1Q or half bridge for 2Q and 4Q.
5) Do not forget about overload / short circuit protection.
Anik , 12-13-2023, 04:03 PM
This mosfet is great in size sir. But its Vgs is 4.5V can I use it with 3.3V logic??
QDrives , 12-13-2023, 08:43 PM
You want to drive a motor, right? In 1Q, 2Q or 4Q? PWM?
Driving from logic and PWM is not possible, except for the smallest of FETs (Qg).
For the driving voltage you look at the Vth parameter. For the mentioned FET that is max 2.5V, which is a bit close for 3.3V.
Here is another https://www.digikey.nl/en/products/detail/alpha-omega-semiconductor-inc/AONR36368/11567500 with a tiny bit lower (2.1V) threshold voltage. Id of 5A and Vgs of 3.0V does not seem much of problem looking at the graph.

For more information on MOSFET datasheets: https://www.youtube.com/watch?v=W50ib1MJ8T8&pp=ygUfc2FtIGJlbiB5YWFrb3YgbW9zZmV0IGRhdGFzaGVldA%3D%3D and other videos of Sam Ben Yaakov.
Jan , 01-08-2024, 10:31 AM
@Robert Feranec which software language do u prefer me to learn for PCB , turorial part 7, timeline 1:14:44,
Link
https://youtu.be/e6YTg-UrKes?feature=shared
QDrives , 01-08-2024, 10:16 PM
@Jan For projects like these the best language is C.
Jan , 01-09-2024, 08:53 AM
Thanks dear
Use our interactive Discord forum to reply or ask new questions.
Discord invite
Discord forum link (after invitation)

Didn't find what you were looking for?