Smallest MCU for micropython

Showroom for MicroPython related hardware projects.
Target audience: Users wanting to show off their project!
sim222
Posts: 3
Joined: Wed Nov 27, 2019 12:04 am

Smallest MCU for micropython

Post by sim222 » Sun Mar 15, 2020 4:50 pm

Hi guys,

I am looking for the smallest mcu for runing micropython.
I only need one or two uart and one I2C.
plz guide me.

Thanks in advance~

User avatar
deshipu
Posts: 1361
Joined: Thu May 28, 2015 5:54 pm

Re: Smallest MCU for micropython

Post by deshipu » Sun Mar 15, 2020 7:33 pm

Do you need it to be small in physical dimensions, or by any other criteria, like simplicity of the minimal working circuit, or unit price?

The NRF51822 that is used to run MicroPython on Micro:bit is both small physically (a 32-pin QFN package, IIRC), small in terms of available flash and RAM, and relatively cheap, for example.

sim222
Posts: 3
Joined: Wed Nov 27, 2019 12:04 am

Re: Smallest MCU for micropython

Post by sim222 » Tue Mar 24, 2020 9:07 am

I need the smallest platform and robust stability and price isn't my concern.

How can I install Micropython to the MCU if I select that MCU you mentioned?

User avatar
deshipu
Posts: 1361
Joined: Thu May 28, 2015 5:54 pm

Re: Smallest MCU for micropython

Post by deshipu » Thu Mar 26, 2020 11:08 pm

Same as you would flash any other firmware on that particular MCU—usually using a programmer device supporting the particular protocol that MCU uses. In case of NRF51 I think it's the SWIM protocol, so any programmer that handles that should work.

If you don't care about price and stability, only physical size, then I would look at the STM32 and SAMD chips in QFN packages. For example ATSAMD21E18A-MU is pretty small and only requires two capacitors as extra components.

chrismas9
Posts: 146
Joined: Wed Jun 25, 2014 10:07 am

Re: Smallest MCU for micropython

Post by chrismas9 » Sat Mar 28, 2020 1:44 am

The STM32L432 in QFN32 is supported via the NUCLEO_L432KC port. It should be well supported because it is derived from the Pyboard port.

chrismas9
Posts: 146
Joined: Wed Jun 25, 2014 10:07 am

Re: Smallest MCU for micropython

Post by chrismas9 » Sat Mar 28, 2020 1:51 am

Also the STM32L072. Use the L073 port. This chip is memory limited (192k flash) and sometimes gets broken when new features are added. If cost is more important than size I have MicroPython running on STM32F030. It's just over $US1 in volume.

sim222
Posts: 3
Joined: Wed Nov 27, 2019 12:04 am

Re: Smallest MCU for micropython

Post by sim222 » Thu Apr 02, 2020 2:44 am

chrismas9 wrote:
Sat Mar 28, 2020 1:51 am
Also the STM32L072. Use the L073 port. This chip is memory limited (192k flash) and sometimes gets broken when new features are added. If cost is more important than size I have MicroPython running on STM32F030. It's just over $US1 in volume.
Thanks for your reply!!
I am so curious STM32F030 which has various packages.
In my lack of knowledge, if I need to change the package for the MCU then, should comply with the source code which I can get from Github, am I right?

Sorry for bothering you since my limited information in terms of the embedded software.

Best regards,

User avatar
jimmo
Posts: 1633
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Smallest MCU for micropython

Post by jimmo » Thu Apr 02, 2020 3:02 am

sim222 wrote:
Thu Apr 02, 2020 2:44 am
I am so curious STM32F030 which has various packages.
Only the 48- and 64-pin LQFPs have enough RAM/ROM to run MicroPython though. (i.e. the F030CC and F030RC)
sim222 wrote:
Thu Apr 02, 2020 2:44 am
In my lack of knowledge, if I need to change the package for the MCU then, should comply with the source code which I can get from Github, am I right?
Yes. You should be able to adapt the Nucleo F091 board.
sim222 wrote:
Thu Apr 02, 2020 2:44 am
Sorry for bothering you since my limited information in terms of the embedded software.
But I'm not sure I would recommend this course if you're new to this. I would strongly recommend starting with a chip that is already well-supported in MicroPython, and definitely not one that is at this really small end because you'll waste time worrying about how to make everything fit and work well.

Get a prototype working first with a slightly more expensive F4 series part or something (pick something that already has a board definition in MicroPython), then optimise for cost later.

chrismas9
Posts: 146
Joined: Wed Jun 25, 2014 10:07 am

Re: Smallest MCU for micropython

Post by chrismas9 » Thu Apr 02, 2020 2:38 pm

If you are new to MicroPython and don't want to learn how to port it yet you should be able to use the NUCLEO_L432KC port without modification on the QFN STM32L432KC chip. You will have to compile it as the binary is not in the downloads. It reserves 26k flash for the file system, not all of which will be available for scripts. If that is not enough you will have to use frozen code.

User avatar
tve
Posts: 192
Joined: Wed Jan 01, 2020 10:12 pm
Location: Santa Barbara, CA
Contact:

Re: Smallest MCU for micropython

Post by tve » Tue Apr 07, 2020 6:29 pm

On the topic of small MCUs... I have a bunch of small sensors boards with STM32L082 and L072 and I'm wondering whether I can ditch C++... These only have 192KB flash, is it at all realistic to use these boards? There's no filesystem, right? So all code has to go into RAM and once working into frozen modules? I don't mind making my own board definition and ditching peripheral support I don't need, etc, but I'm wondering whether this is just all wasted effort...

Post Reply