Investigating Micro Controllers

The curious programmer might have wondered why the program code is implemented in the C++ programming language. Some might argue that, for a Raspberry Pi project, Python would enable more people to cooperate.

The reason for sticking to C++ (with a minimum set of library dependencies) is to enable a deployment option involving a micro controller. When comparing for instance the small Arduino Nano 33 Sense with our Raspberry Pi setup, we realize how much smaller things could be. An Arduino Nano has all the sensors we need built in, and in addition allows for analog inputs and outputs. It is also very flexible with regards to power source, as it allows anything from 4.5V to 21V input power. The power consumption is also very low (4-38mA at 3.3V).

Comparison of Arduino Nano 33 Sense (left) with Raspberry Pi Zero with Sense HAT and battery (right).

The next question then might be related to why we are not just developing for the Arduino in the first place? The catch is that the tiny Arduino Nano processor is only 64 MHz, while the Raspberry Pi Zero processor runs 1 GHz, which estimates a Raspberry Pi Zero being about 16 times faster than an Arduino Nano.

Being able to deploy to micro controllers sure seems interesting, and I will spend some time looking into how to do this. I haven’t tried anything like this before, so it might require some initial reading.

In a previous analysis of the computational requirements for translation of sensory data into movements, I estimated the computational requirements being around 10% of the available capacity. It therefore seems unrealistic that the currently algorithms will run at sufficient speed on Arduino Nano.

In addition, the ability to control inputs and outputs in real-time is what makes micro controllers a core component in an EMS/NMES device. If we, at some point, are to take this project a step further and compose custom hardware for generating the stimulation signals, I would need to know a lot more about micro controller programming.

Arduino Nano 33 Sense, so small it could easily get misplaced.

Leave a comment