Skip to content

Commit 5d9fc1c

Browse files
authored
Merge pull request #78 from Tu9711/master
XDU_Smart_Belt_Based_On_Neural_Network
2 parents c6c2b6c + 7a6677c commit 5d9fc1c

29 files changed

+2672
-0
lines changed
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# Smart Belt Based On Neural Network
2+
This application is a specific example of using the smart belt to monitor human health.
3+
This application uses the smart belt to detect the user's heart rate, get exercise status by neural network and use voice to control the belt function to obtain information such as ambient temperature and our physical condition. What's more, these information can be sent to the mobile phone through Bluetooth.
4+
5+
6+
- [Smart Belt Based On Neural Network](#smart-belt-based-on-neural-network)
7+
- [Introduction](#introduction)
8+
- [Function](#function)
9+
- [System Architecture](#system-architecture)
10+
- [Hardware Architecture](#hardware-architecture)
11+
- [Software Flow](#software-flow)
12+
- [Hardware and Software Setup](#hardware-and-software-setup)
13+
- [Required Hardware](#required-hardware)
14+
- [Required Software](#required-software)
15+
- [Hardware Connection](#hardware-connection)
16+
- [User Manual](#user-manual)
17+
- [Before Running This Application](#before-running-this-application)
18+
- [Run This Application](#run-this-application)
19+
- [Video](#video)
20+
21+
22+
23+
## Introduction
24+
### Function
25+
The smart belt based on neural network mainly realizes the following functions:
26+
Main functions: motion state recognition, heart rate detection, voice control and voice reminder.
27+
Other functions: ambient temperature and humidity detection, Bluetooth transmission.
28+
In this project, we use 9D sensor (mpu-9250) built in arc iotdk development board to realize motion state recognition based on neural network; Use pulse sensor heart rate sensor to detect heart rate; Ld3320a voice recognition module and syn6288 voice synthesis module are used to realize voice control and voice reminder; DHT11 temperature and humidity sensor is used to detect ambient temperature and humidity; Use hc-5 Bluetooth module to realize Bluetooth transmission.
29+
The detailed control commands are as followed:
30+
31+
| Command | Voice(Chinese Pinyin) |
32+
| ------------------------ | -------------------------- |
33+
| Temperature and Humidity | "wen du" |
34+
| Heart Rate | "xin tiao" |
35+
| Motion State | "zhuang tai" |
36+
| Stop Alarm | "jie su" |
37+
38+
39+
40+
41+
### System Architecture
42+
#### Hardware Architecture
43+
![hardware_architecture](./doc/hardware_architecture.png)
44+
45+
46+
#### Software Flow
47+
System Software Flow
48+
![software_flow](./doc/software_flow.png)
49+
50+
Motion State Software Flow
51+
![software_flow](./doc/software_flow1.png)
52+
53+
54+
55+
56+
## Hardware and Software Setup
57+
### Required Hardware
58+
- 1 DesignWare ARC IoT Development Kit(IoTDK)
59+
- 1 LD3320A Voice recognition module
60+
- 1 HC-05 Bluetooth to UART transceivers
61+
- 1 DHT11 temperature and relative humidity sensor
62+
- 1 SYN6288 speech synthesis module
63+
- 1 MAX30102 PulseSensor
64+
65+
66+
### Required Software
67+
- embARC Open Software Platform(OSP)
68+
- ARC GNU Tool Chain
69+
- Serial Port Utility or other serial port terminal
70+
- Bluetooth serial communication assistant(BlueSPP)
71+
72+
73+
### Hardware Connection
74+
75+
| Device | Bus | Connector | Description |
76+
| ------------------ | ------ | ------------ | ---------------------------------------------- |
77+
| HC-05 | UART_2 | uart2 | Bluetooth transceiver for connecting smartphone|
78+
| DHT11 | GPIO | GPIO8b_0[4] | Temperature and relative humidity sensor |
79+
| LD3320A | UART_1 | uart1_rxd | Voice recognition module |
80+
| SYN6288 | UART_1 | uart1_txd | speech synthesis module |
81+
| PulseSensor | ADC | J1:ADC0 | Detect pulse sensor |
82+
83+
84+
## User Manual
85+
### Before Running This Application
86+
1. If you want to transfer the data to the mobile phone,please download [BlueSPP](https://pan.baidu.com/s/1lNGEwsjWSztfxqkhomAPlg) on the phone.
87+
88+
### Run This Application
89+
Before programming IoTDK, PMOD mux must be configured in order to use bus drivers of IoTDK.
90+
This operation is to make the ADC port work normally.
91+
```c
92+
// In file "embarc_osp-embarc_mli\embarc_osp-embarc_mli\board\iotdk\drivers\mux\mux.c"
93+
void io_mux_init(void)
94+
{
95+
sysconf_reg_ptr->PMOD_MUX = 0;
96+
sysconf_reg_ptr->ARDUINO_MUX = 1;
97+
}
98+
```
99+
100+
Makefile target options about IoTDK and toolchain:
101+
```makefile
102+
APPL ?= smartbelt
103+
BOARD ?= iotdk
104+
EXT_DEV_LIST += sensor/imu/mpu9250
105+
CUR_CORE = arcem9d
106+
APPL_DEFINES = -DUSE_APPL_MEM_CONFIG -DV2DSP_XY -DMODEL_BIT_DEPTH=16 -g
107+
TOOLCHAIN ?= gnu
108+
OLEVEL = O0
109+
```
110+
111+
Directories of source files and header files:
112+
113+
```makefile
114+
EMBARC_ROOT = ../../..
115+
116+
# use -Hpurge option to optimize the code size
117+
ifeq ($(TOOLCHAIN), gnu)
118+
ADT_COPT += -ffunction-sections -fdata-sections
119+
ADT_LOPT += -Wl,--gc-sections
120+
else
121+
ADT_COPT += -Hpurge
122+
ADT_LOPT += -Hpurge
123+
endif
124+
125+
LIB_SEL = embarc_mli
126+
MID_SEL = common
127+
128+
# application source dirs
129+
APPL_CSRC_DIR = . model
130+
APPL_ASMSRC_DIR = .
131+
132+
# application include dirs
133+
APPL_INC_DIR = . model
134+
135+
# include current project makefile
136+
COMMON_COMPILE_PREREQUISITES += makefile
137+
138+
### Options above must be added before include options.mk ###
139+
# include key embARC build system makefile
140+
include $(EMBARC_ROOT)/options/options.mk
141+
```
142+
143+
Then `make run`
144+
145+
## Video
146+
[Show video](https://v.youku.com/v_show/id_XNTE5MTU0MjIwOA==.html)
563 KB
Loading
52.5 KB
Loading
24.1 KB
Loading

0 commit comments

Comments
 (0)