Is Micropython ready for industry?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
pekasus
Posts: 2
Joined: Fri Jan 12, 2018 5:21 pm

Is Micropython ready for industry?

Post by pekasus » Fri Jan 12, 2018 5:34 pm

I am planning on making a pitch to my partners that we should move controller development to Micropython over the next two years. Does anyone have experience in using Micropython in industrial situations where you replace a PLC with it?

A little background... I develop controls for environmental/water technologies. I can't believe that PLCs are still the industry standard. I've tried for 3 years to get traction with Atmel chips so that engineers could use Arduino to adjust code onsite, but I don't think the Arduino wrapper/C++ brings much of a development benefit for people to change. In essence, it kills the value proposition.

I see the power of Micropython in that I think it is much easier to code, uses less time, and interfaces with the internet much easier than C/C++, so I can make the case that we can safe lots of time on development.

The question is whether things like garbage collection or something else that I'm not aware of pose a problem with using Micropython in embedded solutions. There are very few resources for Micropython out there, so I was hoping to have a discussion here to give me an outlook on what I can reasonably expect if we do switch over.

My goal is to build a few products internally, then use that knowledge to take PLCs so that Micropython developers have access to a UL-Listed device for their code, which would lower the barrier between prototype and sellable unit.

Also, I am considering one of these books:

https://www.amazon.com/dp/1484231228/_e ... 5OHV&psc=0

https://www.amazon.com/dp/B075X49VVH/_e ... 5OHV&psc=0

Any suggestions?

TIA

cefn
Posts: 230
Joined: Tue Aug 09, 2016 10:58 am

Re: Is Micropython ready for industry?

Post by cefn » Fri Jan 12, 2018 9:49 pm

I can't claim to have experience of PLC-oriented industries, but I've done a bunch of deployment (~10 live projects) with ESP8266 running Micropython for systems which needed to boot and run unsupervised without hanging for commercial purposes.

Three issues emerged during that time which created hangs or required resets/restarts
* heap fragmentation - this was largely to do with how little memory the device actually had, not really Micropython's problem. For many PLC-style applications my guess is there would be minimal allocation. If there's enough headroom then the fragmentation issue is less significant, and even where there might be a bunch of data being consumed/produced, operating exclusively with pre-allocated buffers mitigates or eliminates this.
* networking errors. I think the networking errors related to the ESP8266 platform and the vendor toolchain, not to Micropython, so if you invested in a more grown-up board than my ESP8266s then this would go away. You can afford a better device for an industrial solution, but I'm often simultaneously exploring whether I can produce affordable educational kits to replicate my work, so tend towards the ESP8266.
* Filesystem corruption. I think this was to do with a startup issue and an unstable power supply, so once again not fundamental.

Other than these, I have found that my code just runs and runs. Happy to bounce ideas, get in touch via http://shrimping.it if you need a more extended conversation in case I have any insights for puzzles you have. There are much greater experts than me on here, but I'm increasingly looking to employ Micropython for my own production systems so I have some points of view and data points I could share.

EasyRider
Posts: 94
Joined: Wed Dec 30, 2015 8:17 am

Re: Is Micropython ready for industry?

Post by EasyRider » Fri Jan 12, 2018 11:46 pm

Is Micropython ready for industry?
Have been asking the same question for past 2 years.

My primary applications are distributed industrial control systems.
Most operating 24/7 and some requiring high reliability, with some nodes having redundancy and backup built in.

Moving away from traditional wired RS-485 RTU Modbus systems to more flexible wireless networked solutions.
Also requiring reliable remote firmware/application software upload.

I haven't persevered with uPython long enough to become very experienced or proficient due to various limitations and reliability issues that I have experienced.

Initial attraction to uPython was potential "easier and quicker" application software development. I want to concentrate on developing application solutions and not to develop and fight with development tools. Excuses for poor and unreliable development tools don't help me either.

Well, for me this became very relative and dependent on frustration etc. dealing with various uPython limitations and reliability issues.

Mature uPython based on STM32F4 platform is very reliable but an ovekill for smaller application nodes, particularly when you have to add reliable wireless connectivity solution to it.

I backed ESP8266 uPuthon development on Kickstarter, but have given up on it completely now. I don't have time to fight with its various limitations and reliability. Not blaming uPython, but the platform itself has limitations and issues, adding uPython to it makes it worse. Anyway, may be just my opinion.

ESP32 has lot more potential as a uPython platform than ESP8266 but it is still in early stages of development to be considered stable and reliable for serious applications. I am concerned about lack of direction or future roadmap for this platform from Damian and MicroPythons pont of view? Development is now fragmented through various branches Micropython, Pycom, LoBoris and unfortunately not fully compatible. Have been playing with all 3 options and they all have issues to be considered stable and reliable.

For a time being, interactive nature of uPython is an asset for proof on concept and some development work, but I will not be using it for reliable serious applications any time soon.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Is Micropython ready for industry?

Post by pythoncoder » Sat Jan 13, 2018 9:31 am

