กลับไปหน้ารวมไฟล์
smart-jacket-for-fall-detection-a-human-activity-recognition-har-application-for-healthcare-b7f868-en.md

Introduction

Human Activity Recognition (HAR) refers to the identification of the physical activities performed by individuals based on sensor data collected from devices such as smartphones, smartwatches, or other wearable devices. These activities can include simple movements like walking, sitting, or running, as well as more complex activities like playing sports or using tools.

The importance of Human Activity Recognition lies in its potential to assist in a variety of applications and fields, such as:

Healthcare: HAR is used to monitor the health and physical activity of patients, particularly elderly people or those with physical disabilities, and to assess their physical and mental well-being.

Sports and fitness: In this field, HAR is used to track and analyze the performance of athletes, providing valuable insights into their training and physical fitness.

Security and surveillance: HAR is used in security and surveillance systems to detect and respond to security threats, such as identifying and tracking individuals who may pose a risk to public safety.

Marketing and advertising: By analyzing the activities and behaviors of individuals, HAR can help companies to better understand consumer habits and make informed decisions about product development and marketing strategies.

Transportation: HAR can be used in transportation systems to monitor the activity levels of passengers, for example, to optimize the use of resources, improve safety, and reduce the risk of accidents.

Human-Computer Interaction (HCI): In HCI, HAR is used to develop systems that can recognize and respond to the gestures and movements of users, making it easier to interact with computers and other digital devices.

Robotics: HAR can be used in robotics to help robots understand and respond to human actions and movements.

Overall, Human Activity Recognition has the potential to revolutionize the way we monitor and respond to human behavior, providing valuable insights and enabling new applications across a wide range of industries and domains.

Human Activity Recognition (HAR) Applications in Healthcare

HAR has a number of important applications in the healthcare field. Some of the most significant applications include:

Monitoring and assessment of physical activity: By monitoring the activity levels of patients, healthcare providers can assess their physical and mental well-being and develop personalized treatment plans.

Fall detection and prevention: HAR can be used to detect and prevent falls in elderly patients, helping to reduce the risk of injury and improve their quality of life.

Rehabilitation: By tracking the progress of patients undergoing physical rehabilitation, healthcare providers can evaluate their progress and adjust their treatment plans accordingly.

Chronic disease management: For patients with chronic diseases such as diabetes or heart disease, HAR can be used to monitor their activity levels and provide early warning signs of potential health problems.

Behavioral and mental health: By analyzing the activity patterns of patients, healthcare providers can gain valuable insights into their behavioral and mental health, helping to diagnose and treat conditions such as depression or anxiety.

Elderly care: By monitoring the activity levels of elderly patients, healthcare providers can assess their physical and mental well-being and provide timely support and care when needed.

Overall, Human Activity Recognition has the potential to revolutionize the way we monitor and respond to the health and well-being of patients, providing valuable insights and enabling new approaches to healthcare.

How HAR can be used in Fall Detection and Prevention?

Fall detection and prevention is one of the key applications of Human Activity Recognition (HAR) in the healthcare field. Falls are a common and serious problem for elderly people, and can result in serious injury or death.

HAR can be used to detect and prevent falls in several ways:

Wearable devices: By using wearable devices such as smartwatches or fitness trackers, elderly individuals can continuously monitor their activity levels and be alerted if they experience a sudden change in movement that suggests a fall has taken place.

Ambient sensors: Ambient sensors such as accelerometers and gyroscopes can be placed in the home to monitor the movements and activity levels of elderly individuals. These sensors can be used to detect falls and alert care providers or family members in real-time.

Machine learning algorithms: By analyzing data collected from wearable devices or ambient sensors, machine learning algorithms can be used to detect falls and distinguish them from other movements and activities.

Predictive models: Predictive models can be developed to identify individuals at high risk of falling and provide targeted interventions to reduce the risk of falls.

By using these and other techniques, Human Activity Recognition has the potential to significantly improve the ability of healthcare providers to detect and prevent falls in elderly individuals, helping to improve their quality of life and reduce the risk of serious injury.

About This Project

This project is a high-level integration of Artificial Intelligence and IoT for critical healthcare applications. By embedding a Nicla Sense ME into a smart jacket, the device can detect and differentiate between common physical activities (Walking, Sitting, Idle) and sudden, life-threatening "Fall" events—automatically triggering a wireless emergency alert.

