Before the detailed documentation, let's see the working demo and features of the band.
Problem Statement:- Many old age people used to forget whether they had taken the tablet or not, Sometimes this leads to take double consumption of same tablet. This will cause adverse side effects.
- Alzheimer's Disease patient Also face the similar issue.
This band will predict whether the user had consumed tablet and communicate to the Light blue App.
Apart from this, it can predict drinking water action, Eating and Idle action too.
ArchitectureThe 3-Axis accelerometer sensor in the thunder board sense 2 will used for data acquisition. The band with thunder board sense 2 will capture the 3-axis data for drinking water actions, tablet consumption actions and Idle too.
I have used Edge Impulse software to train the model and deployment.
Download the firmware from below link and flash it to thunder board sense 2.
https://docs.edgeimpulse.com/docs/silabs-thunderboard-sense-2
Open command window and type the below command to get connected to your Edge Impulse account.
edge-impulse-daemon
Collect data for Tablet consumption, drinking water, Eating and Idle.
In a create impulse section, configure window size as 19000 ms since the tablet consumption involves water drinking, tablet taking, opening the packet or bottle.
I have configured a below neural network architecture to train the model. I got 94 % accuracy.
In a model testing, I tested with new data to see how my model performs with new data. Here also I got 94% in accuracy.
I have deployed as C++ library than a direct firmware, Since I need to write another application to communicate to iOS, android application.
In the deployment section, Kindly select C++ library and download it.
To stream the predicted results to BLE App, Install the simplicity studio 4 and configure some parameters and rebuild the application to flash it.
The detailed steps to be followed is mentioned in below Edge Impulse Documentation here.
I will cover the overview of the steps to be followed for building application.
Step 1: Install Simplicity studio 4, other required toolchain and firmware from below link.
Step 2 : Copy the downloaded C++ library from Edge impulse to the below location.
Step 3:
open this file and set the parameter USE_BLE_CLASSIFICATION to 1.
now Rebuild the application in simplicity studio and flash the file to Thunder board sense 2.
To start the classification, connect the board to system and run the below command.
$ edge-impulse-run-impulse
You can connect Coin battery 3.3v parallel to the USB supply for EI command and then disconnect the USB connection. It can run independently on battery power alone.
Open the 'Light Blue' application in your mobile and connect to 'Edge Impulse' to see the results.
Some settings in app:
- Subscribe to the
2A56
characteristic. - Decode the message as UTF8 (click on
HEX
in the top right corner in LightBlue to switch). - Decode the message as UTF8 (click on
HEX
in the top right corner in LightBlue to switch).
The last one min video covers the mobile application demo.
Comments