Design of smart bracelet system based on single chip microcomputer

Publisher:TranquilMindLatest update time:2022-04-11 Source: eefocusKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This paper mainly studies the design of the hardware structure and software structure of smart watches, and studies the design of Android mobile phone APP. The hardware and software functions of the wristband need to be defined based on the function. The hardware structure includes STC12C5A60S2 microcontroller, three-axis digital accelerometer ADXL345, and Bluetooth module HC-05. The wristband transmits health data to the health APP via Bluetooth, and displays it on the mobile phone screen. It also reminds users through vibration at critical moments.


The software functions are reflected in three parts: power monitoring, exercise monitoring and sleep monitoring. When the bracelet is in exercise monitoring, the number of exercise steps can be calculated, and when the pre-set number of exercise steps is reached, it will vibrate to remind you; when in sleep monitoring, the total sleep time, light sleep time and deep sleep time of the day can be counted; at the same time, the bracelet also needs to send power monitoring to the mobile terminal application.


01 System operation process 

The mobile phone APP relies on Bluetooth to transmit different control characters to the watch. The microcontroller responds to the serial port receiving interrupt and judges the content in the receiving register, and performs corresponding operations to realize the control of the bracelet.

02 Pedometer Algorithm Design 

When users walk, the wearing position and direction of portable devices such as bracelets are random, so it is unreliable to analyze only one axis of the three-axis acceleration sensor. Therefore, after collecting the three-axis acceleration information, this system first performs acceleration synthesis, that is, vector summation, and then performs gait analysis.

It can be seen that the acceleration curves are irregular, but the synthetic acceleration curve after vector summation can better reflect the acceleration changes of the human body when walking.

After obtaining the synthetic acceleration, the digital filter is used for filtering, which can effectively eliminate the misjudgment of the system caused by jitter. The synthetic acceleration curve is filtered by recursive average filtering and limiting filtering. In a jitter test, the synthetic acceleration curve after digital filtering is shown in the figure.

The results after digital filtering are used for gait analysis, and the three conditions for determining a valid step count are:


1) The curve crosses the dynamic threshold downward. The dynamic threshold is updated every 1 second, and the average of the maximum and minimum values ​​generated in the previous second is taken.


2) The frequency of human walking is between 0.5 and 5 Hz, that is, the time interval between two step counts must be within the time window of 0.2 to 2 s, otherwise it will be invalid.


3) The acceleration change caused by human walking will have a peak and a trough, and its peak value must be greater than the preset value, which is set to 1.5 m/s2 in this system.


03 Database Design 

Since the application needs to run in the hardware system, the common large commercial databases such as Sqlserver and DB2 do not meet the requirements of the embedded system for being simple, small and sufficient. At the same time, the Android mobile intelligent operating system comes with an embedded lightweight database SQLite database, which has good embedded system applicability and can meet the needs of software operation and products. The characteristics of the SQLite database mainly include: independence, non-service, zero configuration, meta-processing and openness. These characteristics not only ensure the simplicity and speed of database operation, but also ensure the security of database data.


When we design a database, we must ensure that the functions we want to achieve are met. In addition, in order to make the database particularly clear, we finally present the database in the form of two tables, one for storing sleep information and the other for storing exercise time.

04 Hardware module design 

05 Application software design 

The application software layer contains all the functions of this smart device. It is an interface for human-computer interaction and provides direct services to users. Here, the upper-layer application development of this smart device is basically the research on mobile phone APP based on Android mobile intelligent operating system, so the content in traditional system software development can be used in the mobile phone APP software development of this smart device. According to the working idea of ​​"overall architecture, integrated development, step-by-step implementation, and continuous improvement", this mobile phone APP should have complete exercise and sleep data. It is also for the purpose of making maintenance more convenient and easier to use in the future. On this basis, it should also have a comfortable and beautiful interface, so that users can have a good visual experience.


In terms of functions, the health application software of the smart health watch needs to monitor the user's sleep and exercise, and organize the user's exercise data and sleep data during use. Because this smart watch should be used together with the mobile phone, all the organized information is finally sent to the mobile phone.


The user can observe the data of his/her exercise and sleep during use through this APP, and monitor whether he/she has completed the task according to the preset value, so as to monitor whether the user has completed his/her task, and let the user persist in exercising and improve his/her physical fitness. On this basis, the mobile phone APP should also send the sorted information to the mobile phone and read the preset information.

According to the user's requirements for functions, we divide the mobile phone APP into three parts: power management module, motion monitoring module and sleep monitoring module. On this basis, the motion detection module is divided into two parts: the number of steps taken by the user during use and the vibration reminder when the preset number of steps is reached; the sleep detection module is divided into three parts: the total sleep time during use, the deep sleep time during use and the light sleep time during use.