@pekasus It's crucial to separate the language from the platform. In my view the Espressif vendor firmware, in its current state of development, is unsuitable for industrial applications. MicroPython on STM32 is a different matter. I'm retired so my industrial experience is not directly relevant but in your position I would certainly consider MicroPython to be a serious option.

Have you seen this thread on the European Space Agency?
Peter Hinch
Index to my micropython libraries.

pekasus
Posts: 2
Joined: Fri Jan 12, 2018 5:21 pm

Re: Is Micropython ready for industry?

Post by pekasus » Sat Jan 13, 2018 3:56 pm

@pythoncoder. Thanks for the link. That thread is a few years old. Do you know if they stuck with using MicroPython?

@cefn thanks for the input. I have to play with the ESP8266 yet. I like that it is a very cheap way to add wifi and I have seen many projects that use that, though I don't think they are using uPython. I have a NodeMCU sitting in front of me waiting to give it a try. This could work as a step towards full adoption if I use my current chip then use the ESP8266 to just connect the chip to wifi. I'll contact you on your site to discuss more.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Is Micropython ready for industry?

Post by pfalcon » Sat Jan 13, 2018 5:05 pm

This question was asked before, and hopefully will only appear more. The direction of answering it is also known. It breaks down to answering 2 other questions:
  1. Does it makes sense to use very high level ("scripting") languages for (deeply) embedded development?
  2. Among the languages which support such development, where does MicroPython stand?
To answer first question, remember that MicroPython started as a tool to help individuals (amateurs and professionals) to do development work faster and easier. Does it work? Oh yeah, it does. Would it make sense for businesses to use MicroPython? Well, either individuals mentioned above will start businesses to leverage MicroPython capabilities, or other "traditional" businesses will see competitive advantage and use it. Both processes already happen.

As for 2nd question, well, MicroPython is not a white crow - a number of languages can by now be used for deeply embedded development, like Lua, JavaScript, with at least couple of implementations each. So, you just need to compare features of particular languages and particular implementations. To keep it short, how often do you see projects with 98% of the test coverage of the core (like MicroPython offers) in general, and deeply embedded VHLLs specifically? Just look around.

So, the main question is not whether MicroPython is ready for industry, the question is whether industry is ready for MicroPython, which means investing into it as a tool. When we get the same kind of support as for example LuaJIT: http://luajit.org/sponsors.html , MicroPython will become even more powerful, featureful, and robust.

I can also offer my presentations on the matter:
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

ttadam
Posts: 18
Joined: Sun Apr 26, 2020 3:36 pm

Re: Is Micropython ready for industry?

Post by ttadam » Tue Jan 11, 2022 2:12 pm

Hey there!

4 years passed since the last comment.
What are your options and experiences now? :)

iiLaw
Posts: 5
Joined: Sun Jan 23, 2022 10:04 am

Re: Is Micropython ready for industry?

Post by iiLaw » Sun Jan 23, 2022 10:40 am

ttadam a good question.

I'm very new to micropython I built a indoor air quality sensor with the pi pico & other variants last summer.
I worked with PLC's in food manf and industry some 25+ years ago. I work mainly in building automation and asset monitoring.
My work uses long rage RF called LoRa and it's network layer LoRaWAN for what most describe as IoT.

I've had the need to do lite controls which mix local control & monitoring with remote reporting and control from the cloud.
Within the LoRaWAN eco system there are simple controllers which can only take me so far. So decided to design a simple controller based around the pi Pico 12/24v DC powered DIN rail mounted with
4 digital in
4 digital out (Darlington drivers for relays/contactors etc)
2 analogue in
2 RS485

My dev environment: pico is both a Modbus slave and a master. I have a LoRaWAN modem over RS485 (master) on uart:0 and a mixed IO module as slave on uart:1 and local IO. I've designed with through hole so any one can build. I'm considering EMC testing, in EU it falls out side the low voltage directive. However, I've yet to see what is needed to meet ICE62368-1 electronic safety standards.

I'm making for POC's not a product but micropython has worked well so far.
I'm aiming to get a device in the field replaced for testing.
There is one company that has produced and industrial IO based on the pi 2040 and that support micropython.

Does than answer your question No!
However with 1.5 million pi Picos sold in a year, I would hope to see micropython used in an industrial context especially if a hardware watchdog is used.

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: Is Micropython ready for industry?

Post by mattyt » Fri Feb 18, 2022 11:14 am

The company I work for uses MicroPython commercially to build medical devices. We have a handful of successful projects that have been completed over the past 4-5 years. Andrew, a colleague and friend, gave a talk at the 2019 PyCon AU: Profiling Pathogens with (micro) Python. While we've completed additional products since then it does give some insight into how we use MicroPython commercially.

I'm also considering giving another talk about the ingredients required to run a successful MicroPython commercial project...

But yes! MicroPython is clearly ready for industry. And, in my opinion, it could be used in many more areas than people might think.

p_j
Posts: 102
Joined: Mon Aug 23, 2021 1:08 pm
Location: Sydney

Re: Is Micropython ready for industry?

Post by p_j » Sun Feb 20, 2022 4:10 am

I would be interested to know if the ESP32 platform is considered ready for industry, has much changed since Peter's comment in 2018? Is the STM still a better choice?

Post Reply