|
102010428Seeed Technology Co., Ltd
|
x 1 | |
|
Rechargeable Battery, 3.7 V |
x 1 |
|
arduino IDEArduino
|
|
|
Edge Impulse Studio |
|
|
Flutter |
|
|
3D Printer (generic) |
Pet Activity Tracker using XIAO BLE Sense & Edge Impulse
Story
Why should human have all the fitness trackers? Our pets deserve more to stay active. I am using XIAO BLE Sense which a tiny microcontroller which is equipped with a powerful Nordic nRF52840 MCU, designed in a Bluetooth 5.0 module, built around 32-bit ARM? Cortex?-M4 CPU. It has 6 Axis IMU which is used to predict the activity such as rest, walk and run.
Accompanying mobile app connects to the device over bluetooth and microcontroller sends prediction data every minute. Data is stored on mobile local storage and plotted on graphs to provide meaningful insight.
Get Started WIth XIAO
Before you can start programming with XIAO, you need to install board firmware. The best resource is the wiki which will guide you step by step to set up your Arduino IDE.
EI Blue - Data Collection over Bluetooth
For any machine learning project, data collection is a very important part. To capture more accurate data, I had to collect data while my dog is wearing the collar which means I cannot collect data connecting XIAO BLE Sense to computer over USB cable. Hence I created a mobile app called EI Blue using which I collected data wirelessly from XIAO. The app sends accelerometer data directly to Edge Impulse studio.
The app is very easy to use. You need to upload the firmware core to your XIAO, scan the QR code to configure the project on the app and start sampling. Watch the video below.
You can clone my project and build the app on your computer.
You should see data on Edge Impulse Studio as below. I have collected 5s samples. Collect as much data as possible for a robust ML model. I have collected around 6 minutes data to get started and will continue to collect more data over the time.
Create The Impulse
This is where you define your input data, any digital signal processing and neural network you want to use for your model.
As you know, accelerometer data is basically a time series raw data. I have chosen frequency = 50Hz which means every second there will be 50 readings of accelerometer data with interval of 1000/50=200 milliseconds.
I have chosen Spectral Analysis as my processing block as it works pretty well with accelerometer data to extract meaningful features.
On the Spectral Analysis page, make sure to check "Calculate feature importance" which will indicate which features are important based on your data. For example, as you can see in above image, "accX Spectral Power" has highest importance as I have rest, walk and run data where X axis varies a lot and makes the separation.
I got 90% accuracy during model testing But remember, this is a proof of concept and I collected data from my dog only. Ideally, I am supposed to collect data from different dog breeds and that will add variety in the dataset and make the model robust. But for now, it solves the purpose.
Once you are done, download the Arduino library and add to Arduino IDE. Then upload XIAO_BLE_Pet_Activity.ino program to XIAO BLE Sense.
Build The Mobile App for iOS
The mobile app is written in flutter. So you need to have flutter installed. I highly recommend to configure VS Code with flutter which makes it so easy to code in flutter/dart. Follow this link to get started with flutter from installation to writing first flutter app.
Once you have all the softwares installed and configure, clone this repo.
I have built the app for iOS as I don't have any android device in my possession right now. But flutter is a hybrid mobile framework which means, same code should work for Android app as well.
To build for iOS, run below command from the root of the project folder.
open ios/Runner.xcworkspace/
This will open Xcode. Sign the app using your provisioning profile and run on your phone.
Pet Activity Tracker using XIAO BLE Sense & Edge Impulse
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(2)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by mithundotdas
- Mahout - Save The Elephants ?? Save The ElephantsLet's work together and save the beautiful elephants using cutting edge technol...
- Smart Indoor Harvesting Using Wio Terminal & Blynk MotivationThis project is basically designed and programmed by my daughter, Sashrika with little hel...
- A. Eye - Watch out for vehicles This is a getting started guide for beginners to Intel Compute Stick and OpenVINO. I will be using p...
- Touchless ATM using Augmented Reality Stop The SpreadPrevent spreading of COVID-19 is very critical to flatten the curve. Research has fou...
- Basement Monitoring Using Wio Terminal and Blynk MotivationI live in East Coast of USA where most of the houses have basements, some are finished, so...
- Buddy - A personal home office assistance What Problem Are We Talking About ?Corona virus out-break has put our lives upside dow, creating new...
- AI powered thermal camera for safe camping The ProblemI like camping but I am not a "camping enthusiast", I usually camp once or twice a year w...
- Pet Activity Tracker using XIAO BLE Sense & Edge Impulse StoryWhy should human have all the fitness trackers? Our pets deserve more to stay active. I am usin...
- Protect Peatlands for people and planet with help of SensiML The 1997 Indonesia fire burned 9.7– 11.7 million ha on Borneo and Sumatra, destroying 4.5–6 million ...
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
81 1 1 -
-
-
-
Sega Master System RGB Encoder Switcher Z80 QSB v1.2
71 0 0 -
18650 2S2P Battery Charger, Protection and 5V Output Board
107 0 0 -
High Precision Thermal Imager + Infrared Thermometer | OpenTemp
526 0 7 -
Sony PlayStation Multi Output Frequency Oscillator (MOFO) v1
147 0 2 -