ecg heart beat monitor

16
University of Duhok Faculty of Science Department of Computer Science 4 th Stage ECG Heart Beat Monitor Names: kamel Rebin Sadulla

Upload: independent

Post on 30-Nov-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

University of Duhok

Faculty of Science

Department of Computer Science

4th Stage

ECG Heart Beat Monitor

Names:

kamel

Rebin Sadulla

1.1 Introduction: The ECG Heart Beat Monitor is the branch of technology that deals with the design, Construction, Operation. This project shows you how to make an electrocardiograph and a heart rate monitor. It is intended to be a fun science project only. Of course, it should not serve as a medical purpose.

It measures the user’s heartbeat using an LED and a very sensitive photo-resistor attached to the user’s body. A light will blink to the user’s heartbeat, and the program will calculate the user’s beats per minute. It is known that a healthy heart rate for an adult is between 60 and 90 beats per minute. The sensor output is read by the Arduino board, which then transfers the data to the PC through a serial interface. A PC application is developed using Processing programming language to display the received signal and instantaneous heart rate, The BPM will be displayed on a GLCD display. Our hypothesis is that the heart beat BMP will go up (exceeds) a user (or patient)-set limit when is nervous, then an alarm will sound a beep. Once the user’s BPM lowers below that limit, the alarm will turn off.

1.2 Topic:ECG Heart Beat Monitor

1.3 Aim:The goal of this project is to develop and validate a wearable The system should be able to record ECG and acceleration data continuously for at least one week do not longer have to pay hundreds of dollars for a heart rate monitor! ECG heart beat monitoring and be able to do whatever needs to measure your heart for you Because they are most easy to measure and therefore can give us a more reliable data.

1.4 ObjectivesThe project will provide:

1-The objective of project most easy to measure and therefore can give us a more reliable data.

2- smallest and also will be lower cost.

3- It’s easy to use, anywhere you can know the measure of your heart if is normal or not without going to the hospital, Therefor we can said its one part of a FIRST AID.

4- The monitor can be used to collect data from patients who have suffered a heart event and those at risk as they go about their daily activities. This will allow physicians to track disease progression and allow researchers to develop methods to predict and prevent serious cardiac events.

1.5 Project type

Resource requirements:

Software Requirements:

1-Arduino.

2-Arduino C.

Hardware Requirements

1. Arduino NANO

2. GLCD.

3. PCB.

4. LM324.

5. Buzzer.

6. MKM Film Capacitor 100N J100

7. Resistor

1.6 Methodology

Is the general research strategy that outlines the way in which research is to be undertaken and, among other things, identifies the methods to be used in it. These methods, described in the methodology, define the means or modes of data collection or, sometimes, how a specific result is to be tested. Methodology does not define specific methods, even though much attention is given to the nature and kinds of processes to be followed in a particular procedure or to attain an objective. The development process of this project is showed in

Chapter twoBackground

Theory’s

2.1 IntroductionArduino is described by its makers as open-source electronics prototyping platform based on flexible, easy-to-use hardware and software whatever that means. In short, it is a popular open-source electronic board hat is capable of controlling arduino can be used To develop standalone interactive object or can be connected to software on your computer Such as(flash processing, Max/MSP)the first ardunio was introduced in 2005 Desingners sought to provide an inexpensive and esay way for hobbyists student and Professionals to create devices that interact with their environment using sensors and actuators common examples for beginner hobbyists include simple robots thermostats And motion detectors ardunio board come come with a simple Integrated Development Environment (IDE)that runs on regular personal computer and allows users to write programs for arduino using C or C++.

2.2 Why Arduino

There are many other microcontrollers and microcontroller platforms available for physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others offer similar functionality. All of these tools take the messy details of microcontroller programming and wrap it up in an easy-to-use package. Arduino also simplifies the process of working with microcontrollers, but it offers some advantage for teachers, students, and interested amateurs over other systems

2.3 Arduino software(IDE) The open-source Arduino IDE as shown in figure 2.2 makes it easy to write code and upload it to the I/O board. It runs on Windows, Mac, and Linux. The environment is written in Java and based on C/C++ and other open source software [7]. The Arduino IDE contains a text editor for writing code, a message area, a text console, a toolbar with buttons for common functions, and a series of menus. It connects to the Arduino hardware to upload programs and communicate with them.Software written using Arduino is called sketches. These sketches are written in the text editor. Sketches are saved with the file extension .ino. It has features for cutting/pasting and for searching/replacing text. The message area gives feedback while saving and exporting and also displays errors. The console displays text output by the Arduino environment including complete error messages and other information. The bottom right-hand corner of the window displays the current board and serial port.

Figure 2.2 Arduino IDE

The toolbar buttons allow you to verify and upload programs, create, open, and save sketches, and open the serial monitor.

Verify: Checks your code for errors. Upload: Compiles your code and uploads it to the Arduino I/O board. New: Creates a new sketch. Open: Presents a menu of all the sketches in your sketchbook. Clicking one will open

