Design of Health and Safety Alarm System Based on MCU
Yuan Liu, Jiaying Chen and Haiyun Wu
College of Engineerin , Tianjin Agricultural University, Tianjin 300384, China
1417325528@qq.com,1506351098@qq.com,283699240@qq.com
Keywords: GSM, MCU, Healthsafety, Message alarm, Sensor.
Abstract: A health and safety alarm system was designed based onMCU and GSM technology to rescue and treat
people immediately when they suffer from sudden illness or event.It has many functions, including real-
time measurement and parameters displaying. There are two indicators: heart rate and body temperature of
human health. The system takes MCU as the core, collects heart rate signals from photoelectric sensors,
after AD conversion with the signals of body temperature from the temperature sensor arithmetic
processing, and shown by LCD. If the heart rate or body temperature exceeds normal range and lasts for a
period of time, or the wearerpress the button for help, the buzzer would be alarm.The device willsend a
message for help to guardian byGSM technology to and display the guardian’s name and phone number at
LCD at the same time.So that passer-by can get in touch with his families to come in time.
1 INTRODUCTION
My country has a large population and aging is
aggravating, but elderly people are prone to sudden
illness, every year, countless people die because of
sudden onset of disease without timely treatment. To
reduce the occurrence of this tragedy, a health and
safety alarm system was designed. At present, there
are many kinds of personal safety alarm systems in
the market.There are heart rate over-limit alarm
systems and the systems that can make loud noises,
but the former has no function of measuring
temperature and GSM SMS alarm, detection index
single judgment loses, the latter can voice alarm but
unable to reflects the wearer's health, if nobody
nearby, then alarm there would be no sense.The
health and safety alarm system solves the above
problems and realizes the function innovation.
2 THE COMPOSITION AND
WORKING PRINCIPLE OF THE
SYSTEM
Health and safety alarm system uses MCU
STC89C52RC as the main controller, using the heart
rate, body temperature monitoringin the integration
of unitized circuit design(Chen, S.X., 2012).It can be
real-time, effective monitoring and display heart
rate, body temperature parameters. When the
wearer's heart rate or body temperature is not in the
normal range, the buzzer sounds, the LCD displays
the relative number, and the GSM module sends a
message to its family. The wearer can also press a
button to send a distress message in case of
emergency. The system composition structure is
shown in figure 1.
STC89C52RC
Temperature
detection
Heart rate test
Power module
LCD module
Alarm module
GSM module
Figure 1: System block diagram
3 HARDWARE CIRCUIT DESIGN
3.1 SCM main control circuit
The main control chip in the design adopts the single
chip STC89C52RC,the smallest system of the single
chip is shown in figure 2, and the clock adopts the
external 12 MHz oscillator circuit. Main control
circuit in addition to realize detecting body
temperature, heart rate, LCD display and buzzer and
GSM alarm function, it can also be chromatically set
Liu, Y., Chen, J. and Wu, H.
Design of Health and Safety Alarm System Based on MCU.
In 3rd International Conference on Electromechanical Control Technology and Transportation (ICECTT 2018), pages 573-576
ISBN: 978-989-758-312-4
Copyright © 2018 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
573
heart rate and body temperature of the normal range,
LCD display and GSM automatic alarm conditions.
Figure 2: MCU main control circuit
3.2 Power supply part
The system uses the linear power source, as shown
in figure 3. It converts 100 ~ 240 v AC voltage to 5
v DC voltage, so as to prevent short circuit and
overheating burned components, with protection
circuit, filter circuit of the electrolytic capacitor and
ceramics capacitor, DC power supply of pulse wave,
interference and noise to the maximum to prevent
and absorption.
Figure 3: Power module
3.3 Temperature detection part
The temperature test selects the DS18B20 chip,
which is a smart type temperature sensor, and the
output is a digital signal.DS18B20 reads the
measured temperature directly, and can achieve 9-12
digit reading mode by simple programming
according to actual requirements. The temperature
conversion power is derived from the data bus, and
the single chip can supply the DS18B20 without
additional power supply.MCU P3.7 is connected
with the single-chip DQ.
3.4 Heart rate detection part
The heart rate test adopts Pulse Sensor photoelectric
sensor, and its working voltage is 3.3V~ 5V, mainly
composed of light source and optical converter.
Using photoelectric capacitance method, the pulse
measurement was carried out by using human tissue
to cause different transmittance during the pulsation
of blood vessels (Jun, O.Y., 2004). The peak
wavelength of green LED is 515nm, and the peak
wavelength of the optical converter is 565nm. The
peak wavelength is similar, the sensitivity is high,
and the measured heart rate is high. Due to the pulse
signal frequency band, generally between 0.05 ~ 200
Hz, the small amplitude of the signal are susceptible
to interference, after the sensor using low-pass filter
and op-amp, after making the magnified 330 times
of analogy signal by A/D acquisition to easily,
detection circuit as shown in figure 4.
VCC
CLK
DO
DI
CS
CHO
CH1
GND
1
2
3
4
+5V
+5V
1
2
3
4
8
7
6
5
P2.1
P2.2
P2.0
AO
DO
GND
GND
ADC0832
Sensor
Figure4:Heart rate measurement circuit
3.5 Display circuit design
The display module adopts LCD1602A, with 16
characters per line, two lines. The communication
with MCU can be used in eight or four parallel
transmission modes, and the pin D0~D7 is
connected with the single-chip P1.0~ P1.7, as shown
in figure 5. The content displayed has current heart
rate and temperature value; In a state of emergency,
the guardian's name and telephone number are
displayed.
Figure 5: 1602A display circuit
ICECTT 2018 - 3rd International Conference on Electromechanical Control Technology and Transportation
574
3.6 Alarm part
The system uses the alarm of the buzzer and the
remote alarm of GSM short message. The
piezoelectric buzzer is driven by a DC voltage,
which simply gives a low level to the driver and
amplifies the drive current through the Trident,
which can make a sound. MCU P1.6 pin by one
button, when active press K1 key, or has an
abnormal heart rate and temperature, maintaining
measured again after 1 minute, if continued, MCU
P3.2 pin output will have a low level to the buzzer,
make its voice, MCU through GSM part sent SMS
alarm at the same time.
4 THE SOFTWARE DESIGN
4.1 The design of the main program
System main program is mainly used for the
temperature signal of collected and heart rate signal
analysis and processing, and to respond to the LCD
display module, a buzzer linkage control module and
GSM module, initialized to the system, and other
functions. This system adopts the modulus program
structure, which is the core of single chip
microcomputer and program in C language. The
specific main program flow block diagram is shown
in figure6 below.
Figure6: Main program flow chart
4.2 Temperature acquisition program
design
The 12 bit data stored in the DS18B20 internal 12-
bit resolution is stored in two bytes of RAM. The
first five in binary are the sign bits. If the
temperature measured is greater than 0, the five are
0, so as long as the measured value is multiplied by
0.0625, the actual temperature can be obtained. If
the temperature is less than 0, then these five are 1,
and the measured values need to be reversed and
then multiply by 0.625 to get the actual temperature.
According to the health of human body data, the
temperature setting is 36 ~ 37.5 which is
storaged in sensor block of EEPROM, and still
preserved after power off.Figure 7 is a flowchart of
program for temperature collection.
Figure 7:Temperature detection flow chart
4.3 Heart rate collection program
design
When the beam of light through the human body
peripheral vascular, because the pulses with blood
volume changes in the light of the light
transmittance change, when received by
photoelectric converter by the reflection of light,
human tissue into electrical signals and the amplifier
Design of Health and Safety Alarm System Based on MCU
575
and output. The signal change period of the
photoelectric converter is the pulse rate(Zhao,
P.,.2013). Data were related to the health of human
body, the heart rate in 60 ~ 100 / min, into the
program, if measured the heart rate is beyond the
scope of this delay if two minutes later also to
exceed bid, trigger the alarm, the heart rate
acquisition program design process is consistent
with the temperature detection process.
4.4 GSM text part program design
The GSM module SIM800A uses the debug method
of serial communication to control the sending of
SMS via AT command (Liu. J. P., 2010). The
process of sending an English TEXT message by the
system is shown in Figure 8.
Figure 8: GSM SMS sending serial debugging process
4.5 The system test
After electrify 1602A main screen display the word
"SMART HEALTH", began to register the GSM
part network at the same time, the unregistered
successful 1602A of the lower right corner shows
"N", "N" to "Y" after registering successfully, and
the second line shows the value of heart rate and
body temperature value. "T" stands for body
temperature, and "H" stands for heart rate. Heart rate
in 60 ~ 100 / min, temperature between 36 ~ 37.5
, as the normal range; Heart rate or temperature is
beyond the scope and lasts 2 minutes (or
independent press K1 key) and trigger the alarm,
LCD display emergency contact name and number,
the GSM module automatically sent the word
"HELP" information to emergency contacts, send
after a successful 1602A top right corner shows the
"T", normal function of system implementation and
the index precision reached the standard.
5 CONCLUSION
The system uses GSM spontaneous SMS and on-site
buzzer whistle, in the event of sudden illness,
distress and unconscious to the guardian of the
alarm, helps to solve the problem that people are
difficult to get timely assistance for sudden disease.
System is running well, easy to use, can be in the
elderly, children and sudden illness and other
populations to promote the application.
ACKNOWLEDGEMENTS
This research was funded by the Research Project of
Tianjin Education Committee2017KJ180
REFERENCES
Chen, S.X., Gao, Y.Z., Ding, G.C., 2012. Design of
temperature controller based on SPCE061A. Foreign
Electronic Measurement Technology.
Jun, O.Y., Xie, D., 2004.BL-410 based on the application
of pulse wave acquisition system. Practical Preventive
Medicine.
Zhao, P., Luo, X.Q., Huang, J., Li P.,Cui S.Y.,2013.
Design of smart home controlling system based on
GSM SMS. Electronic Measurement Technology.
Liu. J.P., Yu, W.Q.,2010. Design of Remote Controller
Based on GSM in Smart Home.Application of
Embedded Systems.
ICECTT 2018 - 3rd International Conference on Electromechanical Control Technology and Transportation
576