Lemontree

#The4thInnovationContest#Sleep monitor

 
Overview
# * Brief introduction of the work:

The sleep monitor I designed monitors the human body's sleep status by collecting the body's blood oxygen saturation, heart rate, number of turns, whether snoring, etc. during sleep.

- - -

# * I. Details of the work;

1. Collecting the body's blood oxygen saturation and heart rate. These two life parameters reflect whether the human body's cardiopulmonary function is normal, especially the sleep status.
2. Judging the body's tossing, turning, and sleep time, it can monitor whether the body enters deep sleep, and also reflects the body's sleep quality.
3. Recording snoring and grinding sounds during sleep can determine whether the human respiratory system is normal during sleep. (The threshold for automatic recording can be set by yourself)
4. The alarm system can alarm and wake up the monitored person when the human body parameters are too low to prevent the person being checked from having a bigger accident. (The alarm threshold can be set by yourself)
5. The recorded recording is stored in the TF card and can be played directly with the onboard speaker or other players. Daily sleep data (including recording, SPO2, PR, number of turns, sleep time) can be generated into a TXT document and stored in a TF card for long-term storage and viewing.

- - -

# * 2. Describe the challenges faced by the work and the problems it solves;

in recent years, with the improvement of people's living standards, people are paying more and more attention to their physical health, and fewer and fewer people will do things that harm their health. At the same time, the country is also paying more and more attention to the health of the people, such as increasing the supervision of medical enterprises, increasing the construction of basic medical care in towns, supporting more nursing homes, and increasing social security efforts, in order to improve the physical health of the people. After all, a healthy body is the capital of the revolution.
      When it comes to health issues, sleep quality is definitely an important part. Without high-quality sleep, there is no sufficient energy to work and study. As the elderly age, various organs of the body gradually fail, and the quality of sleep drops significantly. They can't fall asleep, get up early, and get up more at night. These sleep problems all bother most elderly people. But do sleep problems only occur in the elderly? The answer is no. With the current life pressure and work pressure, coupled with irregular life and work schedules, more and more young people are also experiencing problems with poor sleep quality, so sleep problems have become a widespread social problem.
      However, what are the problems that lead to poor sleep quality during sleep? Is it snoring? Is it a false sleep? Or other environmental problems? Only by finding the root cause can we prescribe the right medicine. However, when the human body is sleeping, the human body is in an unconscious state, and people do not know whether their various body indicators are normal during sleep, so it is difficult to detect whether there are problems with sleep, and it is not easy to record, so sleep monitors came into being.
      This sleep monitor I designed is small and portable, can be worn on the wrist, comes with a lithium battery, and can be used for a long time. It has a 1.44-inch color screen display, simple operation, and is suitable for all ages. It collects the blood oxygen saturation and heart rate of the human body during sleep to determine whether the human body's cardiopulmonary function is normal. The sleep monitor has an alarm function, and the alarm threshold can be set according to personal circumstances. When the body parameters exceed the threshold, the monitored person is awakened by an alarm. The six-axis acceleration module can accurately determine the body's turning and rotation, which is similar to the function of a bracelet. It can determine whether the body has entered a deep sleep. In addition, the sleep monitor can also record the sleep time, snoring, and sleep talking during sleep. Severe snoring is often accompanied by sleep apnea, which is not only harmful to oneself, but also affects the sleep of others. However, many people may not know whether they snore. The recording function of the sleep monitor can detect this problem. Early detection and early treatment can reduce the harm of snoring to the human body.

- - -

# * III. Describe the key points involved in the hardware and software parts of the work;

1. The hardware consists of several important parts, including the MCU minimum system, charging module, power module, MPU6050 module, VS1053 module, SPO2 blood oxygen module, TF card and FLASH module, 1.44-inch LCD screen, buzzer circuit, and DS18B20 chip.
 (1) The MCU used is STM32F103VCT6, the core control part of sleep monitoring, with a main frequency of 72M.
 (2) The power module boosts the lithium battery to 5V, and then steps it down to 3.3V, 1.8V to power the system.