This mobile APP mainly has three parts. First, the user should transmit information to the health management module of this mobile APP according to the mobile phone, and transmit the user's expected health information input by the user on the mobile phone to the program on the watch for health monitoring. The mobile APP is mainly for the purpose of monitoring exercise quality and sleep quality, so it should include two modules related to health monitoring, namely: exercise monitoring module and sleep monitoring module, to monitor the user in use.


Among them, the health management module is a sports monitoring information setting module. The watch side will receive the pre-set information entered by the user on the mobile phone side, and then process the information. The information of each submodule is used by other submodules.


The motion detection module is mainly divided into two parts, namely the total number of steps taken by the user in use and the motion reminder module when the preset number of steps is reached. When the working mode of the health application software is the motion monitoring mode, the application software user obtains the user's walking event from the underlying accelerometer (ADXL345) driver and counts the number of steps based on time.


The sleep detection module is mainly divided into three parts, which are to count the user's longest sleep time, deep sleep time and light sleep time. At this time, the running state of the mobile phone APP should be the sleep monitoring state. The application software obtains the user's turning over event from the underlying acceleration sensor (ADXL345) driver, and counts the user's turning over frequency based on time. At the same time, according to the set health data and statistical algorithms, the user's total sleep time, total light sleep time, and total deep sleep time are counted based on time.


The power monitoring function monitors the remaining power of the watch when it is currently in use, and displays it on the top of the mobile phone APP screen, so as to achieve real-time monitoring of the watch's power to avoid affecting the user's normal use due to insufficient power.

Keywords:MCU Reference address:Design of smart bracelet system based on single chip microcomputer

Previous article:Design of barcode scanning system based on single chip microcomputer
Next article:51 single chip microcomputer - digital tube dynamic display

Recommended ReadingLatest update time:2024-11-23 11:39

Small RTOS51 realizes the design of temperature controller based on 8-bit microcontroller
At present, 8-bit single-chip microcomputers still occupy an important position in the field of measurement and control and the application of intelligent electronic products. The application of embedded real-time operating system (ERTOS) will greatly facilitate the software development of 8-bit single-chip microc
[Microcontroller]
Notes on single chip microcomputer programming and stepper motor control
Regarding the precautions for MCU programming design, I think that first of all, we must consider the executable efficiency of the program, be concise, easy to maintain, and have expandable space, simple and clear, the matching of subroutines, the application of delays, and the coordination of interrupts, the efficienc
[Microcontroller]
STC15F104W MCU Data
STC15F104W SOP8 programming pins P3.0=RX P3.1=TX STC-ISP programming instructions: click download first and then power on the MCU The STC15F104W MCU is a single clock/machine cycle (1T) MCU produced by STC. It is a new generation of 8051 MCU with high speed/high reliability/low power consumption
[Microcontroller]
STC15F104W MCU Data
51 MCU reads and writes AT24C02 serial E2PROM
The 24C02 has an on-chip address register. After each data byte is written or read, the address register automatically increases by 1 to enable the reading and writing of the next storage unit. All bytes are read in a single operation. To reduce the total writing time, up to 8 bytes of data can be written in one opera
[Microcontroller]
Spinning thread break detection and control device based on single chip microcomputer
  0 Introduction   During the winding process of the spinning machine, it is very important to judge whether the thin wire is broken. Therefore, the spinning wire break detection device is a product that comes into being according to actual needs. It can detect and monitor the wire breakage during the spinning proce
[Microcontroller]
Spinning thread break detection and control device based on single chip microcomputer
Application of Comparator of 51 MCU
A special application of AT89C2051, using its comparator to make a light intensity regulator, applied to a fully static LED display. The original situation is that the light control of the original LED display is made of a dedicated AD conversion chip, which is relatively expensive. Finally, this solution was used
[Microcontroller]
Realizing LED light flashing for 1 second based on C51 microcontroller
The crystal oscillator frequency used by C51 is 11.0592MHz. An LED light is connected to P0.0 of C51. Now it is required to design a program to make the LED light flash at an interval of 1s. We not only design the program, but also analyze this microcontroller project. By the way, let’s take a look at the diffi
[Microcontroller]
Realizing LED light flashing for 1 second based on C51 microcontroller
The first in China! The domestically produced, independently controllable, high-performance automotive-grade MCU DF30 chip is released
On November 10, according to the introduction released by Wuhan Economic and Technological Development Zone, on November 9, the 2024 Annual Conference of Hubei Automotive-Grade Chip Industry Technology Innovation Consortium was held in Wuhan Economic and Technological Development Zone. At the meeting, the
[Automotive Electronics]
The first in China! The domestically produced, independently controllable, high-performance automotive-grade MCU DF30 chip is released
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号