Heart Rate Monitor HRM with SMS Alert
This project is 8051 microcontroller Projects based Heart Rate Monitor HRM with SMS Alert. Heart rate is sensed from the fingertip using a phototransistor / IR LED pair. This method is called photoplethysmography. Photoplethysmography is the volumetric assessment of an organ/tissue using light. IR reflection photoplethysmography is the exact method used here.
Heart Rate Monitor HRM with SMS Alert Circuit
In this Heart Rate Monitor HRM with SMS Alert, IR waves are sent to the tissue, and reflected wave is picked using a photo-transistor. When the heart beats the volume of blood will be more in the tissue. This time more light gets reflected onto the phototransistor. When the heart is not beating the volume of blood inside the tissue will be less and so less light gets reflected onto the photo-transistor. The result will be a pulse waveform at the collector of the photo-transistor. The rate of this pulse waveform will be equal to the heart rate. The waveform is amplified, filtered, squared, and fed to the microcontroller for counting. The circuit diagram of this heart rate monitor is shown below.
heart rate monitor using 8051 microcontroller project report
The GSM module is interfacing with the 8051 microcontrollers using serial communication. RX pin of the GSM module is connected to the TX pin of the microcontroller. A relay is connected to P2.0 through a driving transistor. This relay can be used to switch an alarm or any other device when the heart rate goes above 80 beats per minute. The heart rate is also displayed on a 16×2 LCD module. The LCD module is interfaced through Port 0 and Port 2 of the microcontroller. S2 is a reset switch
Program for Heart Rate Monitor HRM with SMS Alert
RS EQU P2.7 RW EQU P2.6 E EQU P2.5 ORG 000H MOV DPTR,#LUT MOV P2,#00000000B MOV P0,#00000000B ACALL INIT ACALL TEXT1 ACALL LINE2 ACALL TEXT3 MAIN: MOV R6,#228D SETB P3.5 MOV TMOD,#01100001B MOV TL1,#00000000B MOV TH1,#00000000B SETB TR1 BACK: MOV TH0,#00000000B MOV TL0,#00000000B SETB TR0 HERE: JNB TF0,HERE CLR TR0 CLR TF0 DJNZ R6,BACK CLR TR1 CLR TF0 CLR TF1 MOV A,TL1 MOV B,#4D MUL AB MOV R7,A CJNE A,#80D,SKIP SKIP: JC SKIP1 SETB P2.0 SKIP1:JNC CONT CLR P2.0 CONT:CLR PSW.7 ACALL SPLIT ACALL INIT ACALL TEXT1 ACALL LINE2 ACALL TEXT2 ACALL BPM ACALL GSM SJMP MAIN GSM: MOV TMOD,#00100001B MOV TH1,#253D MOV SCON,#50H SETB TR1 MOV A,#"A" ACALL SEND MOV A,#"T" ACALL SEND MOV A,#0DH ACALL SEND ACALL DELAY1 MOV A,#"A" ACALL SEND MOV A,#"T" ACALL SEND MOV A,#"+" ACALL SEND MOV A,#"C" ACALL SEND MOV A,#"M" ACALL SEND MOV A,#"G" ACALL SEND MOV A,#"F" ACALL SEND MOV A,#"=" ACALL SEND MOV A,#"1" ACALL SEND MOV A,#0DH ACALL SEND ACALL DELAY1 MOV A,#"A" ACALL SEND MOV A,#"T" ACALL SEND MOV A,#"+" ACALL SEND MOV A,#"C" ACALL SEND MOV A,#"M" ACALL SEND MOV A,#"G" ACALL SEND MOV A,#"S" ACALL SEND MOV A,#"=" ACALL SEND MOV A,#34D ACALL SEND MOV A,#"+" ACALL SEND MOV A,#"9" ACALL SEND MOV A,#"1" ACALL SEND MOV A,#"9" ACALL SEND MOV A,#"8" ACALL SEND MOV A,#"4" ACALL SEND MOV A,#"7" ACALL SEND MOV A,#"2" ACALL SEND MOV A,#"4" ACALL SEND MOV A,#"2" ACALL SEND MOV A,#"9" ACALL SEND MOV A,#"6" ACALL SEND MOV A,#"1" ACALL SEND MOV A,#34D ACALL SEND MOV A,#0DH ACALL SEND ACALL DELAY1 MOV A,#"B" ACALL SEND MOV A,#"P" ACALL SEND MOV A,#"M" ACALL SEND MOV A,#"=" ACALL SEND MOV A,R1 ACALL ASCII ACALL SEND MOV A,R2 ACALL ASCII ACALL SEND MOV A,R3 ACALL ASCII ACALL SEND ACALL DELAY1 MOV A,#1AH ACALL SEND ACALL DELAY1 RET SEND:CLR TI MOV SBUF,A WAIT:JNB TI,WAIT RET DELAY1:MOV R6,#15D BACK1: MOV TH0,#00000000B MOV TL0,#00000000B SETB TR0 HERE1: JNB TF0,HERE1 CLR TR0 CLR TF0 DJNZ R6,BACK1 RET INIT: MOV A,#0FH ACALL CMD MOV A,#01H ACALL CMD MOV A,#06H ACALL CMD MOV A,#83H ACALL CMD MOV A,#3CH ACALL CMD RET TEXT1: MOV A,#"H" ACALL DISPLAY MOV A,#"e" ACALL DISPLAY MOV A,#"a" ACALL DISPLAY MOV A,#"r" ACALL DISPLAY MOV A,#"t" ACALL DISPLAY MOV A,#" " ACALL DISPLAY MOV A,#"R" ACALL DISPLAY MOV A,#"a" ACALL DISPLAY MOV A,#"t" ACALL DISPLAY MOV A,#"e" ACALL DISPLAY RET LINE2: MOV A,#0C0H ACALL CMD RET TEXT2: MOV A,#"b" ACALL DISPLAY MOV A,#"p" ACALL DISPLAY MOV A,#"m" ACALL DISPLAY MOV A,#" " ACALL DISPLAY RET TEXT3: MOV A,#"c" ACALL DISPLAY MOV A,#"o" ACALL DISPLAY MOV A,#"u" ACALL DISPLAY MOV A,#"n" ACALL DISPLAY MOV A,#"t" ACALL DISPLAY MOV A,#"i" ACALL DISPLAY MOV A,#"n" ACALL DISPLAY MOV A,#"g" ACALL DISPLAY MOV A,#"." ACALL DISPLAY MOV A,#"." ACALL DISPLAY MOV A,#"." ACALL DISPLAY RET BPM: MOV A,R1 ACALL ASCII ACALL DISPLAY MOV A,R2 ACALL ASCII ACALL DISPLAY MOV A,R3 ACALL ASCII ACALL DISPLAY RET CMD: MOV P0,A CLR RS CLR RW SETB E CLR E ACALL DELAY RET DISPLAY:MOV P0,A SETB RS CLR RW SETB E CLR E ACALL DELAY RET DELAY: CLR E CLR RS SETB RW MOV P0,#0FFh SETB E MOV A,P0 JB ACC.7,DELAY CLR E CLR RW RET SPLIT: MOV B,#10D DIV AB MOV R3,B MOV B,#10D DIV AB MOV R2,B MOV R1,A RET ASCII: MOVC A,@A+DPTR RET LUT: DB 48D DB 49D DB 50D DB 51D DB 52D DB 53D DB 54D DB 55D DB 56D DB 57D END