(3) The charging IC uses CN3052 to charge a 3.7V single-cell lithium battery. It can automatically charge the lithium battery and is easy to use.
(4) CP2102-GM is a USB-to-serial IC used to communicate with the MCU and the computer, and can directly download programs.
(5) The MPU6050 six-axis acceleration module communicates with the MCU through IIC. When the module is moving, it obtains the value of the gyroscope and can determine whether the human body is moving.
(6) The VS1053 module uses SPI to communicate with the MCU to output audio and control the onboard HT6872 to drive the speaker and play music. The VS1053 module is also used for recording, using an MI head to collect mono audio.
(7) The SPO2 blood oxygen module is a medical-grade SP02 module that collects human blood oxygen saturation and heart rate through a nail probe. Both of these are important parameters of the human body.
(8) TF card and W25Q128 are used to store data. The content on TF can be viewed on other devices. Very convenient. 1.44 color screen is used to display screen data. This module uses software SPI driver, and the refresh efficiency is slow. If possible, try to use hardware SPI.
(9) The buzzer is used to alarm and remind the monitored person. PWM can be used to control the tone. The DS18B20 chip is used to monitor the ambient temperature in real time.
 2. The software part includes,
(1) FATFS file management system based on TF card and W25Q128,
(2) Configuration and operation of VS1053 music playback module,
(3) SPO2 module communication protocol to read SPO2 and PR data.
(4) MPU6050 module reads acceleration and gyroscope data through IIC,
(5) TFT screen simulates SPI driver through software, and LCD screen brightness and buzzer sound are controlled by PWM.
  After completing the configuration of the above basic programs, the next step is to design the layout of the interface and the cooperation of each module to ensure the normal operation of each module and improve performance.

### ** For specific software and hardware, please check the open source files, PCB diagrams and codes. **

- - -

# * 4. List of materials for the work;

the list of materials includes,
  SLEEP mainboard,
  SLEEP function board (including VS1053 and blood oxygen module),
  1.44-inch TFT LCD screen,
 a 3.7V, 800MA lithium battery,
 a 16G TF card,
a wrist blood pressure monitor case (including wristband),
a blood oxygen sensor, and
an 8R1W small speaker.
BOM of main ICs

| Comment | Designator | Footprint | Quantity |
| ------- | ---------- | --------- | -------- |
| STM32F103VCT6 | U1 | LQFP100 | 1 |
| MPU6050 | U2 | QFN-24_4x4x05P | 1 |
| W25Q128 | U3 | SOIC-8_208mil | 1
|
|
| SPX5205M5-L-3-3/TR | U6 | SOT-23-5 | 1 |
| CP2102-GM | U7 | QFN28-5.0 | 1 |
| 8M | Y1 | JZ-5032 | 1 |
| 32.768K | Y2 | JZ\_2012\_2P | 1 |
| LM393 | U5 | SOIC8_225 | 1 |
| HT6872 | U6 | SOIC8_225 | 1 |
| VS1053B/VS1003B | U7 | mTQFP48 | 1 |
| SPX5205M5-L-3-3/TR | U8 | SOT-23-5 | 1 |
| SGM2019-1.8V | U9 | SOT-23-5 | 1 |
| 12.288M | Y1 | JZ-3225-4P | 1 |

### PCB specific electronic materials can be found in the attachment

- - -

# * 5. Upload the work picture; (The PCB must have the competition Logo and take a photo and upload it. Failure to do so will be considered as giving up the competition)

### More pictures can be viewed in the open source file

! [logo.png]
- - -

# 6. Demonstrate your work and record it as a video and upload it; (The video content must include : Introduction of the work; Functional demonstration; Performance test; Close-up of the competition logo on the PCB; if not, it will be regarded as giving up the competition)

[Sleep monitor demonstration video](https://url.cn/5Er7E63?sf=uri)[Network disk address](https://pan.baidu.com/s/1itgAuC3R6bFeUwW442E87w)

- - -

# 7. Open source documentation . ~~~~

View attachments, physical pictures, PCB diagrams and codes

- - -

[Sleep monitor demonstration video](https://url.cn/5Er7E63?sf=uri)[Network disk address](https:// pan.baidu.com/s/1itgAuC3R6bFeUwW442E87w)

```

```
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 22:23:50

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号