Keywords
|
Intelligent Wireless GSM, DS1307 Real-Time Clock, Heart Beat Sensor, LM35 Temperature Sensor, AT89S52 Microcontroller, MCP3202 12-bit serial A/D Converter, 20x4 LCD |
INTRODUCTION
|
In the past pace of life it is difficult for people to be constantly available for their near ones who might need them while they are suffering from any disease or physical disorder. So constant monitoring of the patient’s body parameters such as body temperature, Pulse rate and sugar level etc becomes difficult [1]. In ICU’s as described that Nurses or other care taker may not be available for constant monitoring of the patient’s health. Due to this sometime, the patient’s health changes to critical from normal condition. |
In this proposed system, we have used a microcontroller based system having various sensors to continuously taking the measurement of the patient’s heart beat, body temperature etc and displaying the same on the LCD continuously. In this system the information about patient’s health is provided within every prescribed interval of time to the Doctor. This time interval is counted by the Real Time Clock (DS1307 RTC) embedded in the system. This data is provided to doctor via Wireless GSM modem. This system takes care of patient’s health 24x7 whereas this facility is not available in the conventional system. |
This proposed system is portable & can be used at the home also and Microcontroller is used in this system AT89S52 which is very cheap in cost so system cost is automatically reduced. For transmission of the message Wireless GSM Technique is used. Here in this system we have made a change that suppose if controller receives the abnormal condition of health of patient via measurement from the sensors and through GSM, it gives a message of the abnormal condition of the patient’s health but due to busyness if doctor has not received the message than it is useless. So to overcome that error In this system before giving the message of the abnormal condition of the patient to the doctor Before this, the system will give a miss call to the doctor’ s cell phone so Doctor will get alert that Message has to come. So Doctor can make easy treatment for the patient’s health. |
For body temperature LM35 (National semiconductor) and for Pulse rate the Heart Beat Sensor of the SUNROM Technologies is used. GSM is used for message transmission and calling purpose or we can say for communication of the Microcontroller with the Doctor for any abnormal condition of the patient’s health. |
HARDWARE
|
A. GSM MODEM SUNROM TECHNOLOGIES
|
This GSM modem is a highly flexible plug and play quad band GSM modem for direct and easy integration to RS232. Supports features like voice, DATA/FAX, SMS, GPRS and integrated TCP/IP stack. This GSM is housed over black plastic casing. Fig. 1 is showing the GSM Modem manufactured by SUNROM Technologies. |
A GSM modem is a wireless modem that works with GSM networks. A wireless modem behaves like a compatible dial-up modem. A GSM modem sends and receives data through radio waves. A GSM modem can be an external unit or a PCMCIA card (also called PC Card). An external GSM modem is connected to a Microcontroller through a serial cable, a USB cable, Bluetooth or Infrared. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate. Microcontroller uses AT commands to control a modem. GSM modems support a common set of AT commands. You can use a GSM modem just like a compatible modem. |
This GSM modem having Quad band GSM/GPRS (850/900/1800/1900Mhz), GPRS multi-slot class 10/8, GPRS mobile station class B, Compliant to GSM phase 2/2+, Class 4 (2W@850/900Mhz), Class 1(1W@1800/1900Mhz), Control via at commands(GSM 07.07,07.05 and enhanced at commands) and Operation temperature(-20 deg c to +55 deg). It operates on the 12V DC and 1A Current. It’s having a RS-232 through D-type 9 pin connector, serial port baud rate adjustable 1200 to115200 bps (9600 default) for communication with the Microcontroller AT89S52. It consists of Stereo connector for MIC & Speaker, Power supply through DC socket, SMA antenna connector, Push switch type SIM holder and Led status of GSM/ GPRS module. [3] |
B. MICROCONTROLLER AT89S52
|
Fig. 2 shows the Microcontroller AT89S52 having 8K Bytes of In-System Reprogrammable Flash Memory Fully Static Operation: 0 Hz to 33 MHz, Three-level Program Memory Lock, 256 x 8-bit Internal RAM, 32 Programmable I/O Lines, Three 16-bit Timer/Counters, Eight Interrupt Sources, Programmable Serial Channel Low-power Idle and Power-down Modes, 4.0V to 5.5V Operating Range, Full Duplex UART Serial Channel Interrupt Recovery from Power-down Mode, Watchdog Timer Dual Data Pointer Power-off Flag and Fast Programming Time Flexible ISP Programming. |
Special Function Register of AT89S52 Microcontroller [4] |
1. IE (Interrupt Enable Register) SFR:
|
This SFR must be initialized in programming to acknowledge the various interrupt signals of GSM, DS1307 and Heart Beat sensors. So According to the priority level it will one by one acknowledge each interrupt signals. TABLE I shows the bits of the IE Interrupt Enable SFR. |
• EX0/EX1 : (1/0) Enable/disables the external interrupt 0 and the external interrupt 1 on port P3.2 and P3.3 |
• ET0/ET1 : (1/0) Enables/disables the Timer0 and Timer1 interrupt via TF0/1 |
• ES : (1/0) Enables/disables the serial port interrupt for sending and receiving data |
• EA : (1/0) Enables/disables all interrupts |
2. IP (Interrupt Priority Register) SFR used for IP setting
|
TABLE II Introduces the bit allocation of the Interrupt Priority Register. |
• PX0/1: External interrupt 0/1 priority level |
• PT0/1/2: Timer0, Timer1, Timer2(8052) interrupt priority level |
• PS: Serial port interrupt priority level |
3. SCON (Serial Port Control Register) SFR
|
TABLE III gives the complete idea about the various bits of the Serial control register (SCON). |
• REN: Receiver enable is set/reset by program |
• TB8: stores transmitted bit 8(9th bit, the stop bit) |
• RB8: Stores received bit 8(9th bit, the stop bit) |
• TI: Transmit Interrupt is set at the end of 8th bit (mode 0)/ at the stop bit (other modes) indicating the completion of one byte transmission, reset by program |
• RI: Receive Interrupt is set at the end of 8th bit (mode 0)/at the stop bit (other modes) indicating the completion of one byte receiving, reset by program |
Above all SFR’s are to be initialized for getting acknowledged of every Interrupt whenever and wherever needed. So for GSM message interrupt, DS1307 Interrupt, Heart Beat sensor interrupt and any prior signal can be easily fed to the controller and can be processed further. So this is how the AT89S52 Microcontroller Controlling whole the process via SFR’s and Programming. This is the main Backbone of this system. |
C. DS1307 RTC (REAL-TIME CLOCK)
|
`In this system DS1307 RTC is used for the Display of time and for storing the data on regular interval. In this system using RTC the Microcontroller is counting pulse rate of patient from the heart beat sensor for the accurate One Minute of duration. We can count the pulse rate of the heart beat sensor by giving one minute delay to the microcontroller but it is not preferable as it is not accurate. |
The DS1307 serial real-time clock (RTC) is a low-power, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially through an I²C, bidirectional bus. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24- hour or 12-hour format with AM/PM indicator. The DS1307 has a built-in power-sense circuit that detects power failures and automatically switches to the backup supply. Timekeeping operation continues while the part operates from the backup supply. Fig 3 shows the PIN outs of the DS1307. [7] |
D. HEART BEAT SENSOR (Model #1157)
|
Fig. 3(a) Shows a Heart Beat Sensor of the SUNROM Technologies. It is designed to give digital output of heat beat when a finger is placed on it. When the heart beat detector is working, the beat LED flashes in unison with each heart beat. This digital output can be connected to microcontroller directly to measure the Beats per Minute (BPM) rate. It works on the principle of light modulation by blood flow through finger at each pulse. It can be used in Digital Heart Rate monitor, Patient Monitoring System and Bio-Feedback control of robotics and applications. |
Working of the sensor:
|
Fig. 3(b) is showing that how this Heart Beat sensor is working. The sensor consists of a super bright red LED and light detector. The LED needs to be super bright as the maximum light must pass spread in finger and detected by detector. Now, when the heart pumps a pulse of blood through the blood vessels, the finger becomes slightly more opaque and so less light reached the detector. With each heart pulse the detector signal varies. This variation is converted to electrical pulse. This signal is amplified and triggered through an amplifier which outputs +5V logic level signal. The output signal is also indicated by a LED which blinks on each heart beat. [2] |
E. LM35 TEMPERATURE SENSOR
|
In this system the body temperature of the patient is measured by the LM35 DT sensor manufactured by the national semiconductor as shown in Fig. 4. LM35 is a precision IC temperature sensor with its output proportional to the temperature (in oC). The sensor circuitry is sealed and therefore it is not subjected to oxidation and other processes. With LM35, temperature can be measured more accurately than with a thermistor. It also possess low self heating and does not cause more than 0.1 oC temperature rise in still air. The operating temperature range is from -55°C to 150°C. The output voltage varies by 10mV in response to every oC rise/fall in ambient temperature, i.e., its scale factor is 0.01V/ oC. [6] |
F. MCP3202 12- BIT A/D CONVERTER
|
The temperature sensor LM35 provides the analog output signal in mV range for the sensed temperature of body but Microcontroller AT89S52 can’t recognize this analog signal. So for that MCP3202 12-bit serial A/D converter is used here so that it can convert this analog signal into digital format so that controller can recognize this signal and can do further processing. The MCP3202 12-bit Analog-to-Digital Converter (ADC) combines high performance and low power consumption in a small package, making it ideal for embedded control applications. The MCP3202 features a successive approximation register (SAR) architecture and an industry-standard SPI™ serial interface, allowing 12-bit ADC capability to be added to any microcontroller. The MCP3202 features 100k samples/second, 2 input channels, low power consumption (5nA typical standby, 550 μA max. active), and is available in 8-pin PDIP, SOIC and TSSOP packages. Applications for the MCP3202 include data acquisition, instrumentation and measurement, multi-channel data loggers, industrial PCs, motor control, robotics, industrial automation, smart sensors, portable instrumentation and home medical appliances. [5] |
The temperature sensor LM35 provides the analog output signal in mV range for the sensed temperature of body but Microcontroller AT89S52 can’t recognize this analog signal. So for that MCP3202 12-bit serial A/D converter is used here so that it can convert this analog signal into digital format so that controller can recognize this signal and can do further processing. The MCP3202 12-bit Analog-to-Digital Converter (ADC) combines high performance and low power consumption in a small package, making it ideal for embedded control applications. The MCP3202 features a successive approximation register (SAR) architecture and an industry-standard SPI™ serial interface, allowing 12-bit ADC capability to be added to any microcontroller. The MCP3202 features 100k samples/second, 2 input channels, low power consumption (5nA typical standby, 550 μA max. active), and is available in 8-pin PDIP, SOIC and TSSOP packages. Applications for the MCP3202 include data acquisition, instrumentation and measurement, multi-channel data loggers, industrial PCs, motor control, robotics, industrial automation, smart sensors, portable instrumentation and home medical appliances. [5] |
G. 20x4 LCD
|
20x4 LCD is used for display purpose of the data so that anyone can see that how much is the patient parameters are presently there. 20x4 LCD having 4 – lines and Each 4 – lines can have 20 characters. So we can display Time and date that is coming out from RTC in 1st line of LCD, Temperature in 2nd line, Heart beat in 3rd line and Previous data of BPM in the last 4th line. |
SYSTEM DEVELOPMENT
|
Fig. 5 shows the block diagram of the Advanced Intelligent Patient monitoring system. Various physiological biometrics such as body temperature pulse rate and blood pressure are continuously monitored as well as controlled wirelessly using GSM with this system. |
Various Sensors & transducers are used in this system to sense bioelectrical signals are as follows: |
A. Microcontroller AT89S52: This Microcontroller AT89S52 is the main backbone of the system. This is having different SFR’s for synchronously controlling of the different interrupt subroutines such as heart beat sensor, DS1307 interrupt and other maskable and non-maskable interrupts. This controller getting the data from various bioelectric sensors and according to their abnormal limits it generates the alert signals and messages. |
B. Heart Rate sensor: It Provides the Square Wave programmable output for each pulse so we can easily count those no. Of pulses for the duration of 1 minute using RTC and we can count the BPM of the patient. |
C. LM35 DT Temperature sensor: This IC is used here for measuring the temperature of the patient’s body. It provides the mV output with respective to the measured temperature. After that this mV analog signal is given to the A/D converter for converting it into the digital signal so that microcontroller can recognize that temperature into digital form. |
D. MCP3202 12-bit A/D Converter: AT89S52 is low cost controller so it’s having less I/O ports. So for that parallel A/D can’t be used due to unavailability of ports. So here Serial A/D is used and by using this we have need not to use all ports of Microcontroller, only one pin of port is sufficient for this so we can preserve other 7 pins of the ports for further need. CLK (Clock) and Active low CS (Chip select) pin is to be initialized for programming of the A/D. |
E. DS1307 RTC: It is working on 32.7 kHz of crystal and 3V stand by battery backup. After power up it increments the register value of second and according to second it incrementing the value of minute registers and hour registers. By SCL and SDA pin initialization we can write these date, time, year, minute, second and hour data manually with microcontroller to the DS1307 RTC. |
F. GSM Module: This GSM modem is working as a transmission medium between System and Doctor. Whenever if any abnormality comes in the health of the patient then the microcontroller detect that and give the miss call and alert message via this GSM modem to the Doctor’s cell phone. So Doctor can provide ease and fast treatment to patient. This GSM is connected to the Microcontroller to MAX232 via RS232 Cable. |
G. LCD: This LCD is displaying the Time, Date, Year, BPM (Bits per Minute), Temperature (LM35) and Past value of BPM to the LCD as described previously. |
FLOW CHART
|
Fig. 6 shows sequential flow chart of this whole system execution. This system will be powered up by Power supply. After power up, by below given flow chart the whole control strategy is executed. One by one it tests the conditions and follows the next step according to logic of the whole Algorithm. The Flow chart/algorithm is as given above. |
CONCLUSION
|
The purpose of this project is to help those peoples who need help in emergency in remote location as fast as possible. This project is cost effective and can be used for Real- Time as it is embedded with the DS1307 RTC. It can be used at home as it is portable and easy to use. It will store the date and time as DS1307 having a auto power failure detector. We can expand this system by adding Blood pressure sensor and other biometric sensor as a future expansion. When a controller detects abnormalities in the patient’s health at that time it gives a message to doctor via GSM so the fast treatment can be provided by the doctor. This is the main advantage of this system. |
Tables at a glance
|
|
|
|
|
Table 1 |
Table 2 |
Table 3 |
Table 4 |
|
Figures at a glance
|
|
|
|
|
Figure 1 |
Figure 2 |
Figure 3 |
Figure 4 |
|
|
|
|
Figure 5 |
Figure 6 |
Figure 7 |
Figure 8 |
|
References
|
- Manish M. Patil, Prof. Chaya S. Khandelwal, “Implementation of Patient monitoring System using GSM Technology”, IJCET (IAEME) ,Volume 4, Issue 1, pp. 18-24 January- February (2013)
- “Heart Beat Sensor” http://www.sunrom.com/files/1157-datasheet.pdf, pp.1-6
- “GSM modem” http://www.sunrom.com/files/1122-datasheet.pdf, pp.1-2
- “ Special Function Register of AT89S52 Microcontroller” http://www.atmel.com/images/doc1919.pdf, pp.6-9
- “Datasheet of MCP3202 12-bit A/D Converter” ww1.microchip.com/downloads/en/DeviceDoc/21034D.pdf, pp.1-28
- “Datasheet of LM35 Temperature sensor” www.alldatasheet.com/datasheet-pdf/pdf/8866/NSC/LM35.html, pp1-13.
- “Datasheet of DS1307 RTC” www.datasheets.maximintegrated.com/en/ds/DS1307.pdf, pp.1-14
|