Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Report on Automatic Heart Rate monitoring using Arduino Uno

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
1
CHAPTER 1
INTRODUCTION
1.1 Introduction:
Science and technology by way of inventions and innovations has made life easie...
2
The average heart beats is between 60 and 100 times per minute. If your heart beats
below 60 times per minute, this is b...
3
In this work, a novel low cost arduino based heartbeat monitoring device which uses
optical sensors to measure the alter...
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 42 Anzeige

Report on Automatic Heart Rate monitoring using Arduino Uno

Herunterladen, um offline zu lesen

Automatic heart rate monitoring using Arduino. This is a report based on project. It includes the circuit diagram and the PCB layout diagram of the circuit

Automatic heart rate monitoring using Arduino. This is a report based on project. It includes the circuit diagram and the PCB layout diagram of the circuit

Anzeige
Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie Report on Automatic Heart Rate monitoring using Arduino Uno (20)

Anzeige

Aktuellste (20)

Anzeige

Report on Automatic Heart Rate monitoring using Arduino Uno

  1. 1. 1 CHAPTER 1 INTRODUCTION 1.1 Introduction: Science and technology by way of inventions and innovations has made life easier for everybody in all spheres of life. One of such is in medical sciences where medical personnel are now able to acquire vital medical data from patients. Two of the most important are the measurement of heartbeat rate and temperature. The Human Heart Rate Monitors (HRM) are devices that allow the user to gain a real time measurement of their heart beat. They consist of a transmitter which detects the heartbeat by measuring the number of times the heart beats per minute and a receiver that determines the heart rate on receiving signals from the transmitter. The first wireless Electrocardiography (ECG or EKG) heart rate monitor was invented in 1977 by Polar Electro. It was invented for the Finnish National Cross Country Ski Team to aid them in training. The concepts of “Intensity Training” became a buzz throughout the athletic world in the eighties, and in 1983 which lead to the introduction of the first wireless heart monitor. By the 1990s, attention shifted from heart rate monitors for intensify and quality training needs to normal individual everyday fitness needs. Human Cardiovascular System consists of the heart, blood vessels and approximately five liters of blood that the blood vessels transport . Heart rate measurement indicates the soundness of the human cardiovascular system. Heartbeat rate is one of the very important parameters of the cardiovascular system. The measurement of heart rate is used by medical professionals to assist in the diagnosis and tracking of medical conditions. It is also used by individuals, such as athletes, who are interested in monitoring their heart rate to acquire maximum efficiency. There is a dramatic increase in incidents of heart and vascular diseases as a result of the lifestyle and unhealthy eating habits. Consequently, heart problems are on the increase on younger patients. Statistics shows that coronary heart disease is now the leading cause of death. In a clinical environment, heart rate is measured under controlled conditions like blood measurement, heart beat measurement, listening to heartbeats using Stethoscope and Electrocardiogram (ECG), but these methods are expensive and need to be carryout by an experience medical personnel. Drawbacks with ECG method are: too many sensors and cables connections, fluctuations in the ECG signal baseline, power line noise, and interference due to muscular activities and high cost of procurement. More so, ECG is not suitable for continuous monitoring on burnt victims and the conduction gel used may cause discomfort and inflammation on the skin.
  2. 2. 2 The average heart beats is between 60 and 100 times per minute. If your heart beats below 60 times per minute, this is bradycardia. If it beats more than 100 times per minute, is tachycardia. The rate of heartbeat is measured in beat per minute (bpm). According to having bradycardia (pronounced as Bray-dee KAR-dee-uh) means that your heart beats slower than normal. For majority people, heart rate of between 60–100 beats per minute is considered normal while at rest. Heart beats less than 60 times a minute, is slower than normal. Slow heart rate can be normal and healthy or it could be a sign of problem with the heart’s electrical system. For some people, slow heart rate does not cause any problem. It can be a sign of being very fit. Healthy young adults and athletics often have rates of less than 60 beats a minute. In other people, bradycardia is a sign of a problem with the heart. “It means that the heart’s natural pacemaker is not working right or that the electrical pathways are disrupted”. Men and women aged 65 and older are most likely to develop a slow heart rate that needs treatment. As a person ages, the electrical system of the heart often does not functions normally, hence needs to be monitored frequently and regularly. Resting Heart Rate (RHR) is the rate at which your heart beats when you are at rest after 10 minute. Though, the best time to measure RHR is right after you naturally wake up in the morning. Generally, the lower a person's RHR, the more fit that person is because the heart need not work hard. Resting heart rate can be decreased due to consistent physical training and exercise. However, RHR varies depending on the age and health condition of a person and time of the day as shown in Table 1. Resting Heart Rate Infant up to age 1 100 – 160 bpm Older Children ages 1-10 70 – 120 bpm Teenage Children 11-17 60- 100 bpm Adults 60 – 100 bpm Average of Sex Male 70 bpm Female 75 bpm Active athletes 40 – 60 bpm Table 1.1
  3. 3. 3 In this work, a novel low cost arduino based heartbeat monitoring device which uses optical sensors to measure the alteration in blood volume at fingertip is proposed and developed. 1.2 Objectives: The objective of this experiment is to build a system or device that will measure the rate of heart beat of human body & detect heart attack. The device must be able to monitor all the heart rate in a continuous interval length of time. For the device to monitor the heart rate in a continuous interval length of time, it is important for the device to be able to display the information regarding the heart rate to the patient on the liquid-crystal display (LCD) screen as well. 1.3 Required Hardware:  Arduino UNO  LCD Monitor (20×4)  Project Board  Heart Rate Sensor  555 Timer  Push Button (2 Pcs)  Buzzer  Capacitors (4.7 μF, 0.1μF)  Resistors(33kΩ, 3 pcs of 10kΩ, 47kΩ, 680Ω,100kΩ)  Connecting Wires  Power Supply 1.4 Required software:  Arduino IDE  ExpressSCH  ExpressPCB
  4. 4. 4 CHAPTER 2 DETAILS OF THE COMPONENTS 2.1Arduino: Arduino/Genuino Uno is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started. You can tinker with your UNO without worrying too much about doing something wrong, worst case scenario you can replace the chip for a few dollars and start over again. "Uno" means one in Italian and was chosen to mark the release of Arduino Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the reference versions of Arduino, now evolved to newer releases. The Uno board is the first in a series of USB Arduino boards, and the reference model for the Arduino platform; for an extensive list of current, past or outdated boards see the Arduino index of boards. [1] Fig 2.1: Arduino
  5. 5. 5 2.1.1 Arduino specification: Microcontroller ATmega328P Operating Voltage 5v Input voltage 7-12v Input voltage limit 6-20v Digital I/O Pins 6 Analogue input Pins 6 DC current perI/O pins 20 mA DC current for 3.3v Pin 50 mA Flash Memory Of which o.5KB is used SRAM 2 KB EEPROM 1KB Clock Speed 16MHz Length 68.6mm Width 53.4nm Weight 25g Table 2.1 2.1.2 Arduino programming: The Arduino/Genuino Uno can be programmed with the (Arduino Software (IDE)).Select "Arduino/Genuino Uno from the Tools > Board menu (according to the microcontroller on your board). The ATmega328 on the Arduino/Genuino Uno comes preprogrammed with a boot loader that allows us to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol (reference, C header files). We can also bypass the boot loader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header using Arduino ISP or similar. The ATmega16U2/8U2 is loaded with a DFU boot loader, which can be activated by:  On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy) and then rese ing the 8U2.  On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to put into DFU mode. [1]
  6. 6. 6 2.1.3 Warnings: The Arduino/Genuino Uno has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed. [1] 2.1.4 Differenceswith other boards: The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter. [1] 2.1.5 Power: The Arduino/Genuino Uno board can be powered via the USB connection or with an external power supply. The power source is selected automatically. External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the GND and VIN pin headers of the POWER connector. The board can operate on an external supply from 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts. The power pins are as follows:  VIN. The input voltage to the Arduino/Genuino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). One can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.  5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.  3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.  GND. Ground pins.  IOREF. This pin on the Arduino/Genuino board provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs to work with the 5V or 3.3V. [1]
  7. 7. 7 2.1.6 Memory: The ATmega328 has 32 KB (with 0.5 KB occupied by the boot loader). It also has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library). [1] 2.1.7 Input & Output: Each of the 14 digital pins on the Uno can be used as an input or output, using pin mode (), digital write (), and digital read () functions. They operate at 5 volts. Each pin can provide or receive 20 mA as recommended operating condition and has an internal pull- up resistor (disconnected by default) of 20-50k ohm. A maximum of 40mA is the value that must not be exceeded on any I/O pin to avoid permanent damage to the microcontroller. In addition, some pins have specialized functions:  Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.  External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attach interrupt () function for details.  PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog write () function.  SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using the SPI library.  LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.  TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library. The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and the analog reference () function. There are a couple of other pins on the board:  AREF. Reference voltage for the analog inputs. Used with analog Reference ().  Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board. [1]
  8. 8. 8 Fig 2.2: Pin Specification 2.1.8 Communication: Arduino/Genuino Uno has a number of facilities for communicating with a computer, another Arduino/Genuino board, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial communication over USB and appears as a virtual com port to software on the computer. The 16U2 firmware uses the standard USB COM drivers, and no external driver is needed. However, on Windows, an .inf file is required. The Arduino Software (IDE) includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial communication on pins 0 and 1). A Software serial library allows serial communication on any of the Uno's digital pins. The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino Software (IDE) includes a Wire library to simplify use of the I2C bus; see the documentation for details. For SPI communication, use the SPI library. [1]
  9. 9. 9 2.1.9Automatic (Software) Reset: Rather than requiring a physical press of the reset button before an upload, the Arduino/Genuino Uno board is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nano farad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino Software (IDE) uses this capability to allow you to upload code by simply pressing the upload button in the interface toolbar. This means that the boot loader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload. This setup has other implications. When the Uno is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the boot loader is running on the Uno. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data. The Uno board contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line.[1] 2.2 ProjectBoard A project board is a construction base prototyping of electroics. Originally it was literally a bread board, a polished piece of wood used for slicing bread. In the 1970s the solderless breadboard (AKA plugboard, a terminal array board) became available and nowadays the term "breadboard" is commonly used to refer to these. "Breadboard" is also a synonym for "prototype". Because the solderless breadboard does not require soldering, it is reusable. This makes it easy to use for creating temporary prototypes and experimenting with circuit design. For this reason, solderless breadboards are also extremely popular with students and in technological education. Older breadboard types did not have this property. A stripboard (Veroboard) and similar prototyping printed circuit boards, which are used to build semi- permanent soldered prototypes or one-offs, cannot easily be reused. A variety of electronic systems may be prototyped by using breadboards, from small analog and digital circuits to complete central processing units (CPUs).[2]
  10. 10. 10 Fig 2.3: project board 2.2.1 TypicalSpecifications of ProjectBoard A modern solderless breadboard consists of a perforated block of plastic with numerous tin plated phosphor bronze or nickel silver alloy spring clips under the perforations. The clips are often called tie points or contact points. The number of tie points is often given in the specification of the breadboard. The spacing between the clips (lead pitch) is typically 0.1 in (2.54 mm). Integrated circuits (ICs) in dual in-line packages (DIPs) can be inserted to straddle the centerline of the block. Interconnecting wires and the leads of discrete components (such as capacitors, resistors, and inductors) can be inserted into the remaining free holes to complete the circuit. Where ICs are not used, discrete components and connecting wires may use any of the holes. Typically the spring clips are rated for 1 ampere at 5 volts and 0.333 amperes at 15 volts (5 watts). The edge of the board has male and female notches so boards can be clipped together to form a large breadboard.[2] 2.2.2 Bus and Terminal stirps of ProjectBoard Solderless breadboards are available from several different manufacturers, but most share a similar layout. The layout of a typical solderless breadboard is made up from two types of areas, called strips. Strips consist of interconnected electrical terminals.[2]
  11. 11. 11 Terminal strips The main areas,to hold most of the electronic components. In the middle of a terminal strip of a breadboard, one typically finds a notch running in parallel to the long side. The notch is to mark the centerline of the terminal strip and provides limited airflow (cooling) to DIP ICs straddling the centerline. The clips on the right and left of the notch are each connected in a radial way; typically five clips (i.e., beneath five holes) in a row on each side of the notch are electrically connected. The five rows on the left of the notch are often marked as A, B, C, D, and E, while the ones on the right are marked F, G, H, I and J. When a "skinny" dual in-line pin package (DIP) integrated circuit (such as a typical DIP-14 or DIP-16, which have a 0.3-inch (7.6 mm) separation between the pin rows) is plugged into a breadboard, the pins of one side of the chip are supposed to go into row E while the pins of the other side go into row F on the other side of the notch. The columns are numbered 1 - 50 or whatever number of columns there are.[2] Bus strips To provide power to the electronic components. A bus strip usually contains two rows: one for ground and one for a supply voltage. However, some breadboards only provide a single-row power distributions bus strip on each long side. Typically the row intended for a supply voltage is marked in red, while the row for ground is marked in blue or black. Some manufacturers connect all terminals in a column. Others just connect groups of, for example, 25 consecutive terminals in a column. The latter design provides a circuit designer with some more control over crosstalk on the power supply bus. Often the groups in a bus strip are indicated by gaps in the color marking. Bus strips typically run down one or both sides of a terminal strip or between terminal strips. On large breadboards additional bus strips can often be found on the top and bottom of terminal strips. Note there are two different common alignments for the power bus strips. On small boards, with about 30 rows, the holes for the power bus are often aligned between the signal holes. On larger boards, about 63 columns, the power bus strip holes are often in alignment with the signal holes. This makes some accessories designed for one board type incompatible with the other. For example, some Raspberry Pi GPIO to breadboard adapters use offset aligned power pins, making them not fit breadboards with aligned power bus rows. There are no official standards, so the users need to pay extra attention to the compatibility between a specific model of breadboard and a specific accessory. Vendors of accessories and breadboards are not always clear in their specifications of which alignment they use. Seeing a close up photograph of the pin/hole arrangement can help determine compatibility.[2]
  12. 12. 12 2.2.3 Limitations Solderless project board usually cannot accommodate surface-mount technology devices (SMD) or components with grid spacing other than 0.1 in (2.54 mm). Further, they cannot accommodate components with multiple rows of connectors if these connectors do not match the dual in-line layout—it is impossible to provide the correct electrical connectivity. Sometimes small PCB adapters called "breakout adapters" can be used to fit the component to the board. Such adapters carry one or more components and have 0.1 in (2.54 mm) spaced male connector pins in a single in-line or dual in-line layout, for insertion into a solderless breadboard. Larger components are usually plugged into a socket on the adapter, while smaller components (e.g., SMD resistors) are usually soldered directly onto the adapter. The adapter is then plugged into the breadboard via the 0.1 in (2.54 mm) connectors. However, the need to solder the components onto the adapter negates some of the advantage of using a solderless breadboard. Very complex circuits can become unmanageable on a solderless breadboard due to the large amount of wiring required. The very convenience of easy plugging and unplugging of connections also makes it too easy to accidentally disturb a connection , and the system becomes unreliable. It is possible to prototype systems with thousands of connecting points, but great care must be taken in careful assembly, and such a system becomes unreliable as contact resistance develops over time. At some point, very complex systems must be implemented in a more reliable interconnection technology, to have a likelihood of working over a usable time period.[2] 2.3 Heart Rate Sensor The sensor consists of an IR light emitting diode transmitter and an IR photo detector acting as the receiver. The IR light passes through the tissues. Variations in the volume of blood within the finger modulate the amount of light incident on the IR detector. Two practical configurations could be implemented to achieve this function. In the first configuration, the finger can be placed between the transmitter and the receiver as shown in Fig. 2. In the second design, both the IR transmitter and receiver could be placed on the same plane and the finger would function as a reflector of the incident light instead. The IR receiver monitors the reflected signal in this case. The IR filter of the photo transistor reduces interference from the mains 50Hz noise. The IR LED is forward biased through a resistor to create a current flow. The values of resistors are chosen so that they produce the maximum amount of light output. The photo-resistor is placed in series with the resistor to reduce the current drawn by the detection system and to prevent short- circuiting the power supply when no light is detected by the photo resister.[3]
  13. 13. 13 Fig 2.4: Pulse sensor 2.3.1 Pulse Sensor Hook-Up Arduino Pin Pulse Sensor Cable Color RED 5V or 3V BLACK GND(Ground) PURPLE ANALOG 0(Zero) Table 2.2 2.4 555 Timer A 555 timer is an example of an integrated circuit, or an "IC chip." It is an electronic component consisting of a small piece of silicon or other semiconductor material with an electronic circuit built on it. The 555 timer is a highly stable device for generating accurate tie delays and oscillation. Additional terminals are provided for triggering or resetting if desired. In the time delay mode operation, the time is precisely controlled by one external resistor and capacitor. For a stable operation as an oscillator, the free running frequency and duty cycle are accurately controlled with two external resistors and one capacitor. [5]
  14. 14. 14 Fig 2.5: 555 Timer 2.4.1 Pin Configuration and Functions
  15. 15. 15 Functions: Table 2.3 2.4.2 Working Principle The internal resistors act as a voltage divider network, providing (2/3)Vcc at the non- inverting terminal of the upper comparator and (1/3)Vcc at the inverting terminal of the lower comparator. In most applications, the control input is not used, so that the control voltage equals +(2/3) VCC. Upper comparator has a threshold input (pin 6) and a control input (pin 5). Output of the upper comparator is applied to set (S) input of the flip-flop. Whenever the threshold voltage exceeds the control voltage, the upper comparator will set the flip-flop and its output is high. A high output from the flip-flop when given to the base of the discharge transistor saturates it and thus discharges the transistor that is connected externally to the discharge pin 7. The complementary signal out of the flip-flop goes to pin 3, the output. The output available at pin 3 is low. These conditions will prevail until lower comparator triggers the flip-flop. Even if the voltage at the threshold input falls below (2/3) VCC, that is upper comparator cannot cause the flip-flop to change again. It means that the upper comparator can only force the flip-flop’s output high. To change the output of flip-flop to low, the voltage at the trigger input must fall below + (1/3) Vcc. When this occurs, lower comparator triggers the flip-flop, forcing its output low. The low output from the flip-flop turns the discharge transistor off and forces the power amplifier to output a high. These conditions will continue independent of the voltage on the trigger input. Lower comparator can only cause the flip-flop to output low. From the above discussion it is concluded that for the having low output from the timer 555, the voltage on the threshold input must exceed the control voltage or + (2/3) VCC. NO NAME I/O DESCRIPTION 1 GND O Ground reference voltage. 2 Trigger I Responsible for transition of te flip flop from set to reset. 3 Output O Output driven waveform. 4 Reset I Negative pulse applied to this pin to disable or reset the timer. When not used to reset purpose ,it should be connected to VCC to avoid false triggering. 5 Control Voltage I Controls the threshold and trigger levels. It determines the pulse width of the output waveform. 6 Threshold I Compares the voltage applied to the terminal with a reference voltage 2/3 Vcc. 7 Discharge I Open collector output which discharges a capacitor between intervals. 8 V+ I Supply voltage with respect to GND.
  16. 16. 16 This also turns the discharge transistor on. To force the output from the timer high, the voltage on the trigger input must drop below +(1/3) VCC. This turns the discharge transistor off. A voltage may be applied to the control input to change the levels at which the switching occurs. When not in use, a 0.01 nano Farad capacitor should be connected between pin 5 and ground to prevent noise coupled onto this pin from causing false triggering. Connecting the reset (pin 4) to a logic low will place a high on the output of flip-flop. The discharge transistor will go on and the power amplifier will output a low. This condition will continue until reset is taken high. This allows synchronization or resetting of the circuit’s operation. When not in use, reset should be tied to +VCC.[5] 2.4.3 Features  It operates from a wide range of power supplies ranging from + 5 Volts to + 18 Volts supply voltage.  Sinking or sourcing 200 mA of load current.  The external components should be selected properly so that the timing intervals can be made into several minutes along with the frequencies exceeding several hundred kilo hertz.  The output of a 555 timer can drive a transistor-transistor logic (TTL) due to its high current output.  It has a temperature stability of 50 parts per million (ppm) per degree Celsius change in temperature, or equivalently 0.005 %/ °C.  The duty cycle of the timer is adjustable.  The maximum power dissipation per package is 600 mW and its trigger and reset inputs has logic compatibility. More features are listed in the datasheet.[5] 2.4.4 Applications  Precision Timing  Pulse Generation  Sequential Timing  Time Delay Generation  Pulse Width Modulation  Pulse Position Modulation  Linear Ramp Generator
  17. 17. 17 2.5 Push Button A push-button (also spelled pushbutton) or simply button is a simple switch mechanism for controlling some aspect of a machine or a process. Buttons are typically made out of hard material, usually plastic or metal. The surface is usually flat or shaped to accommodate the human finger or hand, so as to be easily depressed or pushed. Buttons are most often biased switches, though even many un-biased buttons (due to their physical nature) require a spring to return to their un-pushed state. Different people use different terms for the "pushing" of the button, such as press, depress, mash, hit, and punch.[11] Fig 2.6: Push Button 2.5.1 Uses: The "push-button" has been utilized in calculators, push-button telephones, kitchen appliances, and various other mechanical and electronic devices, home and commercial. In industrial and commercial applications, push buttons can be connected together by a mechanical linkage so that the act of pushing one button causes the other button to be released. In this way, a stop button can "force" a start button to be released. This method of linkage is used in simple manual operations in which the machine or process have no electrical circuits for control. Pushbuttons are often color-coded to associate them with their function so that the operator will not push the wrong button in error. Commonly used colors are red for stopping the machine or process and green for starting the machine or process.
  18. 18. 18 Red pushbuttons can also have large heads (called mushroom heads) for easy operation and to facilitate the stopping of a machine. These pushbuttons are called emergency stop buttons and are mandated by the electrical code in many jurisdictions for increased safety. This large mushroom shape can also be found in buttons for use with operators who need to wear gloves for their work and could not actuate a regular flush-mounted push button. As an aid for operators and users in industrial or commercial applications, a pilot light is commonly added to draw the attention of the user and to provide feedback if the button is pushed. Typically this light is included into the center of the pushbutton and a lens replaces the pushbutton hard center disk. The source of the energy to illuminate the light is not directly tied to the contacts on the back of the pushbutton but to the action the pushbutton controls. In this way a start button when pushed will cause the process or machine operation to be started and a secondary contact designed into the operation or process will close to turn on the pilot light and signify the action of pushing the button caused the resultant process or action to start. In popular culture, the phrase "the button" (sometimes capitalized) refers to a (usually fictional) button that a military or government leader could press to launch nuclear weapons.[11] 2.5.2 Applications  Event-drivenprogramming  Buttonaccordion  Button(computing)  Keyboard(computing)  Panicbutton  Placebobutton  Push-buttontelephone  Resetbutton  Shutterbutton  Turbo button 2.6 Buzzer A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm devices, timers and confirmation of user input such as a mouse click or keystroke. Buzzer is an integrated structure of electronic transducers, DC power supply, widely used in computers, printers, copiers, alarms, electronic toys, automotive electronic equipment, telephones, timers and other electronic products for sound devices. Active buzzer 5V Rated power can be directly connected to a continuous sound, this section dedicated sensor expansion module and the board in combination, can complete a simple circuit design to "plug and play”.
  19. 19. 19 Fig 2.7: Buzzer As a type of electronic buzzer with integrated structure, buzzers, which are supplied by DC power, are widely used in computers, printers, photocopiers, alarms, electronic toys, automotive electronic devices, telephones, timers and other electronic products for voice devices. Buzzers can be categorized as active and passive ones (see the following picture). Turn the pins of two buzzers face up, and the one with a green circuit board is a passive buzzer, while the other enclosed with a black tape is an active one. The difference between an active buzzer and a passive buzzer is: An active buzzer has a built-in oscillating source, so it will make sounds when electrified. But a passive buzzer does not have such source, so it will not tweet if DC signals are used; instead, you need to use square waves whose frequency is between 2K and 5K to drive it. The active buzzer is often more expensive than the passive one because of multiple built-in oscillating circuits.[6] 2.6.1 Features  Use an S8550 PNP transistor for drive.  Convenient control by program.  Working voltage: 3.3 - 5V; PCB size: 2.0 x 2.0 cm.  With power light and indicator of digital signal output.
  20. 20. 20 2.6.2 Applications  Electronic metronomes  Microwave ovens and other household appliances  Electrical alarms  Joy Buzzer - a mechanical buzzer used for pranks  Electric bell  Vibrator (mechanical)  Alarm management  Alarm clock 2.7 Capacitor A capacitor is a passive electronic component that stores energy in the form of an electrostatic field. In its simplest form, a capacitor consists of two conducting plates separated by an insulating material called the dielectric. The capacitance is directly proportional to the surface areas of the plates, and is inversely proportional to the separation between the plates. Capacitance also depends on the dielectric constant of the substance separating the plates. The standard unit of capacitance is the farad, abbreviated. This is a large unit; more common units are the microfarad, abbreviated µF (1 µF =10-6F) and the picofarad, abbreviated pF (1 pF = 10-12 F). Capacitors can be fabricated onto integrated circuit (IC) chips. They are commonly used in conjunction with transistors in dynamic random access memory (DRAM). The capacitors help maintain the contents of memory. Because of their tiny physical size, these components have low capacitance. They must be recharged thousands of times per second or the DRAM will lose its data. Large capacitors are used in the power supplies of electronic equipment o fall types, including computers and their peripherals. In these systems,the capacitors smooth out the rectified utility AC, providing pure, battery-like DC.[7]
  21. 21. 21 Fig 2.8: Capacitor 2.7.1 Working Process of Capacitor A capacitor consists of two metal plates which are separated by a non-conducting substance or dielectric. Take a look at the figure given below to know about dielectric in a capacitor. Though any non-conducting substance can be used as a dielectric, practically some special materials like porcelain, Mylar, Teflon, mica, cellulose and so on. A capacitor is defined by the type of dielectric selected. It also defines the application of the capacitor. According to the size and type of dielectric used, the capacitor can be used for high- voltage as well as low-voltage applications. For applications in radio tuning circuits air is commonly used as the dielectric. for applications in timer circuits Mylar is used as the dielectric. For high voltage applications glass is normally used. For application in X-ray and MRI machines, ceramic is mostly preferred. The metal plates are separated by a distance “d”, and a dielectric material is placed in- between the plates.
  22. 22. 22 Capacitors deviate from the ideal capacitor equation in a number of ways. Some of these, such as leakage current and parasitic effects are linear, or can be assumed to be linear, and can be dealt with by adding virtual components to the equivalent circuit of the capacitor. The usual methods of network analysis can then be applied. In other cases, such as with breakdown voltage, the effect is non-linear and normal (i.e., linear) network analysis cannot be used, the effect must be dealt with separately. There is yet another group, which may be linear but invalidate the assumption in the analysis that capacitance is a constant. Such an example is temperature dependence. Finally, combined parasitic effects such as inherent inductance, resistance, or dielectric losses can exhibit non- uniform behavior at variable frequencies of operation.[7] 2.7.2 Breakdown Voltage of Capacitor Above a particular electric field, known as the dielectric strength, the dielectric in a capacitor becomes conductive. The voltage at which this occurs is called the breakdown voltage of the device, and is given by the product of the dielectric strength and the separation between the conductors. The maximum energy that can be stored safely in a capacitor is limited by the breakdown voltage. Due to the scaling of capacitance and breakdown voltage with dielectric thickness, all capacitors made with a particular dielectric have approximately equal maximum energy density, to the extent that the dielectric dominates their volume. For air dielectric capacitors the breakdown field strength is of the order 2 to 5 MV/m; for mica the breakdown is 100 to 300 MV/m; for oil, 15 to 25 MV/m; it can be much less when other materials are used for the dielectric. The dielectric is used in very thin layers and so absolute breakdown voltage of capacitors is limited. Typical ratings for capacitors used for general electronics applications range from a few volts to 1 kV. As the voltage increases, the dielectric must be thicker, making high-voltage capacitors larger per capacitance than those rated for lower voltages. The breakdown voltage is critically affected by factors such as the geometry of the capacitor conductive parts; sharp edges or points increase the electric field strength at that point and can lead to a local breakdown. Once this starts to happen, the breakdown quickly tracks through the dielectric until it reaches the opposite plate, leaving carbon behind and causing a short (or relatively low resistance) circuit. The results can be explosive as the short in the capacitor draws current from the surrounding circuitry and dissipates the energy. The usual breakdown route is that the field strength becomes large enough to pull electrons in the dielectric from their atoms thus causing conduction. Other scenarios are possible, such as impurities in the dielectric, and, if the dielectric is of a crystalline nature, imperfections in the crystal structure can result in an avalanche breakdown as seen in semi-conductor devices. Breakdown voltage is also affected by pressure, humidity and temperature.[8]
  23. 23. 23 2.7.2 Advantages  Since the capacitor can discharge in a fraction of a second, it has a very large advantage. Capacitors are used for appliances which require high speed use like in camera flash and laser techniques.  Capacitors are used to remove ripples by removing the peaks and filling in the valleys.  A capacitor allows ac voltage to pass through and blocks dc voltage. This has been used in many electronic applications.[8] 2.8 Resistor Electricity flows through a material carried by electrons, tiny charged particles inside atoms. Broadly speaking, materials that conduct electricity well are ones that allow electrons to flow freely through them. In metals, for example, the atoms are locked into a solid, crystalline structure (a bit like a metal climbing frame in a playground). Although most of the electrons inside these atoms are fixed in place, some can swarm through the structure carrying electricity with them. That's why metals are good conductors: a metal puts up relatively little resistance to electrons flowing through it. Plastics are entirely different. Although often solid, they don't have the same crystalline structure. Their molecules (which are typically very long, repetitive chains called polymers) are bonded together in such a way that the electrons inside the atoms are fully occupied. There are, in short, no free electrons that can move about in plastics to carry an electric current. Plastics are good insulators: they put up a high resistance to electrons flowing through them. This is all a little vague for a subject like electronics, which requires precise control of electric currents. That's why we define resistance more precisely as the voltage in volts required to make a current of 1 amp flow through a circuit. If it takes 500 volts to make 1 amp flow, the resistance is 500 ohms (written 500 Ω). You might see this relationship written out as a mathematical equation: V = I × R
  24. 24. 24 Fig 2.9: Resistor 2.8.1 Resistor Color Codes 1. On most resistors, you'll see there are three rainbow-colored bands, then a space, then a fourth band colored brown, red, gold, or silver. 2. Turn the resistor so the three rainbow bands are on the left. 3. The first two of the rainbow bands tell you the first two digits of the resistance. Suppose you have a resistor like the one shown here, with colored bands that are brown, black, and red and a fourth golden band. You can see from the color chart below that brown means 1 and black means 0, so the resistance is going to start with "10". The third band is a decimal multiplier: it tells you how many powers of ten to multiply the first two numbers by (or how many zeros to add on the end, if you prefer to think of it that way). Red means 2, so we multiply the 10 we've got already by 10 × 10 = 100 and get 1000. Our resistor is 1000 ohms. 4. The final band is called the tolerance and it tells you how accurate the resistance value you've just figured out is likely to be. If you have a final band colored gold, it means the resistance is accurate to within plus or minus 5 percent. So while the officially stated resistance is 1000 ohms, in practice, the real resistance is likely to be anywhere between 950 and 1050 ohms. 5. If there are five bands instead of four, the first three bands give the value of the resistance, the fourth band is the decimal multiplier, and the final band is the tolerance. Five-band resistors quoted with three digits and a multiplier, like this, are necessarily more accurate than four-band resistors, so they have a lower tolerance value. [9]
  25. 25. 25 2.8.2 Working Process of Resistors People who make electric or electronic circuits to do particular jobs often need to introduce precise amounts of resistance. They can do that by adding tiny components called resistors. A resistor is a little package of resistance: wire it into a circuit and you reduce the current by a precise amount. From the outside, all resistors look more or less the same. As you can see in the top photo on this page, a resistor is a short, worm-like component with colored stripes on the side. It has two connections, one on either side, so you can hook it into a circuit. What's going on inside a resistor? If you break one open, and scratch off the outer coating of insulating paint, you might see an insulating ceramic rod running through the middle with copper wire wrapped around the outside. A resistor like this is described as wire- wound. The number of copper turns controls the resistance very precisely: the more copper turns, and the thinner the copper, the higher the resistance. In smaller-value resistors, designed for lower-power circuits, the copper winding is replaced by a spiral pattern of carbon. Resistors like this are much cheaper to make and are called carbon- film. Generally, wire-wound resistors are more precise and more stable at higher operating temperatures.[9]
  26. 26. 26 2.8.3 Limitations of Resistors The failure rate of resistors in a properly designed circuit is low compared to other electronic components such as semiconductors and electrolytic capacitors. Damage to resistors most often occurs due to overheating when the average power delivered to it greatly exceeds its ability to dissipate heat (specified by the resistor's power rating). This may be due to a fault external to the circuit, but is frequently caused by the failure of another component (such as a transistor that shorts out) in the circuit connected to the resistor. Operating a resistor too close to its power rating can limit the resistor's lifespan or cause a significant change in its resistance. A safe design generally uses overrated resistors in power applications to avoid this danger. Low-power thin-film resistors can be damaged by long-term high-voltage stress, even below maximum specified voltage and below maximum power rating. This is often the case for the startup resistors feeding the SMPS integrated circuit. When overheated, carbon-film resistors may decrease or increase in resistance.Carbon film and composition resistors can fail (open circuit) if running close to their maximum dissipation. This is also possible but less likely with metal film and wirewound resistors. Surface mount resistors have been known to fail due to the ingress of sulfur into the internal makeup of the resistor. This sulfur chemically reacts with the silver layer to produce non-conductive silver sulfide. The resistor's impedance goes to infinity. Sulfur resistant and anti-corrosive resistors are sold into automotive, industrial, and military applications. ASTM B809 is an industry standard that tests a part's susceptibility to sulfur. An alternative failure mode can be encountered where large value resistors are used . Resistors are not only specified with a maximum power dissipation, but also for a maximum voltage drop. Exceeding this voltage causes the resistor to degrade slowly reducing in resistance. The voltage dropped across large value resistors can be exceeded before the power dissipation reaches its limiting value. Since the maximum voltage specified for commonly encountered resistors is a few hundred volts, this is a problem only in applications where these voltages are encountered. Variable resistors can also degrade in a different manner, typically involving poor contact between the wiper and the body of the resistance. This may be due to dirt or corrosion and is typically perceived as "crackling" as the contact resistance fluctuates; this is especially noticed as the device is adjusted. Potentiometers which are seldom adjusted, especially in dirty or harsh environments, are most likely to develop this problem. When self-cleaning of the contact is insufficient, improvement can usually be obtained through the use of contact cleaner (also known as "tuner cleaner") spray. The crackling noise associated with turning the shaft of a dirty potentiometer in an audio circuit (such as the volume control) is greatly accentuated when an undesired DC voltage is present, often indicating the failure of a DC blocking capacitor in the circuit.[9]
  27. 27. 27 2.8.4 Applications  Circuitdesign  Dummyload  Electrical impedance  Iron-hydrogenresistor  Piezoresistive effect  Shotnoise  Thermistor  Trimmer(electronics) 2.9 Power Supply This project is designed to run on a 9V battery source. It is expected to deliver the necessary voltage level needed by the microcontroller and the other devices. These devices required a 5V supply instead of the 9V, hence the need for a voltage regulator. The LM7805 chip is used to regulate the 9v to 5V supply for the whole design. The 9V battery source is regulated to a 5V by a voltage regulator. The capacitor is used to increase the transient response off the regulator. 2.10 LCD: Here is brief data for the Systronix 20x4 character LCD. We're not aware of any incompatibilities between the two - at least we have never seen any in all the code and custom applications we have done. This 20x4 LCD is electrically and mechanically interchangeable with 20x4 LCDs from several other vendors. The only differences we've seen among different 20x4 LCDs are: 1) LED backlight brightness, voltage and current vary widely, as does the quality of the display 2) There is a resistor “Rf” which sets the speed of the LCD interface by controlling the internal oscillator frequency. Several displays we have evaluated have a low resistor value. This makes the display too slow. Looking at the Hitachi data sheet page 56, it appears that perhaps the “incorrect” resistor is really intended for 3V use of the displays. At 5V the resistor Rf should be 91 K ohms. At 3V it should be 75 K ohms. Using a 3V display at 5V is acceptable from a voltage standpoint (the display can operate on 3-5V) but the oscillator will then be running too slowly. One fix is to always check the busy flag and not use a fixed time delay in your code, then it will work regardless of the LCD speed. The other option is to always allow enough delay for the slower display. All systronix 20x4 LCDs have the 91 K ohm resistor and are intended for 5V operation. [10]
  28. 28. 28 2.10.1 Specification: Gross Weight (kg) 0.1000 Manufacturer East Rising Continuity Supply We promise the long term continuity supply for this product no less than 10 years since 2015. Part Number ERM2004SYG-2 Display Format 20x4 Character Interface 6800 4-bit Parallel , 6800 8-bit Parallel IC or Equivalent AIP31066 , HD44780, KS0066 , SPLC780 , ST7066 Appearance Black on Yellow Green Diagonal Size No Connection Pin Header Outline Dimension 98.00(W)x60.0(H)x14.0(T)mm Visual Area 76.00x25.20mm Active Area 70.40(W)x20.80(H)mm Character Size 2.95x4.75mm Dot (Pixel) Size 0.55x0.55mm Dot (Pixel) Pitch 0.60x0.60mm IC Package COB Display Type STN-LCD Yellow Green Touch Panel Optional No Sunlight Readable Yes Response Time(Type) No Contrast Ratio(Type) No Colors No
  29. 29. 29 Viewing Direction 6:00 Viewing Angle Range No Brightness(Type) No Backlight Color White Color Backlight Current (Type) 75mA Power Supply(Type) 3.3V, 5V Supply Current for LCM(Max) 2000uA Operating Temperature -20℃~70℃ Storage Temperature -30℃~80℃ Series Number ERM2004-2 Fig 2.10: LCD Display. 2.11 Potentiometer: An adjustable potentiometer can open up many interesting user interfaces. Turn the pot and the resistance changes. Connect VCC to an outer pin, GND to the other, and the center pin will have a voltage that varies from 0 to VCC depending on the rotation of the pot. Hook the center pin to an ADC on a microcontroller and get a variable input from the user. This pot has a ¼" mounting diameter and has a 10K linear taper. Check the datasheet for dimensional drawings.
  30. 30. 30 This potentiometer is a two-in-one, good in a breadboard or with a panel. It’s a fairly standard linear taper 10K ohm potentiometer, with a grippy shaft. It’s smooth and easy to turn, but not so loose that it will shift on its own. We like this one because the legs are 0.2" apart with pin-points, so you can plug it into a breadboard or perfboard. Once you're done prototyping, you can drill a hole into your project box and mount the potentiometer that way. Fig 2.11: Potentiometer
  31. 31. 31 CHAPTER 3 CIRCUIT OPERARTION 3.1 Block diagram: Fig 3.1: Block diagram. 3.2 Circuit Explanation: Circuit of heartbeat monitor, which contains arduino uno, heart beat sensor module, reset button and LCD. Arduino controls whole the process of system like reading pulses form Heart beat sensor module, calculating heart rate and sending this data to LCD. We can set the sensitivity of this sensor module by inbuilt potentiometer placed on this module. Heart beat sensor module’s output pin is directly connected to pin 8 of arduino. Vcc and GND are connected to Vcc and GND. A 16x2 LCD is connected with arduino in 4-bit mode. Control pin RS, RW and En are directly connected to arduino pin 12, GND and 11. And data pin D4-D7 is connected to pins 5, 4, 3 and 2 of arduino. And one push button is added for resetting reading and another is used to start the system for reading pulses. When we need to count heart rate, we press start button then arduino start counting pulses and also start counter for five seconds. This start push button is connected to pin 7 and reset push button is connected to pin 6 of arduino with respect to ground.
  32. 32. 32 3.3 Schematic Diagram Fig 3.2: Schematic diagram 3.4 Working Process  Here LCD, Buzzer is an output device, Arduino is processing device, 555 Timer is input device. When the 9v power supply is applied then the system is on.  If we put a fingertip on the heart rate sensor ,when a pulse comes ,then the pulse is counted by 555 timer through transistor. Output pin 3 of 555 timer is directly connected to arduino pin 8.  We start counter by using timer counter function in arduino that is millis();. And take first pulse counter value form millis();.  Then we wait for five pulses. After getting five pulses we again take counter value in time2 and then we substarct time1 from time2 to take original time taken by five pulses. And then divide this time by 5 times for getting single pulse time. Now we have time for single pulse and we can easily find the pulse in one minute,
  33. 33. 33 dividing 60000 ms by single pulse time. Then we have calculated total heart beat in a minute by applying the below formula: Five_pusle_time=time2-time1; Single_pulse_time= Five_pusle_time /5; rate=1024/ Single_pulse_time; where time1 is first pulse counter value time2 is list pulse counter value rate is final heart rate.  A 20×4 LCD is connected to the arduino. The final heart beat rate is shown in display.  If the heart beat level crosses 82 ,then the buzzer buzzes. 3.5 PCB layout: Fig 3.3: PCB Layout
  34. 34. 34 CHAPTER 4 OUTCOME OF ANALYSIS 4.1 Advantages:  It is a fantastic tool for giving a clear indication and evaluation of the condition of cardiovascular system during physical activity  The device is portable, durable hence could be used by any individual in the proposed region even if not a cardiologist.  It can also be easily used by individual users, e.g. athletes during sporting activities.  This device could be used in clinical and nonclinical environments.  This system detect heart beat level and informs as soon as the heart beat level does not fall within the permissible limit.  Thus this system can be used to save life of many people as this system alerts the doctor.  Utilization of this device gives a definitive data on what effort level it takes for an individual to accomplish a given task as well as under different circumstances.  Heart beat rate monitor indicates the heart’s ability to recover from a given exercise or work. Faster recovery rate indicates enhanced cardiovascular capacity. 4.2 Limitations  It may give inconsistent readings which may reduce the efficiency of the project.  This is also a noteworthy disadvantage of the heart beat rate monitor.  Many people can’t use the device because of its expense.  Without using any device heart beat rate can be simply measured by pressing the finger into the inside of wrist.
  35. 35. 35 4.3 Future Scopes  Monitoring device that could be used to detect the heart beat anomalies of physically challenged individuals without hands.  Also a graphical LCD can be used to display a graph of the change of heart rate over time.  A serial output can be incorporated into the device so that the heart rates can be sent to a Personal Computer (PC) for further online or offline analysis.  It could be integrated with mobile technology for e-health cloud transmission to health care providers.
  36. 36. 36 CHAPTER 5 PRECAUTION & CONCLUSION 5.1 Precautions  During placing the finger in touch of LED care should be taken so that it remains in proper place of the finger.  Switching should be done after the finger has touched with LED.  Continuous power supply should be ensured so that we can get proper heart beat counting.  During making the PCB circuit care should be taken so that in times of ironing the circuit is not shorted.  ICs should be properly placed on the IC bases to get the reading. 5.2 Conclusion & Discussion In this paper, the design and development of a low cost HRM device has been presented. The device is ergonomic, portable, durable, and cost effective. The HRM device is efficient and easy to use. Tests have shown excellent agreement with actual heartbeat rates. This device could be used in clinical and nonclinical environments. It can also be easily used by individual users, e.g. athletes during sporting activities. The device could also be used as a monitoring instrument exploiting the SMS capabilities provided by this system. By using my heart beat rate monitor machine I get the heart beat counting in a minute. In doing so variation of reading may be observed in a person’s beat counted if I take the reading at different places of different fingers. So for most appropriate reading the LED should be placed just beside the upper portion of the nail. The more the finger contacts with LED the more accurate the reading becomes. The counted beat varies from person to person so no need to worry or think about the accuracy of the device.
  37. 37. 37 Reference: Reference no. https://www.arduino.cc/en/Main/ArduinoBoardUno 1 https://en.wikipedia.org/wiki/Breadboard 2 http://pulsesensor.com/pages/pulse-sensor-amped-arduino-v1dot1 3 https://github.com/WorldFamousElectronics/PulseSensor_Amped_Arduino 4 http://www.circuitstoday.com/555-timer 5 https://www.sunfounder.com/wiki/index.php?title=Buzzer_modules 6 http://www.circuitstoday.com/working-of-a-capacitor 7 http://whatis.techtarget.com/definition/capacitor-capacitance 8 http://www.explainthatstuff.com/resistors.html 9 http://www.buydisplay.com/default/lcd-module-20x4-display-datasheet-character- hd44780-black-on-yg 10 https://en.wikipedia.org/wiki/Push-button 11
  38. 38. 38 APPENDIX Program of Arduino #include<LiquidCrystal.h> LiquidCrystal lcd(2, 3, 4, 5, 6, 7); int in = 9; int Reset = A0; int start = A1; int alarm = 10; int count = 0, i = 0, k = 0, rate = 0; unsigned long time2, time1; unsigned long time; byte heart[9] = { 0b00000, 0b01010, 0b11111, 0b11111, 0b11111, 0b01110, 0b00100, 0b00000
  39. 39. 39 }; void setup() { lcd.createChar(1, heart); lcd.begin(20, 4); lcd.print("Heart Beat "); lcd.write(1); lcd.setCursor(0, 1); lcd.print("Monitering"); pinMode(in, INPUT); pinMode(Reset, INPUT); pinMode(start, INPUT); pinMode(alarm, OUTPUT); digitalWrite(Reset, HIGH); digitalWrite(start, HIGH); delay(100); } void loop() { if (!(digitalRead(start))) { k = 0;
  40. 40. 40 lcd.clear(); lcd.print("Please wait......."); while (k < 5) { digitalWrite(13, LOW); if (digitalRead(in)) { if (k == 0) { time1 = millis(); } k++; digitalWrite(13, HIGH); while (digitalRead(in)); } } time2 = millis(); rate = time2 - time1; rate = rate / 2; rate = 1024 / rate; lcd.clear(); lcd.print("Heart Beat Rate:"); lcd.setCursor(0, 1);
  41. 41. 41 lcd.print(rate); //if (rate>=80){ // digitalWrite(alarm,HIGH); // delay(3000); //lcd.setCursor(0, 2); // lcd.print("Serious Mode"); // } lcd.print(" "); lcd.write(1); k = 0; rate = 0; } if (!digitalRead(Reset)) { rate = 0; lcd.clear(); lcd.print("Heart Beat Rate:"); lcd.setCursor(0, 1); lcd.write(1); lcd.print(rate); k = 0; } }
  42. 42. 42 Prototype of the Project

×