A kind of remote electrocardiogram monitor instrument based on ATmega32Technical field
The present invention relates to a kind of detecting instrument, more particularly to a kind of remote electrocardiogram monitor instrument based on ATmega32.
Background technology
With the improvement of people ' s living standards, the quickening of rhythm of life and the change of dietary structure, the incidence of disease of angiocardiopathy rise rapidly, and angiocardiopathy has turned into one of principal element of threat human health.The characteristics of having the hidden state of an illness, slower development, onset risk high due to heart disease, its harmfulness to cardiac, particularly middle-older patient is to threaten human life's safety " the first killer " greatly.1/3rd are there are about in deaths worldwide according to statistics and dies from the disease, the 44% of death toll is accounted in the number of China's death because of angiocardiopathy, it can be seen that heart disease has turned into the frequently-occurring disease and common disease of harm human health, therefore the preventing and treating and diagnosis of cardiac system disease are matters of utmost importance that current medical field faces.
Electrocardiosignal is that the mankind study and are applied to one of clinical medical bioelectrical signals earliest, and it is more easily detected and with more regular than other bioelectrical signals.Currently, the treatment of electrocardiosignal is still one of important research object of biomedical sector, is medically highly important detection foundation.
Since recording cardiac electrical activity from beginning of this century Einthoven research invention string of a musical instrument type electrocardiographs and from body surface, electrocardiology develops after a century.In the meantime not only routine electrocardiogram detection technique update in itself it is perfect, develop from surface electrocardiogram simultaneously and derive from the various detection methods of research cardiac electric signals and competitively come out, the particularly progress of modern electronic technology in recent years and digital computer technique is developed by leaps and bounds to have greatly facilitated ecg information and studied and developed to depth direction.Cardiac monitoring common at present has mode and the instruments such as bedside cardiac monitoring, dynamic ecg monitoring, phone cardiac telemetry, wireless cardiac telemetry.Bedside cardiac monitoring limits the activity of patient;HOLTER systems can continuously record the electrocardio multidate information of patient for a long time, but cannot realize real-time analytic function;Phone cardiac telemetry still can limit the activity of patient, and be difficult to prolonged monitoring;Wireless cardiac telemetry can allow patient movable within the specific limits, and its electrocardiosignal can be reflected in Radioteloemetry And Analysis System in real time, but wireless ecg telemetry system needs transmitter-receiver device, and circuit structure is complicated, and application chip is more.
How accommodating, economic daily cardioelectric monitor is entered, we specially devise a kind of portable remote electrocardioscanner, the features such as it has fast integrated level high, small volume, reaction speed, intellectuality, stablizes and be highly reliable, the ecg information of wearer can fully automatically be monitored, then ecg information is sent to hospital or other monitoring departments by mobile phone, automatically it is analyzed, judges, if noting abnormalities, auditory tone cues is sent immediately, and abnormal electrocardiogram waveform recording, storage are processed in a computer and with reference to expert opinion.The ecg information of monitoring record can be played back by computer, printed, it is storable in being preserved as original case history archive in computer, it is not limited by patient activity's state, record when and where, can provide objective indicator for the Correct Analysis of heart disease, diagnosis, treatment and monitoring.
The content of the invention
It is an object of the invention to provide a kind of collection that can complete electrocardiosignal, storage, and the electrocardiogram (ECG) data of storage is transferred to the remote electrocardiogram monitor instrument based on ATmega32 of the PC of hospital by mobile phone.
The purpose of the present invention is achieved through the following technical solutions:
A kind of remote electrocardiogram monitor instrument based on ATmega32, including hardware and software, it is characterised in that:The hardware by:Microcontroller ATmega32, amplifying circuit, filter circuit, samples storage circuit, communication interface, constituted without the positive regulation charge pump DC/DC converters of inductance, warning device;The software by registration, collection, storage, analyzing and diagnosing, alarm, wire transmission, be wirelessly transferred and constitute.
The samples storage circuit connection is without the positive regulation charge pump DC/DC converters of inductance, it is described to connect filter circuit without the positive regulation charge pump DC/DC converters of inductance, the filter circuit connects amplifying circuit, amplifying circuit connection the microcontroller ATmega32, the microcontroller ATmega32 connect warning device.
The samples storage circuit uses AT45D021B memories.
The warning device uses buzzer.
The collection detailed process of the electrocardiosignal is as follows:Subprogram initialization is first acquired, A/D conversion and control registers are set, then the T0 timers inside single-chip microcomputer are set, then open interruption, start sampling;Which passage changed by ADROAD controls A/D;Etc. to be interrupted, into after interruption subroutine, data acquisition is carried out, first adopt baseline, followed by calibration, be finally electrocardiogram (ECG) data;After having adopted sample every time, in the data register of the data feeding ADC that will be gathered, start storage program;After returning to breakpoint, diagnostic alarms program is performed, while wait is interrupted next time;So circulation, goes round and begins again.
In the process of running:When alert event occurs, alarm subprogram is called;In subprogram of alarming, timer is opened regularly, juxtaposition interrupt identification, while stopping is gathered mark OK setting to 0, after having performed, jumps out subprogram;When timing time is arrived, timer interruption is produced;In interrupt service subroutine, the PD2 pins for making single-chip microcomputer be connected with buzzer are set to low level, stop the alarm of buzzer;Alarm subprogram is jumped out, waits interruption subroutine to complete, buzzer calls storage page number program first after stopping, then calling mobile phone is wirelessly transferred program, and the transmission of abnormal data is carried out after dialing;Judge electrocardio whether abnormal and when alarm, the data that we are analyzed every time are the data of wherein 20 seconds, individually judge there is anomaly in this 20 second data, can not illustrate that heart rate is abnormal, it is probably the fortuitous phenomena caused due to extraneous some factors, so each time after analysis exception, can not alarm at once, should continue to take out one group of new data from data field and be analyzed, if having exception in the ensuing several groups of data of 20 seconds, illustrate that heart rate is really abnormal, at this moment can just start warning device, notify patient.
Beneficial effects of the present invention:A kind of remote electrocardiogram monitor instrument based on ATmega32 of the invention, it is primarily used to monitor the not normal of electrocardiosignal, once it is abnormal to detect heart rate, start warning device at once, notify that patient, patient can be dialled with mobile phone to hospital monitoring center, transmit the electrocardiogram (ECG) data of oneself, reach diagnosis in time, in time the purpose for the treatment of, and with integrated level is high, small volume, reaction speed are fast, intelligent, stabilization and it is highly reliable the features such as.
Brief description of the drawings
Fig. 1 is system block diagram of the invention;
Fig. 2 is software flow pattern of the invention;
Fig. 3 realizes flow chart for alarm of the invention.
Specific embodiment
The present invention is described in further detail below in conjunction with the accompanying drawings.
Embodiment 1
As shown in Figure 1 and Figure 2, a kind of remote electrocardiogram monitor instrument based on ATmega32, including hardware and software, it is characterised in that:The hardware by:Microcontroller ATmega32, amplifying circuit, filter circuit, samples storage circuit, communication interface, constituted without the positive regulation charge pump DC/DC converters of inductance, warning device;The software by registration, collection, storage, analyzing and diagnosing, alarm, wire transmission, be wirelessly transferred and constitute.
The samples storage circuit connection is without the positive regulation charge pump DC/DC converters of inductance, it is described to connect filter circuit without the positive regulation charge pump DC/DC converters of inductance, the filter circuit connects amplifying circuit, amplifying circuit connection the microcontroller ATmega32, the microcontroller ATmega32 connect warning device.
The samples storage circuit uses AT45D021B memories.
The warning device uses buzzer.
The collection detailed process of the electrocardiosignal is as follows:Subprogram initialization is first acquired, A/D conversion and control registers are set, then the T0 timers inside single-chip microcomputer are set, then open interruption, start sampling;Which passage changed by ADROAD controls A/D;Etc. to be interrupted, into after interruption subroutine, data acquisition is carried out, first adopt baseline, followed by calibration, be finally electrocardiogram (ECG) data;After having adopted sample every time, in the data register of the data feeding ADC that will be gathered, start storage program;After returning to breakpoint, diagnostic alarms program is performed, while wait is interrupted next time;So circulation, goes round and begins again.
In the process of running:When alert event occurs, alarm subprogram is called;In subprogram of alarming, timer is opened regularly, juxtaposition interrupt identification, while stopping is gathered mark OK setting to 0, after having performed, jumps out subprogram;When timing time is arrived, timer interruption is produced;In interrupt service subroutine, the PD2 pins for making single-chip microcomputer be connected with buzzer are set to low level, stop the alarm of buzzer;Alarm subprogram is jumped out, waits interruption subroutine to complete, buzzer calls storage page number program first after stopping, then calling mobile phone is wirelessly transferred program, and the transmission of abnormal data is carried out after dialing;Judge electrocardio whether abnormal and when alarm, the data that we are analyzed every time are the data of wherein 20 seconds, individually judge there is anomaly in this 20 second data, can not illustrate that heart rate is abnormal, it is probably the fortuitous phenomena caused due to extraneous some factors, so each time after analysis exception, can not alarm at once, should continue to take out one group of new data from data field and be analyzed, if having exception in the ensuing several groups of data of 20 seconds, illustrate that heart rate is really abnormal, at this moment can just start warning device, notify patient.
Embodiment 2
As shown in figure 1, hardware of the invention mainly includes following components:Microcontroller ATmega32, amplifying circuit, filter circuit, samples storage circuit, communication interface etc..
Dynamic electrocardiogram recording instrument is that patient carries with, so we are with general 2 whose power supplied, charge pump DC/DC converters --- TPS60110 is adjusted without inductance forward direction using what TI companies produced.In the running of electrocardiogram equipment, having many places can all use alarm, therefore, warning device is also an indispensable part in the middle of electrocardiogram equipment, single-chip microcomputer is connected by a part of logic circuit with buzzer, the sound for setting the Automatic level control buzzer of single-chip processor i/o pin PD2 goes out, and judges it is which alert event occurs successively, then goes to perform corresponding program and solves event.In the present invention, we are primarily used to monitor the not normal of electrocardiosignal, once it is abnormal to detect heart rate, start warning device at once, notify that patient, patient can be dialled with mobile phone to hospital monitoring center, the electrocardiogram (ECG) data of oneself is transmitted, diagnosis in time is reached, in time the purpose for the treatment of.
Embodiment 3
Main to include registration as shown in Fig. 2 in main program of the invention, collection, storage, analyzing and diagnosing, alarm, wire transmission such as is wirelessly transferred at several parts.The collection detailed process of electrocardiosignal is as follows:Subprogram initialization is first acquired, A/D conversion and control registers are set, then the T0 timers inside single-chip microcomputer are set, then open interruption, start sampling.Which passage changed by ADROAD controls A/D, waits to be interrupted, into after interruption subroutine, carries out data acquisition, first adopts baseline, followed by calibration, is finally electrocardiogram (ECG) data.After having adopted sample every time, in the data register of the data feeding ADC that will be gathered, start storage program;After returning to breakpoint, diagnostic alarms program is performed, while wait is interrupted next time;So circulation, goes round and begins again.So, system just can ceaselessly carry out sampling with a fixed frequency and A/D converted.
Embodiment 4
As shown in figure 3, the present invention is alarmed primarily directed to anomalous ecg, when alert event occurs, alarm subprogram is called, in subprogram of alarming, timer is opened regularly, juxtaposition interrupt identification, make stopping gather mark OK simultaneously to set to 0, after having performed, jump out subprogram.When timing time is arrived, timer interruption is produced.In interrupt service subroutine, the PD2 pins for making single-chip microcomputer be connected with buzzer are set to low level, stop the alarm of buzzer, jump out alarm subprogram, interruption subroutine is waited to complete, buzzer calls storage page number program first after stopping, then calling mobile phone is wirelessly transferred program, and the transmission of abnormal data is carried out after dialing.Judge electrocardio whether abnormal and when alarm, the data that we are analyzed every time are the data of wherein 20 seconds, individually judge there is anomaly in this 20 second data, can not illustrate that heart rate is abnormal, it is probably the fortuitous phenomena caused due to extraneous some factors, so each time after analysis exception, can not alarm at once, should continue to take out one group of new data from data field and be analyzed, if having exception in the ensuing several groups of data of 20 seconds, illustrate that heart rate is really abnormal, at this moment can just start warning device, notify patient.