Published on

The object of our project is acquisition of Electro cardiogram signal from patient‟s body through wearable system, analyze whether it is normal or abnormal at patient‟s end, then transmit the wireless signal if found that it is abnormal. Transmission is to be done wirelessly through XBEE Technology and then higher level analysis is to be done on computer which is situated at base -station. To achieve our objective we have used microcontroller AT Mega 32 and for its programming we have used dynamic C with AVR Studio base. For higher level analysis we have made software using Java J2EE, Java Script and PHP

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Biomedical Wireless Sensor Network Biomedical Wireless Sensor Network BE-Sem- VIII Prepared at Prepared by Shah Dhara M. ID No. 056079 Viroja Pooja S. ID No. 051118 Shah Ishan D. ID No. 13821 Guided ByProf. Dr. Prabhat Ranjan Prof. R.S.ChhajedDept. of Wireless Communication Head of Dept. of InformationTechnology TechnologyDA-IICT, Gandhinagar DDU, Nadiad Department of Information Technology Faculty of Technology, Dharamsinh Desai University College Road, Nadiad-387001 March-April 2009DDU (Faculty of Tech., Dept. of IT) Page 1
  2. 2. Biomedical Wireless Sensor Network TABLE OF CONTENTS Title Page NoABSTRACT…………………………………………………………………..51.0 Introduction…………………………………………………….............8 1.1 Project Details 1.2 Purpose 1.3 Scope 1.4 Objective 1.5 Technology and Literature Review 1.5.1 ECG Signal 1.5.2 Electrodes 1.5.3 Amplifiers and Filters 1.5.4 QRS Detector 1.5.5 STK_500 Kit 1.5.6 Microcontroller IC-ATMEGA32 1.5.7 XBee2.0 Project Management………………………………………………….54 2.1 Feasibility Study 2.1.1 Technical feasibility 2.1.2 Time schedule feasibility 2.1.3 Operational feasibility 2.1.4 Implementation feasibility 2.2 Project Planning 2.2.1 Project Development Approach and justification 2.2.2 Project Plan 2.2.3 Milestones and Deliverables 2.2.4 Roles and Responsibilities 2.2.5 Group Dependencies 2.3 Project Scheduling Project scheduling chart3.0 System Requirements Study………………………………………….57 3.1 History of ECG 3.2 Study of Current System 3.3 Problems and Weaknesses of Current System 3.4 System User CharacteristicsDDU (Faculty of Tech., Dept. of IT) Page 2
  3. 3. Biomedical Wireless Sensor Network 3.5 Hardware and Software requirements 3.6 Constraints 3.6.1 Regulatory Policies 3.6.2 Hardware Limitations 3.6.3 Interfaces to Other Applications 3.6.4 Parallel Operations 3.6.5 Higher Order Language Requirements 3.6.6 Reliability Requirements 3.6.7 Criticality of the Application 3.6.8 Safety and Security Consideration 3.7 Assumptions and Dependencies4.0 System Analysis………………………………………………………..62 4.1 Requirements of New System (SRS) 4.1.1 User Requirements 4.1.2 System Requirements 4.2 Features of New System 4.3 Navigation Chart 4.4 Class Diagram (Analysis level, without considering impl. environment) 4.5 System Activity(Use case and/or scenario diagram) 4.6 Sequence Diagram (Analysis level, without considering impl. Environment) 4.7 Data Modeling 4.7.1 Data Dictionary 4.7.2 ER Diagram5.0 System Architecture Design………………………………………….65 5.1 Pre-Amplifier Circuit 5.2 Post-Amplifier Circuit 5.3 QRS Detector Circuit 5.4 Controller Circuit 5.5 Hardware Module6.0 Implementation Planning…………………………………………….74 6.1 Implementation Environment 6.2 Program Specification 6.3 Coding StandardsDDU (Faculty of Tech., Dept. of IT) Page 3
  4. 4. Biomedical Wireless Sensor Network7.0 Testing…………………………………………………………………83 7.1 Testing Plan 7.2 Testing Strategy 7.3 Testing Methods 7.4 Test Cases 7.4.1 Purpose 7.4.2 Required Input 7.4.3 Expected Results8.0 Limitation and Future Enhancements……………………………..849.0 Conclusion and Discussion …………………………………………86 9.1 Conclusions and Future Enhancement 9.2 Discussion 9.2.1 Self Analysis of Project Viabilities 9.2.2 Problem Encountered and Possible Solutions 9.2.3 Summary of Project workEXPERIENCE…………………………………………………………….87REFERENCES……………………………………………………………89DDU (Faculty of Tech., Dept. of IT) Page 4
  5. 5. Biomedical Wireless Sensor NetworkAbstractThe object of our project is acquisition of Electro cardiogram signal frompatient‟s body through wearable system, analyze whether it is normal orabnormal at patient‟s end, then transmit the wireless signal if found that it isabnormal. Transmission is to be done wirelessly through XBEE Technologyand then higher level analysis is to be done on computer which is situated atbase -station. To achieve our objective we have used microcontroller AT Mega32 and for its programming we have used dynamic C with AVR Studio base.For higher level analysis we have made software using Java J2EE, Java Scriptand PHP.DDU (Faculty of Tech., Dept. of IT) Page 5
  6. 6. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 6
  7. 7. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 7
  8. 8. Biomedical Wireless Sensor NetworkChapter 1 INTRODUCTION1.1 PROJECT DETAILSThis document aims to define the overall hardware and software requirements for “BiomedicalWireless Sensor Network” project. Efforts were exhaustively accurate to fulfill the requirements.The final system will be having only features mentioned in this document and assumptions for anyadditional functionality should not be made by any of the parties’ moves in developing this system.This system will be working to take an ECG Signal from the patient and analysis it. If any abnormalityis present, transmit it and inform the Doctor through wireless device.1.2 PURPOSEThis specification document describes the capabilities that will be provided by the hardware as wellas software application. It also states the various required constraints by which the system willabide. The intended evidence for this document is the Development Team, Testing Team and usersof this document.This system is designed basically for old age people. We know that in Old Age Home people movefreely in the surrounding area and for their heart care, we make wearable ECG monitor which is ranga buzzer if any abnormality happened with patient heart and send this abnormal signal to the Doctorthrough wireless then corresponding, immediately Doctor service can be provided.1.3 SCOPEAccording to project aim the heart patient can consult Doctor if any abnormal thing happened withhis or her heart. And for that this wearable ECG monitor is helpful. Like for Old Age Home people,they wear it and move freely in campus. Another scope is that we can use it in hospitals for heartpatients and in resident society, mall, office building. The coverage area can change according therange of the wireless device.DDU (Faculty of Tech., Dept. of IT) Page 8
  9. 9. Biomedical Wireless Sensor Network1.4 OBJECTIVEEstimation was made that about 17.5 million people were died from cardiovascular disease in 2005,representing 30 % of all global deaths. Out of these deaths, 7.6 million were due to heart attacks and5.7 million were due to stroke. If current trends are allowed to continue, by 2015 an estimated 20million people will die from cardiovascular disease, mainly from heart attacks and strokes.Unfortunately, out of these heart attacks, 250,000 are sudden, causing the patient to die within anhour. And it is estimated that about 47% of cardiac deaths occur before emergency services ortransport to a hospital.This wearable ECG sensor can provide emergency services and may reduce the death rate, occurbefore emergency services.1.5 TECNOLOGY AND LITERATURE REVIEW1.5.1 ECG Signal  Blood Circulation Through Heart The heart is one of the most important organs in the entire human body. It is really nothingmore than a pump, composed of muscle which pumps blood throughout the body, beatingapproximately 72 times per minute of our lives.DDU (Faculty of Tech., Dept. of IT) Page 9
  10. 10. Biomedical Wireless Sensor Network Figure 1.1 Anatomy of the Heart Figure 1.2 Blood circulation in the HeartFigure 5.1.2 shows the circulation of blood through the heart. The blood enters the rightatrium of the heart through the superior vena cava. The right atrium contracts and pushes theblood cells through the tricuspid valve into the right ventricle. The right ventricle thencontracts and pushes the blood through the pulmonary valve into the pulmonary artery, whichbrings it to the lungs. In the lungs, the blood cells exchange carbon dioxide for oxygen. Thisoxygenated blood returns to the heart by way of the pulmonary vein and enters the leftatrium. The left atrium contracts and pumps the blood through the mitral valve into the leftventricle. Then, the left ventricle contracts and pushes the blood into the aorta. The aortabranches off into several different arteries that pump the oxygenated blood to various parts ofthe body. So the flow is… Anterior and posterior vena cava -> right atrium -> tricuspid valve -> right ventricle ->pulmonary semi lunar valve -> pulmonary artery -> lungs -> pulmonary veins -> left atrium -> bicuspid valve -> left ventricle -> aortic semi lunar valve -> aorta -> arteries -> body.DDU (Faculty of Tech., Dept. of IT) Page 10
  11. 11. Biomedical Wireless Sensor Network Heart is having its own source of oxygenated blood. The heart is supplied by its own set ofblood vessels. These are the coronary arteries. There are two main ones with two majorbranches each. They arise from the aorta right after it leaves the heart. The coronary arterieseventually branch into capillary beds that course throughout the heart walls and supply theheart muscle with oxygenated blood. The coronary veins return blood from the heart muscle,but instead of emptying into another larger vein, they empty directly into the right atrium.  Electrical Activity Of The Heart The heart has a natural pacemaker that regulates the pace or rate of the heart. It sits inthe upper portion of the right atrium (RA) and is a collection of specializes electrical cells known asthe SINUS or SINO-ATRIAL (SA) node. Figure 1.3 Sequence of electrical activity within the Heart The sequence of electrical activity within the heart is displayed in the diagrams above and occurs asfollows: As the SA node fires, each electrical impulse travels through the right and left atrium.This electrical activity causes the two upper chambers of the heart to contract. This electrical activityand can be recorded from the surface of the body as a "P" wave" on the patients EKG or ECG(electrocardiogram). The electrical impulse then moves to an area known as the AV (atrium-ventricular) node.This node sits just above the ventricles. Here, the electrical impulse is held up for a brief period. Thisdelay allows the right and left atrium to continue emptying its blood contents into the twoventricles. This delay is recorded as a "PR interval." The AV node thus acts as a "relay station"delaying stimulation of the ventricles long enough to allow the two atria to finish emptying. Following the delay, the electrical impulse travels through both ventricles. The electricallystimulated ventricles contract and blood is pumped into the pulmonary artery and aorta. Thiselectrical activity is recorded from the surface of the body as a "QRS complex". The ventricles thenrecover from this electrical stimulation and generate an "ST segment" and T wave on the EKG.DDU (Faculty of Tech., Dept. of IT) Page 11
  12. 12. Biomedical Wireless Sensor Network In case of the heart, adrenaline plays the role to increase the number of impulses perminute, which in turn increases the heart rate. The release of adrenaline is controlled by the nervoussystem. The heart normally beats at around 72 times per minute and the sinus node speeds upduring exertion, emotional stress, fever, etc., or whenever our body needs an extra boost of bloodsupply. In contrast, it and slows down during rest or under the influence of certain medications. Welltrained athletes also tend to have a slower heart beat. Figure 1.4 Graphical Representation of ECG SignalThe different waves that comprise the ECG represent the sequence of depolarization andrepolarization of the atria and ventricles. The ECG is recorded at a speed of 25 mm/sec, andthe voltages are calibrated so that 1 mV = 10 mm in the vertical direction. Therefore, eachsmall 1-mm square represents 0.04 sec (40 msec) in time and 0.1 mV in voltage.1.5.2 Electrodes  Limbs ElectrodesThere are different types of electrodes like Augmented Electrodes, Limbs Electrodes and ChestElectrodes. In which limbs electrodes are mostly used. Bipolar recordings utilize standard limb leadconfigurations depicted at the right. By convention, lead I have the positive electrode on the leftDDU (Faculty of Tech., Dept. of IT) Page 12
  13. 13. Biomedical Wireless Sensor Networkarm, and the negative electrode on the right arm, and therefore measure the potential differencebetween the two arms. In this and the other two limb leads, an electrode on the right leg serves as areference electrode for recording purposes. In the lead II configuration, the positive electrode is onthe left leg and the negative electrode is on the right arm. Lead III has the positive electrode on theleft leg and the negative electrode on the left arm. Whether the limb leads are attached to the endof the limb or at the origin of the limb makes no difference in the recording because the limb cansimply be viewed as a long wire conductor originating from a point on the trunk of the body. Figure 1.5 Leads ConfigurationBased upon universally accepted ECG rules, a wave a depolarization heading toward the left armgives a positive deflection in lead I because the positive electrode is on the left arm. Maximalpositive ECG deflection occurs in lead I when a wave of depolarization travels parallel to the axisbetween the right and left arms. If a wave of depolarization heads away from the left arm, thedeflection is negative. Also by these rules, a wave of repolarization moving away from the left arm isrecorded as a positive deflection. Similar statements can be made for leads II and III in which thepositive electrode is located on the left leg. For example, a wave of depolarization traveling towardthe left leg produces a positive deflection in both leads II and III because the positive electrode forboth leads is on the left leg. A maximal positive deflection is recorded in lead II when thedepolarization wave travels parallel to the axis between the right arm and left leg. Similarly, amaximal positive deflection is obtained in lead III when the depolarization wave travels parallel tothe axis between the left arm and left leg.DDU (Faculty of Tech., Dept. of IT) Page 13
  14. 14. Biomedical Wireless Sensor Network1.5.3 AMPLIFIER AND FILTERSLow Pass FilterFigure 1.9 – Implemented Low Pass FilterSince the ECG signal is contained in the relatively narrow frequency spectrum below 100Hz, a lowpass filter can remove a large amount of ambient noise. With microprocessors and an RF transmitterin close proximity to the analogue circuitry, the low pass filter is responsible for ensuring these donot detrimentally affect the ECG obtained. The low pass filter implemented is shown in Figure above.It is a first order active filter. The corner frequency is calculated to be 105Hz. An active filter wasused as it also provides gain. The gain of the filter is given by the ratio of R9 to R8; in thisimplementation it is 13.6. Figure below shows the frequency response of the filter as generated byPSPICE.DDU (Faculty of Tech., Dept. of IT) Page 14
  15. 15. Biomedical Wireless Sensor NetworkFigure 1.10 – Frequency Response of Low Pass FilterA first order filter was deemed to be adequate since little noise is contained in the frequency bandimmediately above 100Hz and the 20dB/decade attenuation roll-off is effective in removing themicroprocessor and RF circuitry noise contained in the megahertz.DDU (Faculty of Tech., Dept. of IT) Page 15
  16. 16. Biomedical Wireless Sensor Network50Hz Notch FilterFigure 1.11 – Implemented Notch FilterMains power noise is the biggest problem for normal ECG measurement, and especially so in thissystem due to the unsuitability of right leg driver circuitry. In order to combat this, a notch filter isimplemented. Numerous filter topologies were tried in PSPICE such as the Fliege and Sallen-Key,before it was decided that the Twin T provided the best result. The implemented filter is shown inFigure above, with the frequency response to a 1V AC signal shown in Figure below.DDU (Faculty of Tech., Dept. of IT) Page 16
  17. 17. Biomedical Wireless Sensor NetworkFigure 1.12 – PSPICE Simulation of Notch Filter ResponseDDU (Faculty of Tech., Dept. of IT) Page 17
  18. 18. Biomedical Wireless Sensor NetworkDifficulties arise in the physical construction of the filter due to the large tolerances of capacitors.The depth of the notch depends greatly on accurate components and much effort is required toidentify capacitors which give good attenuation at the correct frequency. In the final product,capacitors C7, C8 and C9 are implemented as a couple of capacitors in parallel after having beentested and proven to work together to give a good result. The rejection quality could be easilyimproved by decreasing R3, but is not easy to implement because a narrower filtering bandwidthrequires more accurate components determining the bandwidth.Summing Amplifier Figure 1.12 – Implemented Summing AmplifierAfter filtering and amplification, the data is ready to be digitised by the ADC. The ADC requires thesignal it is sampling to be contained completely in the positive voltage domain. The summingamplifier is used to achieve this and its topology is shown in Figure above. The DC voltage that theDDU (Faculty of Tech., Dept. of IT) Page 18
  19. 19. Biomedical Wireless Sensor Networksignal will be added to is supplied by the voltage divider formed with two 2.2kΩ resistors. The otherresistors set the gain of the amplifier to be one, and are much larger than the resistors in the voltagedivider so they dont influence the voltage division. In this way the output of the summing amplifieris the ECG signal transposed up by 2.5V.Instrumentation AmplifierAn instrumentation amplifier is a type of differential amplifier that has been outfitted with inputbuffers, which eliminate the need for input impedance matching and thus make the amplifierparticularly suitable for use in measurement and test equipment. Additional characteristics includevery low DC offset, low drift, low noise, very high open-loop gain, very high common-mode rejectionratio, and very high input impedances. They are used where great accuracy and stability of thecircuit both short- and long-term are required. The Analogue Devices LM324 was chosen forimplementation in the system. These devices consist of four independent high-gain frequency-compensated operational amplifiers that are designed specifically to operate from a single supplyover a wide range of voltages.  Design and ConstructionThe circuitry for capturing ECG signals was built in our laboratory using traditional components andtechniques. Fig.3 shows the actual breadboard circuit. The following sections elaborate on thedetails of the design and circuitry layout of each stage or component.DDU (Faculty of Tech., Dept. of IT) Page 19
  20. 20. Biomedical Wireless Sensor Network Fig. 1.13 Signal Acquisition Board - Developed In-labThe ECG signals were amplified by the instrumentation amplifier and fed into the noise filteringcircuits in different stages. To get required output we split Instrumentation amplifier in two parts,one of them is Pre-amplifier and second one is Post-amplifier. They include simple amplifier, notchfilter and buffer amplifier.  Pre-amplifier and Post-amplifierA voltage buffer amplifier is used to transfer a voltage from a first circuit, having a lowoutput impedance level, to a second circuit with a high input impedance level. The interposedbuffer amplifier prevents the second circuit from loading the first circuit unacceptably andinterfering with its desired operation. In the ideal voltage buffer, the input resistance isinfinite, the output resistance zero.DDU (Faculty of Tech., Dept. of IT) Page 20
  21. 21. Biomedical Wireless Sensor NetworkNotch filters used for eliminating 50Hz noise signal. It is must for clear appearance. Theobject is to get the signal between the lower and upper cutoff frequencies (f1 and f2,respectively). This will cause the signal to be reduced by at least 3 decibels, or effectivelyhalf the power of the desired signal.Butterworth filter has a more linear phase response. And its frequency response ismaximally flat (has no ripples) in the pass band, and rolls off towards zero in the stop band. Ithas a monotonically changing magnitude function with ω. The Butterworth is the only filterthat maintains this same shape for higher orders compared with other filters, the Butterworthfilter has a slower roll-off, and thus will require a higher order to implement a particular stopband specification. Here we are using 3rd order Butterworth filter.Figure 1.14– QRS Detector1.5.4 QRS DETECTORDDU (Faculty of Tech., Dept. of IT) Page 21
  22. 22. Biomedical Wireless Sensor NetworkThe QRS complex represents ventricular depolarization. The duration of the QRS complex is normally0.06 to 0.1 seconds. It has high amplitude among one heart signal. So, using R wave detectordetection and analysis become easy to decided coming signal is normal or abnormal. Fig.3 shows theactual breadboard circuit. The following sections elaborate on the details of the design and circuitrylayout of each stage or component.DDU (Faculty of Tech., Dept. of IT) Page 22
  23. 23. Biomedical Wireless Sensor NetworkFigure 1.16 QRS Detector circuit on bread board  Design and ConstructionThe output of ECG amplifier is given as an input to the QRS Detector circuit. The first stage of it isnotch filter of 50 Hz. It has same functionality as describe in filter section.DDU (Faculty of Tech., Dept. of IT) Page 23
  24. 24. Biomedical Wireless Sensor NetworkPrimary Results Figure QRS Detector OutputDDU (Faculty of Tech., Dept. of IT) Page 24
  25. 25. Biomedical Wireless Sensor NetworkFigure Test point 4 outputDDU (Faculty of Tech., Dept. of IT) Page 25
  26. 26. Biomedical Wireless Sensor Network Figure 1st ECG SignalDDU (Faculty of Tech., Dept. of IT) Page 26
  27. 27. Biomedical Wireless Sensor Network Figure work place circuit implementationDDU (Faculty of Tech., Dept. of IT) Page 27
  28. 28. Biomedical Wireless Sensor Network Figure Work place part 2DDU (Faculty of Tech., Dept. of IT) Page 28
  29. 29. Biomedical Wireless Sensor Network CircuitDDU (Faculty of Tech., Dept. of IT) Page 29
  30. 30. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 30
  31. 31. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 31
  32. 32. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 32
  33. 33. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 33
  34. 34. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 34
  35. 35. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 35
  36. 36. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 36
  37. 37. Biomedical Wireless Sensor NetworkThen filter is come. It is sometimes convenient to design a simple active high pass filter usingtransistors. Using transistors, this filter is convenient to place in a larger circuit because it containsfew components and does not occupy too much space. The active high pass transistor circuit is quitestraightforward, using just a total of three resistors, three capacitors and two transistors. Theoperating conditions for the transistor are set up in the normal way. The resistor Re is the emitterresistor and sets the current for the transistor.A rectifier is an electrical device that converts alternating current (AC) to direct current(DC). Rectifiers may be made of opamp, diodes, resistors and capacitors. Here we are usedfull wave rectifier. When only one diode is used to rectify AC (by blocking the negative orpositive portion of the waveform), the difference between the term diode and the termrectifier is merely one of usage, Almost all rectifiers comprise a number of diodes in aspecific arrangement for more efficiently converting AC to DC than is possible with only onediode.For R wave detector, we use transistor and few passive components; you can build a fairly sensitivepeak detector circuit. You can find a peak signal although you only detect the peak of positive cycle.Here we use pnp transistor as well as npn. The input stage is biased so that the supply voltage isdivided equally across the two complimentary output transistors which are slightly biased inconduction by the diodes between the bases. The resistors are used in series with the emitters ofthe output transistors to stabilize the bias current so it doesnt change much with temperature orwith different transistors and diodes. Here is the actual circuit’s schematic diagram is shown below.1.5.5 STK_500 KitSTK_500 Kit is designed to give designers a quick start to develop code on the AVR and forprototyping and testing of new designs. Its features are given below  AVR Studio Compatible  RS-232 Interface to PC for Programming and Control  Regulated Power Supply for 10 - 15V DC Power  Sockets for 8-pin, 20-pin, 28-pin, and 40-pin AVR Devices  Parallel and Serial High-voltage Programming of AVR Devices  Serial In-System Programming (ISP) of AVR Devices  In-System Programmer for Programming AVR Devices in External Target System  Reprogramming of AVR Devices  All AVR I/O Ports Easily Accessible through Pin Header Connectors  8 Push Buttons , 8 LEDs and RS-232 Port are for General Use  On-board 2-Mbit Data Flash for Nonvolatile Data StorageDDU (Faculty of Tech., Dept. of IT) Page 37
  38. 38. Biomedical Wireless Sensor Network Figure 5.1 STK_500 Kit Components  Turn on the kit First of all connect the power cable between a power supply and the STK_500 and apply 10 - 15V DC to the power connector. The input circuit is a full bridge rectifier and the STK_500 automatically handles both positive and negative center connectors. The red LED is lit when power is on, and the status LEDs will go from red, via yellow, to green that indicates the target VCC is present.  Description o LEDs and Switches: The STK500 starter kit includes 8 yellow LEDs and 8 push-button switches. TheLEDs and switches are connected to debug headers that are separated from the rest of the Board.The cables should be connected directly from the port header to the LED or switch header. Validtarget voltage range is 1.8V < VTG < 6.0V.DDU (Faculty of Tech., Dept. of IT) Page 38
  39. 39. Biomedical Wireless Sensor Network Figure 5.2 Ports of LEDs and Switches Figure 5.3 Connection of LEDs and Switches on kit o Description of Ports: The pin out for the I/O port headers is explained in Figure where x is stand for A, C, D. The supplied cables can be used if the Data Flash is connected to the hardware SPI interface on PORTB of the AVR microcontroller. The connection of the I/O pins is shown in Figure. The PORTE/AUX header has some special signals and functions in addition to the PORTE pins.DDU (Faculty of Tech., Dept. of IT) Page 39
  40. 40. Biomedical Wireless Sensor Network Figure 5.4 Various types of Ports o Jumper Setting: A master microcontroller and the eight jumpers control the hardware settings of the starter kit. During normal operation these jumpers should be mounted in the default position. To configure the starter kit for advanced use, the jumpers can be removed or set to new positions.  Default Setting  VTARGET : On-board VTARGET supply connected  AREF : On-board Analog Voltage Reference connected  RESET : On-board Reset System connected  XTAL1 : On-board Clock System connected  OSCSEL : On-board Oscillator selected Jumper mounted on pins 1-2: On-board software clock signal connected (default). Jumper mounted on pins 2-3: On-board crystal signal connected. Jumper not mounted : On-board XTAL1 signal disconnected.  BSEL2 : Uncounted. Used for High-voltage Programming of various types of AT mega Chips  PJUMP : Unmounted. Used for High-voltage Programming of AT90S2333,AT90S4433, and ATmega8  Work on the kitDDU (Faculty of Tech., Dept. of IT) Page 40
  41. 41. Biomedical Wireless Sensor Network Connect a serial cable to the connector marked RS232 CTRL on the evaluation board to a COM port on the PC. When AVR Studio is started, the program will automatically detect to which COM port the STK_500 is connected. The STK_500 is controlled from AVR Studio, version 3.2 and higher. AVR Studio is an integrated development environment (IDE) for developing and debugging AVR applications.AVR Studio provides a project management tool, source file editor, simulator, in circuit emulator interface and programming interface for STK500. To program a hex file into the target AVR device, select STK500 from the Tools menu in AVR Studio. Select the AVR target device from the pull-down menu on the Program tab and locate the Intel-hex file to download. Press the Erase button, followed by the Program button. The status LED will now turn yellow while the part is programmed, and when programming succeeds, the LED will turn green. If programming fails, the LED will turn red after programming. o Program Settings It is divided into four different subgroups and includes an erase button on the selected device, erasing Flash and EEPROM memories. For devices only supporting High-voltage Programming, the ISP option will be grayed out. If both modes are available, select a mode by clicking on the correct method. Erase Device before Programming will force STK500 to perform a chip erase before programming code to the program memory (Flash). Verify Device after Programming will force STK500 to perform a verification of the memory after programming it (both Flash and EEPROM) select the “Input HEX File” option.DDU (Faculty of Tech., Dept. of IT) Page 41
  42. 42. Biomedical Wireless Sensor Network Figure 5.5 Program Modes o Board Settings: VTAR controls the operating voltage for the target board. This voltage can be regulated between 0 and 6.0V in 0.1V increments. AREF controls the analog reference voltage for the ADC converter. This setting only applies to devices with AD converter. Both voltages are read by pressing the “Read Voltages” button, and written by pressing the “Write Voltages” button. The board uses a programmable oscillator circuit that offers a wide range of frequencies for the target device. Figure 5.6 Board Modes o Auto Settings: When programming multiple devices with the same code, the “Auto” tab offers a powerful method of automatically going through a user-defined sequence of commands. They are executed, if selected. To enable a command, the appropriate check box should be checked.DDU (Faculty of Tech., Dept. of IT) Page 42
  43. 43. Biomedical Wireless Sensor Network For example, if only “Program FLASH” is checked when the “Start” button is pressed, the Flash memory will be programmed with the hex file specified in the “Program” settings. Figure 5.7 Auto ModesDDU (Faculty of Tech., Dept. of IT) Page 43
  44. 44. Biomedical Wireless Sensor Network1.5.7 Xbee or Xbee-PRO  Introduction If you are looking for wireless monitoring and remote control solutions, XBee may be the answer. Xbee nodes can tie up a home, office or factory building for nodes safety, security and control. The modules have high performance at a low-cost and low-power wireless sensor networks. The modules require minimal power and provide reliable delivery of critical data between devices. The modules operate within the ISM (Industrial Scientific Medical) 2.4 GHz frequency band .RF Data Rate is 250kbps .They are pin-for-pin compatible with each other. We can easily use them.  Xbee RF Module Communication range of it in Urban is up to 100 m and line-of-sight is up to 300 m with 100mW power. Its TX current is 270mA, 3.3v and RX current is 55mA, 3.3v. And its receiver sensitivity is - 100dBm.  Pin Configuration XBee has 20 pins. Minimum connections are VCC, GND, DOUT and DIN. Unused pins should be left disconnected. Signal. And direction is specified with respect to the module. Figure 7.1 XBee or XBee-PRODDU (Faculty of Tech., Dept. of IT) Page 44
  45. 45. Biomedical Wireless Sensor Network  Procedure Data enters the XBee Module UART through the DI pin (pin 3) as an asynchronous serial signal. The signal should idle high when no data is being transmitted. Each data byte consists of a start bit (low), 8 data bits (LSB first) and a stop bit (high). The XBee UART performs tasks, such as timing and parity checking, that are needed for data communications. Serial communication consists of two UARTs configured with compatible settings (baud rate, parity, start bits, stop bits, data bits). One illustration is given below Figure 7.2 UART data packet 0x1F transmitted through the RF module  Flow Control When physical connection is established, at the transmitter site the data is transmitted from microcontroller to XBee through buffer and vice versa procedure at the receiver. Here we have to mention in software program that which connected XBee is worked as a transmitter or as a receiver. The internal diagram and flow of communication is shown in figure. •DI Buffer, Hardware Flow Control (CTS). •DO Buffer, Hardware Flow Control (RTS).DDU (Faculty of Tech., Dept. of IT) Page 45
  46. 46. Biomedical Wireless Sensor Network Figure 7.3 External and Internal flow of data o DI Buffer may become full and possibly overflow: If the module is receiving a continuous stream of RF data, any serial data that arrives on the DI pin is placed in the DI Buffer. The data in the DI buffer will be transmitted over-the-air when the module is no longer receiving RF data in the network. o DO Buffer may become full and possibly overflow: 1. If the RF data rate is set higher than the interface data rate of the module, the module will receive data from the transmitting module faster than it can send the data to the host. 2. If the host does not allow the module to transmit data out from the DO buffer because of being held off by hardware or software flow control. Solution 1. Send messages that are smaller than the DI buffer size. 2. Interface at a lower baud rate (BD parameter, p16) than the fixed RF data rate.  ModesDDU (Faculty of Tech., Dept. of IT) Page 46
  47. 47. Biomedical Wireless Sensor Network XBee is operated in five modes. It operates in one mode at a time.  Serial data is received in the DI Buffer : Transitions to Transmit Mode • Valid RF data is received through the antenna : Transitions to Receive Mode • Sleep Mode condition is met : Transitions to Sleep Mode • Command Mode Sequence is issued : Transitions to Command Mode  Programming the RF module In the Command Mode section entering Command Mode, sending AT commands and exiting Command Mode. Send AT Command: System Response  +++ : Enter into command mode  ATCH : Channel command  ATMY : 16-bit source address  ATDH : Read current Destination Address High  ATDL : Read current Destination Address Low  ATWR : Write to non-volatile memory  ATGT : Guard Timer , prevent inadvertent entrance into AT command mode  ATRE : Restore Defaults  ATSM : Sleep mode  ATBD : Interface data rate , 9600bps is default value  ATCN : Exit AT command modeDDU (Faculty of Tech., Dept. of IT) Page 47
  48. 48. Biomedical Wireless Sensor Network There are also many other AT Commands are presents, these are mostly using. All these commands are written in minicom software which has Fedora9 platform.Following are its screenshotsDDU (Faculty of Tech., Dept. of IT) Page 48
  49. 49. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 49
  50. 50. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 50
  51. 51. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 51
  52. 52. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 52
  53. 53. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 53
  54. 54. Biomedical Wireless Sensor NetworkChapter 2 Project Management2.1 Feasibility Study 2.1.1 Technical feasibility Project aim required both Hardware and Softwarecompetencies as we were required to build wearable system and robust software to support it.To check whether it was possible or not we read lot of books to understand basics of ECGand implemented a simple circuitry shown below from the book called “BiomedicalInstrumentation”. As per our expectations Signal wasn‟t clear as it was theoretical circuit andnot practical but it was clear that project was technically feasible. 2.1.2 Time schedule feasibility As the Technologies to build the project was AnalogElectronics, XBEE, Java Script, and STK 500 which were completely new to us. We werequite apprehensive regarding tight Time Schedule within which time frame project needed tobe submitted. But detailed Time Analysis and Disciplined work help us to complete project indetermined time schedule. 2.1.3 Operational feasibility To acquire operational feasibility we choose java language asour coding language in software part. Because of that all major features of Java language areimbibed in our project also. Like reusability inheritance and portability. So this way weachieved Operational Feasibility. 2.1.4 Implementation feasibility As we implemented our project‟s software part as WebApplication on J2EE Platform our project can be implemented on any machine and can beaccess by any machine. Hence it‟s feasible in Implementation side.2.2 Project Planning 2.2.1 Project Development Approach and justification Our project development plan was continuously monitored byboth our External guide and internal guide. Every 15 days we submitted our report andseminar to our internal guide at our Institution. And almost every week we had discussionwith our External guide regarding our proceedings. On day of our seminar with our internalguide we had to report our next 15 days goal and decide deadline for the next work. OurSchedule of project worked smoothly. 2.2.2 Project Plan Table below shows our schedule.DDU (Faculty of Tech., Dept. of IT) Page 54
  55. 55. Biomedical Wireless Sensor NetworkDate Goal To Be Achieved15/12/2008 To 28/12/2008 Feasibility Study29/12/2009 To 03/01/2009 Time Schedule and Analysis04/01/2009 To 25/01/2009 Requirement Analysis26/01/2009 To 08/02/2009 Design of Hardware Module09/02/2009 To 22/02/2009 Implementation of Hardware Module23/02/2009 To 01/03 /2009 Design and Implementation of Wireless Module02/03/2009 To 08/03/2009 Design and Implementation of Software Module09/03/2009 To 22/03/2009 Integration of modules23/03/2009 To 29/03/2009 Testing and Modifications30/03/2009 To 04/04/2009 Documentation Finalization2.2.3 Milestones and Deliverables Our set goals had been achieved on time hence all the sub goals had been ourmilestones which were delivered on time.2.2.4 Roles and Responsibilities In our project following Roles were required 1. Requirement Engineer In our project exhaustive requirement analysis and detailed study of the subject was required. 2. Design Engineer As our project was both hardware and software designing of PCB required a Design Engineer from the Background of Hardware and Web Application required Software Design Engineer. 3. Programmer As mentioned above we required programmer with knowledge of Dynamic C and JavaScript both, which is rare combination. But we learnt the entire requisite to fulfill all requirements.2.2.5 Group Dependencies As it was combined effort, the group never felt that they had lot ofdependencies.DDU (Faculty of Tech., Dept. of IT) Page 55
  56. 56. Biomedical Wireless Sensor Network2.3 Project SchedulingPractical Implementation of Schedule in form of Gantt ChartPhases 1- 11- 21- 31- 41- 51- 61- 71- 81- 91- 101- 111- 10 20 30 40 50 60 70 80 90 100 110 112Feasibility StudyTime Scheduleand AnalysisRequirementAnalysisDesign ofHardwareModuleImplementationof HardwareModuleDesign andImplementationof WirelessModuleDesign andImplementationof SoftwareModuleIntegration ofmodulesTesting andModificationsDocumentationFinalizationDDU (Faculty of Tech., Dept. of IT) Page 56
  57. 57. Biomedical Wireless Sensor NetworkChapter 3 System Requirements Study3.1 History of ElectrocardiogramThe electrical activity accompanying a heart-beat was first discovered by Collier and Muellerin 1856. After placing a nerve over a beating frogs heart they noticed that the muscleassociated with the nerve twitched once and sometimes twice. Stimulation of the nerve wasobviously caused by depolarization and repolarization of the ventricles. At that time therewere no galvanometers that could respond quick enough to measure the signal, soDodders (1872) recorded the twitches of the muscle to provide a graphic representation of theelectrocardiographic signal. In 1876, Mary made use of a capillary electrometer to describe acrude electrocardiogram of a tortoise using electrodes placed on the tortoises exposed heart.The news of this led many investigators to create their own instruments and the ECG ofmammals including humans was taken and different types of electrodes and their positioningwas investigated. One such investigator was Waller, who recorded the ECG of a patientcalled Jimmy. Waller later revealed the identity of Jimmy to be his pet bulldog. Jimmys ECGwas recorded by having a forepaw and hind paw in glass containers containing saline andmetal electrodes as shown in Figure. Figure 3.1. – Jimmy the BulldogThe fidelity of ECG obtained using a capillary electrometer was poor and Einthoven (1903)wanted to create a better system using Adder‟s string telegraphic galvanometer. Einthovenssystem proved to be a great success and soon string galvanometer based ECG systems werein clinical practice worldwide. Einthoven also came up with his theory regarding theEinthoven triangle and the lead positions based on this are still in use today and is responsiblefor the labeling of the various waves forming an ECG signal.Figure shows Einthovens string galvanometer and a patient having hisECG recorded.DDU (Faculty of Tech., Dept. of IT) Page 57
  58. 58. Biomedical Wireless Sensor Network Figure 3.2 – William Einthoven’s ECG System [2]Since the early 1900s advances have come through the use of a greater number of leads suchas in the augmented lead system or through body surface mapping (>64 recording sites used).As technology has advanced, so has the measuring system, making use of vacuum tubes,transistors, integrated chips and microprocessor technology as time has passed. The use of theelectrocardiogram has also spread out from the hospital with ambulatory egg, homeelectrocardiography and electrocardiograph telemetry systems in wide use.3.2 Study of Current System The electrical impulses within the heart act as a source of voltage, which generates acurrent flow in the torso and corresponding potentials on the skin. The potential distributioncan be modeled as if the heart were a time-varying electric dipole.If two leads are connected between two points on the body (forming a vector between them),electrical voltage observed between the two electrodes is given by the dot product of the twovectors [9]. Thus, to get a complete picture of the cardiac vector, multiple reference leadpoints and simultaneous measurements are required. An accurate indication of the frontalprojection of the cardiac vector can be provided by three electrodes, one connected at each ofthe three vertices of the Einthoven triangle. The 60 degree projection concept allows theconnection points of the three electrodes to be the limbsDDU (Faculty of Tech., Dept. of IT) Page 58
  59. 59. Biomedical Wireless Sensor Network Figure 3.3 – Lead Positioning [2]Modern standard ECG measurement makes use of further electrode connection points. The12-lead ECG is made up of the three bipolar limb leads, the three augmented referenced limbleads and the six Wilson terminals (Vow) referenced chest leads. The augmented lead systemprovides another look at the cardiac vector projected onto the frontal plane but rotated 30degrees from that of the Einthoven triangle configuration (Figure 2.6b). The connection of sixelectrodes put onto specific positions on the chest and the use of an indifferent electrode(Vow) formed by summing the three limb leads allows for observation of the cardiac vector onthe transverse plane [3] (Figure2.6c). Other subsets of the 12-lead ECG are used in situationswhich dont require as much data recording such as ambulatory ECG (usually 2 leads),intensive care at the bedside (usually 1 or 2 leads) or in telemetry systems (usually 1lead).The modern ECG machine has an analogue front-end leading to a 12- to 16bit analog-to-digital (A/D) converter, a computational microprocessor, and dedicated input-output (I/O)processors.DDU (Faculty of Tech., Dept. of IT) Page 59
  60. 60. Biomedical Wireless Sensor Network3.3 Electrodes used in Electrocardiogram Electrodes are used for sensing bio-electric potentials as caused by muscle andnerve cells. ECG electrodes are generally of the direct-contact type. They work as transducersconverting ionic flow from the body through an electrolyte into electron current andconsequentially an electric potential able to be measured by the front end of the egg system.These transducers, known as bare-metal or recessed electrodes, generally consist of a metalsuch as silver or stainless steel, with a jelly electrolyte that contains chloride and other ions(Figure 3.1). Figure 3.4 – Recessed Electrode Structure [4]On the skin side of the electrode interface, conduction is from the drift of ions as the ECGwaveform spreads throughout the body. On the metal side of the electrode, conduction resultsfrom metal ions dissolving or solidifying to maintain a chemical equilibrium using this or asimilar chemical reaction: Ag ↔ Ag+ + e-The result is a voltage drop across the electrode-electrolyte interface that varies depending onthe electrical activity on the skin. The voltage between two electrodes is then the difference inthe two half-cell potentials. Figure 3.5 – Dry Electrode Structure [2]DDU (Faculty of Tech., Dept. of IT) Page 60
  61. 61. Biomedical Wireless Sensor NetworkPlain metal electrodes like stainless steel disks can be applied without a paste. The theory ofoperation is the same but the resistivity of the skin electrode interface is much greater. Theyare useable when proper electrostatic shielding against interference is applied and theelectrode is connected to an amplifier with very high input impedance, but the voltagemeasured will be considerably less than that obtained with an electrode utilizing anelectrolyte.3.4 Problems and Weaknesses of Current System Main problem with the current system which is most commonly usedin the hospitals is that it is not compact. It requires 12 leads to cover the view of whole heart.Due to these reasons patient can not move freely during test. Also long duration of test cancause irritation to patient. Patients who are suffering from heart diesis must themselves come toknow about emergency, means every time they can not be in hospitals. So any problemcomes without they are admitted to the hospitals can cause fatal.3.5 System User Characteristics System is designed especially for old age people. So thecharacteristics are:  Mobility  Constant monitoring of patient  Immediate action during emergency condition3.5 Hardware and Software requirements Hardware Requirements:  Electrodes  ECG monitor  Microcontroller IC ATMEGA32  Transmission part  Computer System for Doctor  Internet Explorer Software Requirements:  AVR Studio  PSpice  Minicom  Google API modeDDU (Faculty of Tech., Dept. of IT) Page 61
  62. 62. Biomedical Wireless Sensor NetworkChapter 4 SYSTEM ARCHITECTURE DESIGN4.1 Pre Amplifier CircuitFigure 4.1 Pre-Amplifier Circuit4.2 Post-Amplifier Circuit DiagramDDU (Faculty of Tech., Dept. of IT) Page 62
  63. 63. Biomedical Wireless Sensor NetworkFigure 4.2 Post-Amplifier Circuit 4.3 QRS Detector Circuit DiagramDDU (Faculty of Tech., Dept. of IT) Page 63
  64. 64. Biomedical Wireless Sensor Network Figure 4.2 Filter and Rectifier portion of QRS Detector Circuit Figure 4.3 R-Wave Detector portion of QRS Detector CircuitDDU (Faculty of Tech., Dept. of IT) Page 64
  65. 65. Biomedical Wireless Sensor NetworkChapter 5 Implementation Planning 5.1 Implementation Environment We implemented our hardware program that is program inMicrocontroller using AVR Studio and Language used is Dynamic C. Following are theDetails of Special Registers.DDU (Faculty of Tech., Dept. of IT) Page 65
  66. 66. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 66
  67. 67. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 67
  68. 68. Biomedical Wireless Sensor Network5.2 Program SpecificationProgram Details are as Follows:-DDU (Faculty of Tech., Dept. of IT) Page 68
  69. 69. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 69
  70. 70. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 70
  71. 71. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 71
  72. 72. Biomedical Wireless Sensor NetworkDDU (Faculty of Tech., Dept. of IT) Page 72
  73. 73. Biomedical Wireless Sensor Network5.3 Coding Standards  J2EE 1.4 java version is used for making display software  NET Beans IDE  Java enabled Web Browser  JDK for windows is installed  We have used standard JAVA Naming convention like 1. 2. showAnnotation.javaDDU (Faculty of Tech., Dept. of IT) Page 73
  74. 74. Biomedical Wireless Sensor NetworkChapter 6 Testing6.1 Testing Plan We planned to test our project using unit testing and Integration testing strategy. Hence Regression Testing method was applied. We implemented at each and every stage modules and tested their required outputs. Some of the test results are as follows:- Figure 6.1 QRS Detector OutputDDU (Faculty of Tech., Dept. of IT) Page 74
  75. 75. Biomedical Wireless Sensor NetworkFigure 6.2 1st ECG SignalFigure 6.3 Work place circuit implementationDDU (Faculty of Tech., Dept. of IT) Page 75
  76. 76. Biomedical Wireless Sensor NetworkFigure 6.4 Work place part 2DDU (Faculty of Tech., Dept. of IT) Page 76
  77. 77. Biomedical Wireless Sensor Network Figure 6.5 CircuitDDU (Faculty of Tech., Dept. of IT) Page 77
  78. 78. Biomedical Wireless Sensor NetworkFigure 6.6 Test Point 1Figure 6.7 Test Point 2DDU (Faculty of Tech., Dept. of IT) Page 78
  79. 79. Biomedical Wireless Sensor NetworkFigure 6.8 Test point 3DDU (Faculty of Tech., Dept. of IT) Page 79
  80. 80. Biomedical Wireless Sensor NetworkFigure 6.9 Test point 4DDU (Faculty of Tech., Dept. of IT) Page 80
  81. 81. Biomedical Wireless Sensor NetworkFigure 6.10 Test point 5Figure 6.11 Test point 66.2 Testing Strategy As mentioned above and results shown above we have strictly followed regressiontesting completely.DDU (Faculty of Tech., Dept. of IT) Page 81
  82. 82. Biomedical Wireless Sensor Network6.3 Testing Methods Testing methods applied are Unit Testing and Integration Testing.6.4 Test Cases 6.4.1 Purpose: - To test whether ECG Module was working ornot. 6.4.2 Required Input: - Heart Signal from Patient 6.4.3 Expected Results: - ECG to displayed on DigitalOscilloscope.Use Case Test Case Expected Actual Output Test Case Output Status50 Hz Notch Frequency Pass only till 49 Passed only till PassFilter higher than 50hz Hz 45 HzECG Module Heart Signal of Heart Signal of Heart Signal of Pass 50 mille volt 2 Volt 1.8 VoltHardware Give Heart pulse Detect it Normal Detected it Passprogram to between 60 to Normaldetect 70Abnormality Give Heart pulse Detect it Detected it Pass less than 60 Abnormal and Abnormal and transmit it. transmit it.Software to Samples at 1.6 Show it Showed it PassDisplay Heart Kilo Hertz properly. properlySignalDDU (Faculty of Tech., Dept. of IT) Page 82
  83. 83. Biomedical Wireless Sensor NetworkChapter 7 Limitations and Future Enhancements7.1 LimitationsFollowing are the limitations of the System.  The System is not multiparameter. It is including only electrical signal from heart  Range of XBEE Pro differs according to medium. In closed room range is decreased a lot.  Constant wear of electrodes can cause irritation to patient.  Due to memory constraint and battery ECG signal can‟t transmitted for long period.7.2 Future EnhancementsFollowing are the future enhancements intended for the System.  More features can be added to monitor like SPO2, Blood Pressure and Blood Sugar level. This way it ensures proper monitoring of patient.  Range can be improved.  More powerful power source can be devised so that for longer time ECG can be transmitted to base station and patient can be diagnosed more precisely.  GPS System can be added to provide alarm signal to doctor with exact location of patient so that immediate assistance can be provided.DDU (Faculty of Tech., Dept. of IT) Page 83
  84. 84. Biomedical Wireless Sensor NetworkChapter 8 Conclusion and Discussion 8.1 Conclusions and Future Enhancement We are successful in getting accurate ECG signal and Transmitting it to base stationsuccessfully which was our aim. Overall Experience of building this project was enthrallingand unique. So overall it can be concluded that we were successful in making a wearableECG system which transmits signal when it detects abnormality.8.2 Discussion 8.2.1 Self Analysis of Project Viabilities We did self analysis and project viabilities by meeting few Doctors andold age home people. This device will be very much useful to both old age homes and old agepeople. We goggled lot of topics and found out heart ailments are the major problems forpeople of all age. So we concluded that project is most viable both commercially and forsociety. Future Enhancements in this project will help technology serve better to mankind.Portable ECG system is the demand of the day. And its miniaturization will help mankind alot. 8.2.2 Problem Encountered and Possible Solutions Following were the problems encountered and their solutions  ECG has amplitude of only about 1 mV, so to detect it an amplifier is needed. There is a problem, though - electrical noise, or electromagnetic interference (EMI). EMI is generated by many common appliances, such as power lines, fluorescent lights, car ignitions, motors and fans, computers, monitors, printers, TVs and cell phones.  When the ECG is amplified, the noise is amplified too, and often swamps the ECG signal. And the noise is usually of a higher frequency than the ECG.  In the beginning we implemented amplifier and QRS detector circuits from textbook which is not give proper output. Then we asked senior students, research engineers, professors and searched in medical-instrumentation books, reference books, on Internet Explorer etc.  Finally we get one circuit of amplifier and QRS detector and implemented them on PCB board. We changed or added or removed some components in those circuits. In that we break instrumentation amplifier circuit into Pre-amplifier circuit and Post- amplifier circuit and also include notch filter and simple amplifier.  We are using RL configuration in Pre-amplifier which gives better output than RC configuration.DDU (Faculty of Tech., Dept. of IT) Page 84
  85. 85. Biomedical Wireless Sensor Network  Moreover we modify the ECG electrodes and probes from where we take an ECG signal. In the beginning we used clamp electrodes with long wired probes. Due to those we faced much noise in signal. Then after we switch over to chest electrodes with short and shielded probes but we can‟t get sufficient input from them.So we use combination of them, we use aluminum plate, good conductor under chestelectrodes so that we increase the surface area and take proper ECG signal. But it took muchtime in arrangement like to stick them on chest.So, finally we use limb electrodes which fulfill our requirements.  To solve the problem of DC offset we put RC circuit at those pins where we give supply voltage to ICs.  Another problem is motor driving effect which is due to distribution of supply voltage from one source to all the ICs. Because of this the internal noise will generate and it affects the incoming signal that has low amplitude. For its solution we give individual supply the all the ICs according to their requirement.  Earthen is one of the problems in our bred board circuit and PCB circuit in lab. For it we make our module with proper earthen and shielding,After solving all these problems on board to get better and appropriate output, we designECG signal amplifier module with assembly components on GREEN PCB.8.2.3 Summary of Project work Our main aim behind this project is to show a way by which old age homescan monitor their old age people. It is a relief for old age people also they roam about freelywithout any assistance. Also they get immediate help from doctors whenever they are introuble or in need. We have made it in such a way that even young ones can have it. Thisproject has huge commercial viability if produced in masses.DDU (Faculty of Tech., Dept. of IT) Page 85
  86. 86. Biomedical Wireless Sensor NetworkExperienceWe are going to share an experience we had at DA-IICT Dhirubhai Ambani Institute ofInformation and Communication Technology during our project work.DA-IICT being one of the premier institute of India our expectations was high. Afterreaching their the kind of Ambience and Hospitability we received was beyond ourexpectation. DA-IICT has very fine architecture with great facilities and above all veryexperienced faculty. We were given separate lab to work in with personal computers issuedto us. Also if we needed anything like Resistors, Capacitors, Breadboard etc anything of thatsort it could be issued. Not only small things like that even we were given personal CRO,DSO and Function generator in our very own lab. We were free to access lab anytime anyday. DA-IICT has one of the most resourceful libraries which we utilize maximum.Whenever we had some difficulties we got answers from there. Not only that entire labbuilding of DA-IICT is Wi-Fi connected we had free access to internet in Lab and also at ourHostel Rooms. We had very good staying and food facility which made us work morecheerfully. We also had help of three research engineers who eventually became our verygood friends. They are Mr. Vishwas, Mr. Aman and Mr. Ravi Bagree and we owe specialthanks to them for their support and special attention. Without them project wouldn‟t havebeen successful. Our very sincere thanks to Professor Prabhat Ranjan because it was because ofthem we were in DA-IICT. We had very good time and learning time with Sir. We can neverever pay our thanks to him for what he has given to us and taught us. His dedication in workinspired us to work more and more. Very sincere thanks to Professor Prabhat Ranjan and wemean it from our bottom of our heart.Overall complete experience of DA-IICT was mystic and we shall remember it for our lifetime.DDU (Faculty of Tech., Dept. of IT) Page 86
  87. 87. Biomedical Wireless Sensor NetworkReferences  Aquino, et al. “Capacitive Sensing of Electrocardiographic Potential Through Cloth From the Dorsal Surface of the Body in a Supine Position: A Preliminary Study,” IEEE Transactions on Biomedical Engineering, Vol. 54, No. 4. April 2007  A. Leonhard, S.: Personal Healthcare Devices. In S.Mukherjee et al. (eds.), AmIware: Hardware Technology Drivers of Ambient Intelligence. Chapter 6.1, Springer Verlag, Dordrecht, NL, 2006, p. 349–370.  Arhus Richardson, P. C.: The Insulated Electrode. In Proceedings of the 20th Annual Conference on Engineering in Medicine and Biology. Boston, MA (USA), 1967, p. 157.  Ashijima, M.: Monitoring of Electrocardiograms in Bed without Utilizing Body Surface Electrodes. IEEE Transactions on Biomedical Engineering, Vol. 40 (1993), No. 6, p. 593–594.  Aim, K. K., Lim, Y.K., Park. S.: CommonModeNoise Cancellation for Electrically Non-Contact ECG Measurement System on a Chair. In Proceedings of the 27th Annual Conference of the IEEE EMBS. Shanghai (China), Sept. 2005, p. 5881–5883.  Aim, Y. G., Kim, K. K., Park, K. S.: ECG Measurement on a Chair without Conductive Contact. IEEE Transaction on Biomedical Engineering, Vol. 53 (2006), No. 5, p. 956–959.  Aare, A., Kirk up, L.: A direct Comparison of Wet, Dry and Insulating Bioelectric Recording Electrodes. Physiological Measurement, Vol. 21 (2000), p. 271–283.  B. B., Webster, J. G.: Reduction of Interference Due to Common Mode Voltage in Bio potential Amplifiers. IEEE Transactions on Biomedical Engineering, Vol. 30 (1983), No. 1, p. 58–61.  Birney, K, ET. Al.., “Quantification of Motion Artefact in ECG Electrode Design,” Engineering in Medicine and Biology Society, 2007. EMBS 2007. 29th Annual International Conference of the IEEE, pp.1533-1536, 22-26 Aug. 2007  C. Park and P.H. Chou, Y. Bay, R. Matthews, and A Hobbs. “An Ultra-Wearable, Wireless, Low Power ECG Monitoring System,” in Proc. IEEE Biogas, Nov 29 - Dec 1, 2006.  Enzi, T., et al, “Fully Integrated EKG Shirt based on Embroidered Electrical Interconnections with Conductive Yarn and Miniaturized Flexible Electronics,” Proceeding of the International Workshop on Wearable and Implantable Body Sensor Networks, 2006.  E. Borrowed, et al. “A Reconfigurable, Wearable, Wireless ECG System,” Proceedings of the 29th Annual International Conference of the IEEE EMBS. Aug. 23-26, 2007.  F. Axis, A. Dittmer, and G. Delhomme. “Smart Clothes for the Monitoring in Real Time and Conditions of Physiological, Emotional, and Sensorial Reactions ofDDU (Faculty of Tech., Dept. of IT) Page 87
  88. 88. Biomedical Wireless Sensor Network Human,” Proceedings of the 25th Annual International Conference of the IEEE EMBS. Sept. 17-21, 2003.  G. Lim, K.K. Kim, and K.S. Park. “ECG Recording on a Bed during Sleep without Direct Skin-Contact,” IEEE Transactions on Biomedical Engineering, Vol. 54, No. 4. April 2007.  J. Ishijima. “Monitoring of Electrocardiograms in Bed Without Utilizing Body Surface Electrodes,” IEEE Transactions on Biomedical Engineering, Vol. 40, No. 6. June 1993.  Kerb, T; “A Circuit for Contact Monitoring in Electrocardiography”, IEEE Transactions on Biomedical Engineering, Volume BME-29, May 1982 Page(s):361 - 364  Kohler, B.-U.; Henning, C.; Orglmeister, R. “The principles of software QRS detection”, Engineering in Medicine and Biology Magazine, IEEE Volume 21, Issue 1, Jan.-Feb. 2002 Page(s):42 – 57  Liege U and Schenk Ch: Measurement circuits. In Electronic Circuits Design and Application.1990; 767-778.  Neumann MR: Bio potential amplifiers. In Webster JG, editor. Medical instrumentation application and design. John Wiley & Sons: New York, 1998; 233- 286.  Nastier GH, Peter A and Grimbergen CA: Low power, low-noise instrumentation amplifier for physiological signals. Med Boil Eng Compute, 1984; 22: 272-274.  Mora D: Two-electrode low supply voltage electrocardiogram signal amplifier. Med Boil Eng Compute, 2004; 42: 272-276.  Mir MB: A design study of a bioelectric amplifier and improvement of its parameters. J Med Eng Techno, 1999; 23: 15-19.  Spinally EM, Martinez NH and Mayo sky MA: A single supply bio potential amplifier. Med Eng Phys, 2001; 23: 235-238.  Jefferson CB: Special-purpose OP amps. In Operational amplifiers for Technicians. Breton publishers: 1983; 281-285.  PURKE, M. J., and GLEESON, D. T. (2000): „A micro power dry electrode ECG preamplifier‟, IEEE Trans. Biomed. Eng., 47, pp. 155–162  SHEE, J. (2002): „Low-frequency high gain amplifier with high Doffed Voltage tolerance‟. US patent, US6396343 B2  T. Khorovets, What Is An Electrocardiogram?, 2000  Tromping, Joseph D., The Biomedical Engineering Handbook, IEEE Press, 2000    (Faculty of Tech., Dept. of IT) Page 88
  89. 89. Biomedical Wireless Sensor Network      Y. Edward Profit, Biomedical Engineering, 1993 Chapter 3  Y. Lu, The Design and Construction of an ECG Telemetry System, University of Queensland Thesis, 1994 National Heart Foundation of Australia, Cardiovascular Disease –Australia’s Major Health Problem, Nov 2001  Weinberg, B.N., Applied Clinical Engineering, McGraw-Hill, 1986  Yorture, G.L., Principles of Human Anatomy, Harper Collins, 1989  Z‟Souza M., Wireless Biomedical Sensor Project Outline, School of Information Technology and Electrical Engineering, 2002  ZE304 Laboratory Notes, Michigan Technological University  Zide J., Field Wiring and Noise Considerations for Analogy Signals, National Instruments Application Note 025 References William Brims 61  Zerry Lafayette, A Basic Introduction to Filters – Active, Passive, and Switched Capacitor, National Semiconductor Application note 779, April 1991DDU (Faculty of Tech., Dept. of IT) Page 89
  90. 90. Biomedical Wireless Sensor NetworkBibliography / Literature Review 1. Barry N. Feinberg, Applied Clinical Engineering, 1996 Chapters 4 & 5Chapter four of this book contains a fairly detailed explanation of the electricalActivity of the heart and what the ECG waveform represents. It goes on to give leadLocations for standard, augmented and primordial lead systems. Chapter five detailsNoise sources and solutions, electrode information including skin/electrode equivalentCircuits and explanations of performance measures. 2. A. Edward Profit, Biomedical Engineering, 1993 Chapter 3This book contains similar information to that provided in [1], but providesLess in-depth explanations. Contains an informative page on microelectrodes. 3. A. Khorovets, What Is An Electrocardiogram?, article taken from the „Internet Journal of Health‟, contains informationOn exactly what activity in the heart the electrocardiogram represents. It includesInformation on what common abnormalities in ECG signals mean in terms of cardiacDisease or misplaced connection points. 4. S. Choir, J. Nyberg, K. Fudged, E. Kael, Telemedicine ECG – Telemetry withBluetooth Technology, Computers in Cardiology 2001, 28:585-588This journal entry deals with the use of a Bluetooth system to transmitDigitized ECG data to a Web server via GSM phone modem. The cardiologist thenCan access the ECG data over the web and is also able to make use of the on-lineKnowledge base. The article talked mostly about the results of trials of their system. 5. A. Praetor, C. Malines, Multichannel ECG Data Compression Method Based on aNew Modelling Method, Computers in Cardiology 2001, 28:261-264The work described in this article concerns a new method of multichannelECG data compression based on the identification of a FIR system. The compressionMethod achieved is in development but achieved a compression ratio of 8 with aSignal-to-Reconstruction Noise Ratio of 25dB. 6. Sate M. S. Jalaleddine, Chris well G. Hutchens, William A. Soberly, Robert D.Stratton, Compression of Halter ECG Data, ISA 1988 – Paper #88-0205This paper described many compression schemes utilised in compression ofHalter ECG data including problems such as distortion inherent in them. Nine dataCompression techniques are detailed with two more proposed. 7. Robert S. H. Istepanian, Arthur A. Petrofina, Optimal Ronal Wavelet-Based ECGData Compression for a Mobile Telecardiology System, IEEE Transactions onDDU (Faculty of Tech., Dept. of IT) Page 90
  91. 91. Biomedical Wireless Sensor NetworkInformation Technology in Biomedicine, Vol. 4 No. 3, September 2000This paper details a new approach for ECG data compression for use in mobileTelecardiology. The compression achieved a maximum compression ratio of 18:1 andWas able to reproduce clinically acceptable signals with a 73% reduction inTransmission time. This compression method is rather complicated and is probably notPractical for implementation on our slave nodes and also requires a block size forCompression that is larger than that which is suited for our purposes. 8. Li Gang, Ye Winy, Lin Ling, Yu Qilian, Yu Xiamen, An Artificial-IntelligenceApproach to ECG Analysis, IEEE Engineering in Medicine and Biology, March/April2000.Within this paper is contained information on the use of Neural Networks toIdentify QRS complexes in a measured ECG signal. It includes some information onCompression methods of ECG, which is of some relevance but otherwise is not veryUseful. 9. D. Marr, ECG Application Featuring Data Transmission by Bluetooth, UniversityOf Queensland Thesis, 2001The thesis deals with the design of an ECG system which measures and filtersAn ECG signal with analogue circuitry before A/D converting it and sending it usingBluetooth elsewhere. The analogue circuitry detailed is a bit dodgy, and the resultsSection is useless.DDU (Faculty of Tech., Dept. of IT) Page 91