Page 1 of 1

MicroPython usage in medical devices?

Posted: Sun Sep 12, 2021 4:24 pm
by jamman
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

Re: MicroPython usage in medical devices?

Posted: Mon Sep 13, 2021 4:27 pm
by efahl
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...

Re: MicroPython usage in medical devices?

Posted: Tue Sep 14, 2021 2:06 am
by mattyt
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.

Re: MicroPython usage in medical devices?

Posted: Fri Sep 24, 2021 6:44 am
by bitrat
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.

Re: MicroPython usage in medical devices?

Posted: Sat Dec 04, 2021 2:01 am
by monquarter
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.

Re: MicroPython usage in medical devices?

Posted: Sun Dec 05, 2021 1:10 pm
by karfas
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
- ...