The **Smart Fall Detection Jacket** is an implementation of **Human Activity Recognition (HAR)**, a field that uses sensor data to identify physical movements. Developed for the Arduino x K-Way Project competition, this system represents the future of elderly care, providing a non-intrusive way to ensure safety without the need for constant human supervision.

This project is submitted for Arduino x Kway Project competition. The hardware for this project, the Nicla Sense ME, is provided by Arduino. The jacket is provided by K-Way .

In this project Nicla Sense ME along with K-Way Jacket is used to create smart jacket to detect the fall detection. To built the system, the sensor node is embedded in the jacket. Nicla Sense ME is used for the sensor node, which allows inference to be done on device and results to be sent through BLE. Nicla Sense ME has an accelerometer that detects changes in velocity and hence detects falls. The fall is detected with the help of TinyML model built using Edge Impulse Studio. The following image show the jacket setup for data collection and testing.

TinyML-Driven Health Monitoring Overview

The core of the **Safety Jacket** is **Machine Learning at the Edge**. Instead of sending raw, power-hungry sensor data to the cloud for analysis, the project uses **Edge Impulse TinyML** to train a sophisticated neural network that "Lives" inside the Nicla Sense ME's processor. This allows the system to analyze motion patterns (Acceleration and Velocity changes) in real-time, instantly identifying a "Fall Signature" with over 99% accuracy.

Methodology

A built in accelerometer is used to measure acceleration, or changes in velocity, in one or more directions. The accelerometer is used to detect and analyze the movements and activity levels of individuals, in order to identify and respond to falls.

When a fall occurs, the accelerometer measures a sudden change in velocity, which can be used to identify the event as a fall. This data can then be analyzed using embedded machine learning algorithm built with the Edge Impulse Platform to determine if the fall has occured and if medical attention is needed.

By continuously monitoring the activity levels of individuals, accelerometers can provide real-time information about falls and enable early intervention to prevent serious injury.

Overall, this application may play a critical role in fall detection and prevention, providing valuable insights into the movements and activity levels of individuals and enabling healthcare providers to respond quickly and effectively to falls.

The graphic below depicts the entire system architecture. When a fall is detected using the TinyML model, the data is transferred to the gateway device over BLE. The gateway then sends the data to an IoT cloud server via the MQTT protocol, and the healthcare professional receives the alarm through a web app and takes necessary action.

Hardware Infrastructure & The Healthcare Tier

  • Nicla Sense ME: The "Wearable Brain." This tiny board is packed with industrial-grade Bosch sensors (Accelerometer, Gyroscope, Magnetometer). It performs all the on-device AI inference, ensuring high-speed detection with minimal battery consumption.
  • Raspberry Pi 3 (Gateway Node): The "Communication Bridge." It acts as a local hub, receiving detection results via Bluetooth Low Energy (BLE) from the jacket and forwarding them to the global internet.
  • K-Way Smart Jacket: The "Structural Housing." The jacket is designed to keep the sensors securely aligned with the user's torso, ensuring the gravitational data (1g reference) remains consistent for accurate activity classification.
  • HiveMQ MQTT Broker: The "IoT Dispatcher." This cloud service receives the emergency signals from the Gateway and pushes them to a web application or mobile device for professional healthcare monitoring.

The accelerometer dataset for this project is collected for the following classes:

  1. idle
  2. walking
  3. falling

The TinyML model is built with 99% accuracy.

The model is then deployed as Arduino library and uploaded on the Nicla. In the following video demo, the working of TinyML model for fall detection is shown. The model is deployed on device and tested with device connected via wired connection.

From the videos above it is seen that the tinyml model is working fine. Now, its time to deploy the full application. The sensor node, as seen in the following figure, uses battery power for operation and bluetooth for data transmission.

Visual Studio Code IDE and PlatformIO extension is used to build the firmware for the Nicla Sense ME sensor node.

The firmware code is in the main.cpp file as shown below.

Technological Logic and The "Inference-to-Alert" Lifecycle

