Today I am looking at the proposed hardware for the release version of the Active Muscle Stimulator. The hardware I will be testing consists of sensors and the main computer. I need to figure out how this sensor hardware works, and if the computer is fast enough.

The Raspberry Pi Zero is really small, even with a Waveshare Sensor HAT mounted on top.
I have booted Raspbian on the device and started an SSH server, so that I can communicate with it from my laptop.
About the CPU

The prototype device was running as a single-threaded program on a Raspberry Pi 2 B. That device has 4 cores, each running at only 900 MHz. I would expect this processor to be fast enough for the software, since the processor on this machine is a bit faster.
Testing the Sensor

According to the documentation, we are interested in this device:
Onboard ICM20948 (3-axis accelerometer, 3-axis gyroscope, and 3-axis magnetometer), detects movement, orientation, and magnetic
ICM-20948: 9 axis sensor examples (STM32, BCM2835(Pi), WiringPi(Pi) and Python(Pi) four examples) Device address:0x68
Changing the WiringPi example to repeatedly read the raw values from accelerometer and gyroscope shows us that the read speed is adequate.

I tried changing the I2C baudrate of the Zero (something that was not possible on my old Raspberry 2 B). This gave us some really interesting speeds.

Apparently, the details about how to configure the hardware can be found in this document https://invensense.tdk.com/wp-content/uploads/2016/06/DS-000189-ICM-20948-v1.3.pdf. There might be some settings relevant for optimal use of the sensory hardware. At least the sensor ranges need to be configured correctly, so that we don’t hit the limit during movement. It seems I will have to read it on more detail.
Summary
No concerns were found during the initial capability tests. Demonstrating the hardware running fast mode I2C at 400 kbit/s seems promising.
The Raspberry Pi version I am using here has both Bluetooth and WiFi. In addition, the Sense module has 4 analog inputs, possibly enabling us to work with the Myoware Muscle Sensors. This would allow us to feel how the body natually tries to activate muscles.
The Sense module also has nice connectors for an external I2C module. I am hoping we will eventually be able to control the muscle activation signals with this channel (via some yet unknown hardware) rather than by using relays.
I will need to read the details on how to configure the ICM-20948 gyroscope and accelerometer chip.

Hi Thomas,
I’m really interested to see how this project comes along. I think it has endless applications and I’m keen to follow your progress.
Best regards,
Gary B.
LikeLike