MicroPython usage in medical devices?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
jamman
Posts: 1
Joined: Sun Sep 12, 2021 4:12 pm

MicroPython usage in medical devices?

Post by jamman » Sun Sep 12, 2021 4:24 pm

Out of curiosity, are there any instances of MicroPython being used in medical devices? If yes, can you provide a name or model number of the medical device(s)?

I am working on a class II medical device, and am wondering if there's any precedence for using MicroPython out there. It's always easier with the FDA if someone else has "been there done that."

viewtopic.php?t=9727#p54477 seems to indicate this is the case, but provides no concrete examples or information:
For example, MicroPython is used in a lot of medical devices

efahl
Posts: 15
Joined: Sat Dec 23, 2017 2:02 pm

Re: MicroPython usage in medical devices?

Post by efahl » Mon Sep 13, 2021 4:27 pm

I'm recently retired from one of the big medical device manufacturing companies, where my group did Class I software in CPython (image analysis, pre-surgical planning for implants, that sort of thing). The company had more Class II/III devices than I could count, using embedded systems, and all of those were C-based. I was grossly familiar with competitors' devices and the same held there as far as I knew. My info is, of course, biased towards what the big $1B++ companies (very conservative) were doing, but no uPython ever mentioned there. Smaller outfits may be using it...

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

Re: MicroPython usage in medical devices?

Post by mattyt » Tue Sep 14, 2021 2:06 am

Andrew Leech's PyCon AU 2019 talk, Profiling Pathogens with (micro) Python, provides some information about using MicroPython in medical devices. I work at the same company as Andrew and, while I'm not sure we can talk much about our products, we have multiple projects that employ MicroPython for medical devices.

bitrat
Posts: 41
Joined: Fri Jul 26, 2019 4:13 am

Re: MicroPython usage in medical devices?

Post by bitrat » Fri Sep 24, 2021 6:44 am

efahl wrote:
Mon Sep 13, 2021 4:27 pm
all of those were C-based.
Because C is so fault tolerant... :D

Actually, I think the biggest advantage of C is that it's verifiable. An interpreter is just too many levels of abstraction away from the metal to provide guarantees. This is a moot point on a desktop, but on uC's it's more or less possible to understand every code path.

Is anybody here up with the play with Rust on micros? Would Micropython implemented in Rust be more robust that the C version? There is a Python in Rust and I intend to try it, but haven't so far.

monquarter
Posts: 15
Joined: Sat Jan 11, 2020 2:31 pm

Re: MicroPython usage in medical devices?

Post by monquarter » Sat Dec 04, 2021 2:01 am

I have extensive experience in the medical device industry, and am confident that Micropython is suitable for medical device development. In the US, the FDA cares about safety and efficacy and regulates interstate commerce. If you can demonstrate your device is safe and you have the appropriate controls in place to validate and verify your software, and track changes/issues (all of which Micropython provides) then you can create the necessary documentation package.

User avatar
karfas
Posts: 193
Joined: Sat Jan 16, 2021 12:53 pm
Location: Vienna, Austria

Re: MicroPython usage in medical devices?

Post by karfas » Sun Dec 05, 2021 1:10 pm

bitrat wrote:
Fri Sep 24, 2021 6:44 am
Because C is so fault tolerant... :D
would Micropython implemented in Rust be more robust that the C version?
"Fault tolerance" is nothing a programming language can do for you. It requires careful design and coding.

Most likely, a (micro)python in Rust will produce the same unpredictable "faults" like many current scripting languages (especially on an embedded system with limited resources):
- Garbage collection running at the worst possible time
- memory fragmentation causing out-of-memory errors
- hardware and I/O errors
- ...
A few hours of debugging might save you from minutes of reading the documentation! :D
My repositories: https://github.com/karfas

Post Reply