The system operates through a rigorous Sense-Classify-Publish workflow:

  1. The Raw Data Acquisition Phase: The Nicla's accelerometer continuously polls the X, Y, and Z axes at a high sample rate, capturing the "G-force Profile" of the user's movements.
  2. The TinyML Inference Engine: The pre-trained model (trained on "Idle," "Walking," and "Falling" datasets) classifies the movement on-the-fly. If a "Fall" pattern is detected, the device enters "Alert Mode."
  3. Low-Power BLE Transmission: To save battery, the results are sent only when an activity change occurs. The Raspberry Pi Python bridge listens for these specific characteristic updates.
  4. The Global MQTT Handshake: The Python script publishes a "FALL DETECTED" payload to a secure MQTT topic. A JavaScript-based dashboard (using the Paho-MQTT client) instantly refreshes, alerting the medical provider.

The data from sensor node is published via bluetooth to the gateway node. The gateway node is implemented using Raspberry Pi Model B 3 (RPi3). The RPi3 uses built-in bluetooth modeule to receive data and WiFi module to transmit data further. The python script executing on RPi3 does this task as it detects and connect to sensor node, fetch inference data and transmit to MQTT broker broker.hivemq.com via WiFi signal. The Paho-MQTT library for python is used in python script. The web app in JavaScript is built which receives the data from MQTT broker and generates alert/display activity status. In JavaScript code the Paho-MQTT library for JavaScript is used.

The following image show python script executing on gateway device.

The status of the activity is displayed on web app as shown in following figure.

The final video of the project show how the Fall is detected and reported on web application.

Why This Project is Important

Mastering Human Activity Recognition (HAR) and TinyML is an essential skill in Modern Biomedical Engineering. It teaches you how to design "Intelligent Wearables" that move beyond simple step counters. Beyond fall detection, these same principles are used in Sports Performance Analysis, Occupational Safety Monitoring, and Interactive Human-Computer interfaces. Building this project proves you can handle the entire "Full-Stack" of IoT development—from raw physics and neural network training to global cloud alerting.

The public Edge Impulse project is available here .

*Declaration: Some content in this project are edited using ChatGPT.

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Edge Impulse Studio"
  - "1x Arduino IDE 2.0 (beta)"
  - "1x Visual Studio Code (with PlatformIO)"
  - "1x HiveMQ MQTT Broker"
author: "tim3in"
category: "Wearables, Health & Fitness"
components:
  - "1x ARDUINO NICLA SENSE ME (with Accelerometer/Gyroscope)"
  - "1x Raspberry Pi 3 Model B (IoT Gateway)"
  - "1x K-Way Smart Jacket (Wearable Housing)"
  - "1x Li-Po Rechargeable Battery"
description: "Engineer an advanced wearable healthcare monitoring system using the Nicla Sense ME, Edge Impulse TinyML, and an IoT-to-MQTT architecture for real-time patient fall detection and emergency alerting."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles:
  - "https://github.com/tim3in/kway_smart_jacket_fall_detection.git"
encryptedPayload: "U2FsdGVkX1+anz1zQ8VPZV2ovvv4l8neSu//YLNfePSqQ4MhK7cN5f00N13ldeorrJ+TX8ZoNPEwtzeO3Sp1+c0zrAsUSwXbm8Dg4IqddjxHmm69GPS1iNaPyh8iFg6ecsOMfJJpxN9cPDu/TBJ9Iw=="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/smart-jacket-for-fall-detection-a-human-activity-recognition-har-application-for-healthcare-b7f868_cover.jpg"
lang: "en"
likes: 2
passwordHash: "f8e438a16a83bae25e8367e4bcc39657b99eca8b4228898575b6bee12adc3268"
price: 299
seoDescription: "A smart jacket fall detection system using Arduino Nicla Sense ME and TinyML. Monitor patient activity via MQTT and get real-time health alerts."
tags:
  - "Health Tech"
  - "TinyML"
  - "Edge Impulse"
  - "Human Activity Recognition"
  - "Wearables"
  - "IoT"
  - "MQTT"
title: "Smart Jacket for Fall Detection: A Human Activity Recognition (HAR) Application for Healthcare"
tools: []
videoLinks:
  - "https://youtu.be/rPjd4o8PK3U"
  - "https://youtu.be/yRhpk_RCUn0"
  - "https://youtu.be/lXSnFvxj4oM"
views: 6122