Introduction
As the global population ages, the health monitoring and safety of the elderly have become increasingly important issues. Statistics show that about one-third of people over 65 fall at least once a year, with half of these falls resulting in serious injury. Traditional walking canes only offer basic support and cannot meet the diverse needs of modern seniors for safety monitoring, health management, and emergency assistance. In this context, smart elderly care devices that integrate Internet of Things (IoT) technology and intelligent sensors are a key breakthrough for addressing the challenges of independent living for the elderly.
Currently, most electronic canes on the market have limited functionality, often confined to a single feature like fall detection or GPS positioning, and they lack systematic health monitoring and smart interaction capabilities. Professional medical monitoring equipment is often bulky, complex to operate, and expensive, making it difficult to integrate into daily life. To address this gap, developing a multifunctional smart cane that combines health monitoring, safety protection, and intelligent interaction holds significant societal value. By using an STM32 embedded system to integrate various sensors and wireless communication technologies, a comprehensive, multi-dimensional safety net can be established for the elderly.
The design of this smart cane aligns with "smart eldercare" policy initiatives, which encourage the intelligent upgrade of products for the elderly. This project uses 4G IoT technology to synchronize device data to the cloud in real-time, allowing family members or caregivers to remotely monitor the user's health status and location via a WeChat Mini Program. This approach protects the user's privacy and autonomy while alleviating caregivers' concerns. The three-tier architecture of "smart hardware + cloud platform + mobile application" represents the mainstream development direction for modern smart eldercare devices.
Technologically, advancements in embedded processor performance, the proliferation of low-power sensors, and the maturation of IoT infrastructure have provided a solid foundation for developing multifunctional smart canes. The STM32 series of MCUs, with their excellent cost-performance ratio and rich peripheral interfaces, are an ideal choice for such embedded devices. Furthermore, the maturity of platforms like Tencent Cloud IoT has significantly lowered the barrier to entry for IoT application development, enabling even small teams to implement complex data acquisition and analysis functions. These technological advancements provide a solid basis for core features like accurate fall detection and real-time vital sign monitoring.
System Architecture
The system architecture is divided into several layers, with the STM32 MCU at the core.
Framework Overview
- Core Layer: An STM32F103RCT6 microcontroller serves as the central processing unit, connecting and managing all functional modules through various interfaces.
- Communication Layer: A 4G module enables two-way communication with the cloud, while a GPS module provides location data.
- Perception Layer: Six types of sensors are used to monitor environmental, physiological, and motion states. These include a heart rate and blood oxygen sensor, a 6-axis IMU, a light sensor, and a voice recognition module.
- Interaction Layer: Local interaction is handled via an OLED display, a buzzer, and an LED. Remote interaction is managed through a WeChat Mini Program.
- Data Flow: A closed-loop system is formed as data flows from the sensors to the MCU, then to the cloud, and finally to the Mini Program for display and control.
Key Communication Protocols
- UART: Used for communication with the GPS, 4G, and voice recognition modules.
- I2C: Used for communication with the MAX30102 heart rate sensor and the MPU6050 IMU.
- SPI: Used for communication with the OLED display.
- GPIO: Used for controlling the buzzer and LED.
Implemented Features
- Real-time Tracking: The GPS module acquires the user's real-time location and records their walking trajectory, which is displayed on a map in the WeChat Mini Program.
- Geo-fencing: A virtual boundary can be set. If the user crosses this boundary, the cane's buzzer will sound an alarm, and the location data will be uploaded to the cloud platform.
- Automatic Lighting: A light sensor monitors ambient light levels and automatically controls the built-in LED light to ensure safety during nighttime travel.
- Health Monitoring: A heart rate and blood oxygen sensor monitors vital signs in real-time. The data is displayed on the OLED screen and uploaded to the cloud. An alarm is triggered if readings fall below preset thresholds.
- Fall Detection: The MPU6050 sensor detects falls. Upon detection, the buzzer activates, an alert is sent to the cloud via the 4G module, and an SMS message is sent to an emergency contact.
- Voice Control: The user can issue voice commands to control the LED light, dial a preset phone number, or send an SOS message.
- Find-My-Cane Feature: A command can be sent from the Mini Program to make the cane's buzzer sound periodically, helping the user locate it.
- Cloud Data Sync: The 4G module uploads data including heart rate, blood oxygen, location, trajectory, and alerts to the cloud platform in real-time.
- Remote Management: The WeChat Mini Program displays health data, location, historical trajectories, and geo-fence settings. It also allows for remote control of the cane's functions.
Hardware Components
- Main Control Unit: STM32F103RCT6, based on the ARM Cortex-M3 core, providing stable control and data processing.
- GPS Module: ATGM336H-5N, for precise positioning and trajectory recording via serial communication.
- Buzzer Module: Active buzzer (triggered by a high-level signal) for alarms and the find-my-cane function.
- Light Sensor: Analog output ambient light detection module (AO interface).
- LED Lighting Module: High-brightness white LED with an N-channel MOSFET driver circuit.
- Heart Rate & Blood Oxygen Sensor: MAX30102, using the I2C protocol to monitor physiological parameters.
- Attitude Sensor: MPU6050 (integrated 3-axis accelerometer and gyroscope) for fall detection.
- Display Module: 0.96-inch SPI OLED screen for real-time information display.
- 4G Communication Module: Air724UG, supporting the MQTT protocol via UART for data upload and SMS functions.
- Voice Recognition Module: Hailingke V20, using serial communication to recognize voice commands.
- Power Management System:
- 3.7V lithium battery power supply.
- TP4056 charging and protection module.
- AMS1117-3.3 voltage regulation circuit.
- Structural Components: Custom-designed cane housing to integrate all functional modules.
Design Significance
This smart cane design has significant social and practical value. As society ages, the safety of seniors living alone becomes a major concern. Traditional canes only provide physical support. By integrating multiple sensors and IoT technology, this project provides comprehensive monitoring of an elderly user's health status, location, and activity safety, effectively addressing the shortcomings of conventional walking aids.
From a technical standpoint, the design integrates embedded systems, IoT, and mobile internet technologies. The STM32 MCU coordinates various sensor modules to perform core functions like fall detection, vital sign monitoring, and environmental sensing. Combined with 4G communication, data is uploaded to a cloud platform in real-time. This "hardware + software + cloud service" architecture provides a viable technical solution for the development of smart eldercare devices.
In terms of user experience, the smart cane uses both voice interaction and a WeChat Mini Program for control, lowering the barrier for seniors to use smart devices. Features like automatic lighting and geo-fence alerts enhance usability and safety. The automatic fall alarm and emergency contact function are particularly important, as they can significantly reduce rescue response time in an accident, providing reliable protection for independent living.
Market Research on Similar Products
Several smart cane products are already on the market, but they often have limitations such as single functionality, high cost, or complex operation.
- Stick'n'Find Smart Cane (USA): This product focuses on GPS positioning and geo-fencing, using a 4G module to allow real-time location tracking via a mobile app. However, its health monitoring is limited to basic heart rate detection and it lacks an automatic fall alarm. It is priced at around $300 USD.
- ElliQ Smart Companion Cane (Israel): ElliQ combines a voice assistant with health management, supporting voice interaction, medication reminders, and basic health data logging. Its positioning relies on Wi-Fi, limiting outdoor use. It also lacks a fall detection feature. The price is approximately $250 USD.
- Xiaowei Smart Cane (China): A relatively mature product in the Chinese market that supports GPS, one-touch SOS, and LED lighting. Its advantage is a lower cost (around 600 CNY), but it lacks heart rate/blood oxygen monitoring, and its fall detection algorithm has a higher false positive rate. It primarily uses 2G/3G communication, resulting in less stable data transmission.
- WiseCane Ultrasonic Obstacle Avoidance Cane (Singapore): This cane is designed for the blind and visually impaired, using ultrasonic sensors to detect obstacles and provide feedback via vibration. Its functionality is limited to this single purpose and it lacks health monitoring or IoT capabilities. It costs about $200 USD.
- FitLife Health Monitoring Cane (Japan): This product focuses on health management, integrating heart rate and blood pressure monitoring with data synced to a mobile app via Bluetooth. It has no GPS or geo-fencing features, and its short communication range (within 10 meters) is unsuitable for remote monitoring. It is priced at around $400 USD.
Tencent Cloud and WeChat Mini Program Design
The backend is built on the Tencent Cloud IoT Platform.
Platform Setup
- Log in to the Cloud Platform: Access the Tencent Cloud website.
- Select IoT Platform: Navigate to the IoT products and select the IoT Explorer platform.
- Create a New Project: In the console , create a new project by providing a project name.
- Create a New Product: Within the project, navigate to "Device Development" and create a new product. Fill in the product information, selecting "Custom Product" as the category.
Data Model Configuration
After creating the product, configure the data model (Thing Model). For this project, the following key parameters need to be uploaded to the Tencent Cloud IoT platform:
1. Location Data
Parameter Name | Data Type | Description | Upload Frequency |
---|---|---|---|
longitude | float | Longitude (WGS84) | Timed (e.g., every 30s) & event-triggered (on geo-fence breach) |
latitude | float | Latitude (WGS84) | Same as above |
speed | float | Movement speed (km/h) | Same as above |
timestamp | int64 | GPS timestamp (UTC ms) | Same as above |
2. Health Monitoring Data
Parameter Name | Data Type | Description | Upload Frequency |
---|---|---|---|
heart_rate | int | Real-time heart rate (bpm) | Every minute & real-time on anomaly (threshold breach) |
blood_oxygen | int | Blood oxygen saturation (%) | Same as above |
health_status | string | Health status ("normal"/"warning") | On status change |
3. Safety Alert Events
Parameter Name | Data Type | Description | Trigger Condition |
---|---|---|---|
fall_detected | bool | Fall event (true/false) | Real-time upload when MPU6050 algorithm detects a fall |
fence_alert | string | Geo-fence alert ("enter"/"exit") | Upload when GPS position is outside the preset boundary |
sos_alert | bool | SOS signal (true) | Upload when user triggers SOS button or voice command |
4. Device Status Data
Parameter Name | Data Type | Description | Upload Frequency |
---|---|---|---|
battery_level | int | Battery level (0-100%) | Every 10 mins & real-time on low battery (<20%) |
light_intensity | int | Ambient light intensity (Lux) | Upload on sudden light change (e.g., night/tunnel) |
device_status | string | Device status ("online"/"offline") | Upload on connection status change |
5. User Interaction Data
Parameter Name | Data Type | Description | Trigger Condition |
---|---|---|---|
voice_command | string | Voice command content (e.g., "open_light") | Upload upon user voice interaction |
find_cane | bool | Find-cane command (true) | Upload when triggered from the Mini Program |
Data Protocol
- Transmission Format: Data is sent in JSON format. Example:
{ "device_id": "CANE_001", "gps": {"longitude": 116.404, "latitude": 39.915, "speed": 1.2}, "health": {"heart_rate": 75, "blood_oxygen": 98}, "alerts": {"fall_detected": false, "fence_alert": ""}, "timestamp": 1630000000000 }
- Communication Protocol: MQTT is used for communication, with data published to specific topics on the Tencent Cloud IoT Hub (e.g., `/health`, `/gps`, `/alerts`).
- Security Mechanism: Data is encrypted using TLS 1.2. The device authenticates using a triplet (ProductID, DeviceName, DeviceSecret).
MQTT Topic List
The device development page provides a list of MQTT topics for communication:
$thing/up/property/CS0SLTKSYA/${deviceName} Publish (For property reporting)
$thing/down/property/CS0SLTKSYA/${deviceName} Subscribe (For receiving commands and responses)
Interaction Development
The platform provides tools to configure the user interface for the WeChat Mini Program ("Tencent LianLian"), allowing for customization of the display panel and shortcut buttons.
Device Debugging
- Create a Device: In the "Device Debugging" section, create a new device instance.
- Get Device Credentials: Once created, the platform will generate a QR code for binding with the WeChat Mini Program, along with the necessary credentials.
- Simulate Device Login: To facilitate testing, an MQTT client can be used to simulate the hardware device connecting to the server. Enter the MQTT login parameters, subscribe to the appropriate topics, and publish test data. The device status will change to "online" in the console, and uploaded data will be visible on the device page.
Conclusion
This smart cane project, based on the STM32F103RCT6 MCU, combines multi-sensor technology with an IoT communication architecture to create an innovative solution for elderly safety and mobility. By integrating GPS/4G dual-mode positioning with cloud data synchronization, it establishes a comprehensive location monitoring system that includes real-time positioning, geo-fencing, and trajectory tracking, overcoming the functional limitations of traditional canes.
The system's modular design integrates core functions such as vital sign monitoring, environmental sensing, and voice interaction. The physiological-motion dual-modal detection system, composed of the MAX30102 and MPU6050 sensors, along with a multi-level alarm mechanism, significantly improves the reliability of fall detection and health anomaly warnings. User-centric features like adaptive lighting and voice control demonstrate the product's thoughtful adaptation to specific use cases.
The WeChat Mini Program, built on the Tencent Cloud platform, provides a convenient interface for data visualization and remote control. This three-tier architecture of "end device - cloud platform - mobile application" ensures real-time system responsiveness and provides ample room for future expansion. The hardware selection focused on low-power design, and power management optimizations ensure sufficient battery life for outdoor use.
This design not only adds technological value to a traditional mobility aid but also offers a practical solution for the smart eldercare sector. Its methods for multi-sensor data fusion and its architecture combining edge computing with cloud collaboration serve as a valuable reference for the development of similar smart hardware. Future work could involve implementing machine learning algorithms to optimize fall detection accuracy, further expanding the product's application scenarios and market potential.