it within the current window. Save: Saves your sketch. Serial Monitor: Opens the serial monitor.

Additional commands are found within the five menus: File, Edit, Sketch, Tools, Help. The menus are context sensitive which means only those items relevant to the work currently being carried out are available.

Before uploading your sketch, you need to select the correct items from the Tools > Board and Tools > Serial Port menus. On Windows, it's probably COM1 or COM2 (for a serial board) or COM4, COM5, COM7, or higher (for a USB board) - to find out, you look for USB serial device in the ports section of the Windows Device Manager. Once you've selected the correct serial port and board, press the upload button in the toolbar or select the Upload item from the File menu. Current Arduino boards will reset automatically and begin the upload. On most boards, you'll see the RX and TX LEDs blink as the sketch is uploaded. The Arduino environment will display a message when the upload is complete, or show an error.

2.4 What is Arduino C programming language Here we will explain of all standard instruction that supported by arduino language

2.5.1 StructureArdunio sketch have two function(setup,loop):

1-All functions must have a unique name, setup is one example of a unique function name (setup and loop are special functions in Arduino programming and form part of the structure of a basic sketch).

2- The function name is followed by opening and closing parentheses () that may or may not contain something.3- All functions must have a return type. Both setup and loop have a void return type.4- The body of a function consists of an opening and closing brace ({ and }).

Void setup()

Statements in the setup() function are run only once, every time that the sketch is run. The program then starts executing statements in the loop() function.The sketch will run after it has been programmed into the Arduino. Opening the serial monitor window will reset the Arduino and cause it to run the sketch again.

Example

Void setup(void)

{

Serial.begin(1115200);

}

Void loop()

It contain the main code of your sketch It is important to have the loop() function in the sketch, even if it is empty, because without it the microcontroller on the Arduino board will try to execute whatever it finds next in memory after the statements in the setup() function have been executed.

Example

Void loop(void)

{

Serial.println(“hello , world!”);

Delay(1000);

}

2.6 The Arduino Hardware

The arduino board is a small microcontroller board which is a small circuit (the board)that contains a Whole computer on a small chip the microcontroller this is computer is at least a thousand time less Powerful than the Macbook im using to write this but it is a lot cheaper and very useful to build interesting devices .you will see a black chip with 54 legs that chip is the ATmega1280 the heart of your board we the ardunio team have placed on this board all components that are required for this microcontroller to work properly and to communication with your computer there are many Versions of this board the one we will use throughout this book is ardunio mega

Ardunio Nano

The Arduino Nano is a small, complete, and breadboard-friendly board based on the ATmega328 (Arduino Nano 3.0) or ATmega168 (Arduino Nano 2.x). It has more or less the same functionality of the Arduino Duemilanove, but in a different package. It lacks only a DC power jack, and works with a Mini-B USB cable instead of a standard one

Figure 1.1 Ardunio Nano

Arduino Nano Specifications:

Buzzer

is an audio signaling device, which may be mechanical, electromechanical, or piezoelectric . Typical uses of buzzers and beepers include alarm devices .on a board passive buzzer low level effectively can control with A simple microcomputer I\O directly passive buzzer working voltage 5 v

. Figure 2.2 Passive buzzer

MKM Film Capacitor 100N J100:

Plastic metal alloy capacitors (like MK capacitors) can self recovery after breakdown. Very thin metal layer coat to plastic foil about 0.02 to 0.05 um. The arc with rise at breakdown will evaporate metal layer at the point without damage the dielectric.

Figure 2.3 MKM Film Capacitor 100N J100

Resistor

Resistor is a component with a specific resistance, used to control the current in a circuit. The unit of resistance is the Ohm, we used a red and orange resistor

Figure 2.4 Resistor

Pcb(Printed Circuit Boards)

Electronic circuits in schools and industry are normally manufactured through the use of PCBs (Printed Circuit Boards). The boards are made from glass reinforced plastic with copper tracks in the place of wires. Components are fixed in position by drilling holes through the board, locating the components and then soldering them in place. The copper tracks link the components together forming a circuit. The animation shows the components arranged on the 'component side' of the PCB and as it rotates, the copper tracks see in figure 2.5

Figure 2.5 PCB

GLCD

This section of the system involves a graphical output of the signal that has been previously acquired. The display device used is a GLCD screen. The LCD screen has 20 pins for connection to the microcontroller. The order in which these were connected was based on the information contained in the datasheets of the GLCD and Microcontroller Pin Header, FFC-Connector Display Format192x64 Dots Sunlight Readable,No Touch Panel Optional No Outline Dimensio130.0(W)x65.0(H)x12.0(T)mm Visual

Figure 2.6 GLCD

LM324

These devices consist of four independent high-gain frequency-compensated operational amplifiers that are designed specifically to operate from a single supply or split supply over a wide range of voltages like see in figure 2.8

Figure 2.8 LM324

Chapter ThreeThe Proposed System