cancel
Showing results for 
Search instead for 
Did you mean: 

Hello. I am developing a device to get optical sensor data(about 10KB) and predict. And this device is portable, so power consumption should be considered. STLinux can be a solution? and which board is suggestable? Thanks. GB

GYoon.1
Associate II

I am a SW engineer, so I ordered HW devp. to others.

They are using STM32F4 board to gather optical sensor data and display prediction(sensor requires over 200 KHz reliable clock freq. at minimum).

For prediction data will be transfered to phone via bluetooth and transfered again to cloud server and prediction is transfered in reverse-order.

The architecture is pretty complex and comm. overhead is serious, so I am considering to use linux-based system to gather data and predict in one board.

Training would be done on desktop and produces keras or tf model, so I need only runtime prediction environment on board.

Problem is prediction contains data pre-processing and it needs mainly numpy and scipy library.

The other thing is, gathering data would be written in C, and prediction code in python.

5 REPLIES 5
TDK
Guru

If you want to run Linux in any capacity, the STM32MP1 processors can work. I don't think low power and heavy computation will mix very well. Linux on any MCU isn't going to work well.

If you feel a post has answered your question, please click "Accept as Solution".

A full fat operating system and low power don't make good bedfellows. I'm inferring you need some processing grunt to do the prediction, peripherals to interface to the optical sensor and a bluetooth interface and stack. Linux is a comfort blanket as you know it will do the networking and provide a familiar development environment, but it costs in terms of (electrical) power, performance and support electronics (e.g. Flash memory for file system, RAM for kernel and drivers). The key decider might be the battery, so when you say 'low power' can you quantify that?

GYoon.1
Associate II

Thanks for your advice.

Recently I read STM32 AI related things briefly.

That is a good approach, but one thing is data preprocessing.

Signal data usually require a few python scipy library for preprocessing and preprocessing routine can be changed(improved).

(In my case just spline interpolation and savitzky-golay algorithm.)

So I have to implement those routine, but Linux can solve that problem.

On the contrary, writing data preprocessing routine by myself in stm32 environment makes pretty hard to use stm32.AI.

You can cross compile Python to ARM (see threads on stackoverflow). Not something I've done myself as I'm not much of a Python coder, but I would have thought cross compiling would give you a significant power vs performance hike as the processor doesn't then need to burn cycles running the Python interpreter.

GYoon.1
Associate II

Thanks for good information.

And I searched a little.

Many online excerpts seems about translating python interpreter to arm architecture machine.

That can be a solution, and there are limitations.

Mainly, I need to find method to translate specific library(e.g. Scipy) not python interpreter itself, because I need a little python function not all python environment.

Another thing is if the library includes C, Fortran library underneath, it seems to be more hard to translate.

Thanks again for your advice.