2. Scope of Delivery
Project Plan/Time line
Resource Planning ( People and Time)
System Design, Develop and Test
Hardware interface
Firmware programming
Output interface and presentation
Work Breakdown Structure
Risk and Risk Mitigation
Further development
3. Design a heart rate reader using Atmel
Atmega164a development board.
Delivery deadline: 18th November 2015.
Main Features:
Display real time beats per minute on GUI
LED indication of heart beat
4. Understanding…
Purpose of the device
o what to measure
o what to calculate
o What to display
Working principles
o electrical systems
o digital signals and systems
o software programing
o real life systems
o analog and digital data processing
5. Research….
Available products today
o Chest strap Type: A wireless sensor on a chest strap detects the
pulse electronically and sends that data to a wristwatch-style
receiver, which displays the heart rate.
o Strapless Type: A sensor built into the wrist unit’s watchband or
case back detects the pulse
o Pulse Type
Eg: Polar X7, Garmin FR70, Samsung GearFit, Mio Fuse
Types of pulse receivers
o Photo diodes
o Chest electrodes
http://gadgether.com/small-lightweight-necessity-the-fingertip-heart-
rate-monitor/
6. Heart Rate Target Zone
50-85%
Avg. Maximum Heart Rate
100%
Age Beats/minute Beats/minute
20 100–170 200
25 98–166 195
30 95–162 190
35 93–157 185
40 90–153 180
45 88–149 175
50 85–145 170
55 83–140 165
60 80–136 160
65 78–132 155
70 75–128 150
Research….
Common Users
o Joggers & Runners
o Fitness trainers and trainees
o Sportsmen and women www.heartratejournal.com
7. Hardware
interface
•Sensor interface
•Signal processing
• Amplification
•filtering
•output
Firmware
programming
•ADC / AC
•USART
•Registers, calculations and subfunctions
•Firmware program
Interface and
GUI
•Software and GUI design
•Interface to Atmega164a
8.
9.
10. Sensor Option 1
Dry Electrodes
Sensor Option 2
Finger Clipper
Pre-
Amplification
Noise
Filtering Stage
Post-Amplification &
Gain Stage
Analogue Signal To
Atmega 164a
Design HW Circuit to
Amplify the Signal
Design HW Circuit to
Filter Noise of the
Signal
Design HW Circuit for
Signal Gain
12. • Instrumentation Amplifier
INA128
• Operational Amplifier LM741
• Atmega164A
• LCD
• Voltage Regulator 7805
• LED
• Diode 1N4001
• 9V Batteries with connectors
• Bread Board
• Jump wires
Resistor
• 100 ohms, ¼ w (x1)
• 470 ohms, ¼ w (x1)
• 1 kilo ohms, ¼ w (x1)
• 10 kilo ohms, ¼ w (x2)
• 100 kilo ohms, ¼ w (x2)
• 1Mega ohms, ¼ w (x1)
Capacitor
• 10nF (x1)
• 47nF (x1)
13. INA 128 Features:
• Instrumentation Amplifier
• Medical Instrumentation
• General Purpose Low-power Amplifier
• Excellent accuracy
• Widely Used in Medical Application Products
INA 126 Features:
• Industrial Sensor Amplifier
• Precision Instrumentation Amplifier
14. Noise
Filtering Stage
Post-
Amplification
& Gain Stage
Type : 3M
Pre-
Amplification
& Gain Stage
Electrodes
Pre-
Amplification
INA128 Instrument Amplifier
Low Pass filter
Post filter
Amplification
LM741 OP-Amp
Disposable
Hygiene
Output signal
from Sensor
Analog signal
Peak voltage – 3.1V
Low voltage – 2.6V
Eliminate lower
frequencies
15.
16.
17. 5to10mv signal feeds in to
INA 128 Pin#2”Vin+ & Pin#3
Vin-
IC 7805 provides regulated
constant -5V supply to INA
128 Pin#4 “V-”.
+5V supply is feeds in to
INA 128 Pin#7 “V+”
100Ω gain resistor provide
the 500 x of gain to the input
signal
Input : 5~10mv
Output : 2.5~2.6 V DC
Input
voltage=~5mv
VOut=2.5V
G=1+(50K Ω /100 Ω)=501V/V
19. VCC2
-5V
VCC2
+5V
Vout signal (2.5v) from INA128
feeds in to LM741 Op-Amp
Pin#3”Vin+. Non-Inverting
Amplifier.
+5V supply feeds to LM741
Pin#7 “V+”.
Output of LM741 is a
triggering pulse of (2.5V to
3.1V)
Pulse Frequency F=1/Time
Time per pulse=25msec
Therefore,
Frequency = 1/(25*10^-3sec)
=40Hz
VOut=2.5V to 3.1VVin=2.5V to 3.0V
20. INA126 with no pulses detected.
No reference voltage for the circuit.
Problem encountered at filtering segment.
Electrodes not detecting the pulses.
Oscilloscope not responding.
Noise after integration.
Keep circuits stability – moving, transporting.
21. • Replaced INA128 instrumentation amplifier
• Introduce a Voltage regulator -7805 to
provide -5v reference voltage for INA128 &
LM741.
• 10nF and 47nF capacitors used for low pass
filter circuit to minimize noise.
• Procurement of Better Electrode with Tape
and Solid Gel
• Use alternative calibrated oscilloscope.
• Troubleshoot the circuit to eliminate noise
• Build the circuit on a PCB to keep the stability
22.
23. Research areas
Atmega164A Analog Comparator (AC)
Atmega164A Analog-to –Digital converter (ADC)
Atmega164A External Interrupts
Atmega164A Interrupt Handling
Arduino Heart Rate example codes
(http://www.slideshare.net/varshakh7/heart-beat-detector-using-arduino-
37193083)
Digital Signals Processing
AVR Programming
C/C++ programing
24. Firmware Program
Main Program
Analog Comparator
Compare input
voltage and output
digital pulse
Counter
Read “High” pulses
and count.
Calculate HR
Sub Funcations
LCD ini, LCD Read
/ Write
LCD Control
instructions.
Data read and Write
Interrupt Handling
Call global
interrupts.
UART ini, UASt
Read/Write
Handle read write
bit stream to PC
using USB port
25. Ready status:
Read input Analog
signal in Port B > Pin 3
Compare input signal
voltage against reference
voltage of 2.7V supplied
via Port B > Pin2
If
{ Input > reference
Output “1” }
If
{ output = 1
Counter ++ }
Read total counts every
5 seconds
Calculate the heart rate
{ (total
counts/5000ms)*6000
0ms
Convert Integer heart
rate value to String
Output Heart Rate
string send to LCD
Send to UART
Display
Refresh every 5
Seconds
26. Main Program
o Analog Comparator
o Beats Counter
Sub Programs
LCD
o 3 bit control instructions
o 8 Bit Data read/write
o Sub program codes to display on specific line and location,
send string or characters
UART
Interrupts
27. System Constrains
Weak input signals ( in to development board)
Requirement of noise filtering
System Impedance/Resistance limitations
Input signal response and accuracy
28. Buzzer
Heart bit LED Indication
LCD display
GUI display on computer
Mobile phone
Smart watch
29. Wires
Com port
UART to USB (Plus Virtual com port
software)
RS232, RS485
Wireless connections (Bluetooth, WIFI)
Inputs (Keypad , Computer keyboard)
30. Visual .net
Visual Basic
Visual C++
Matlab
Labview
Optional
Data Storing into Text or Excel file
31.
32. Setup interface connection and display on terminal
Install AVR studio
Use UART to USB cable to connect Atmega 164A to
PC
Install Atmel Libus USB Driver
Install Virtual Com Port Driver
Use Atmel C programming code to transmit data
Use Atmel Add on terminal program to display the
data
32
35. Create GUI Interface window and display values
Install Matlab
Create an static text box
Create Start button with callback function in GUI
Add Looping counter with 0.5 second delay into
program code
Ensure the counter value display in the GUI
correctly
35
38. 38
Transmit data from Atmega to display on GUI
window
Setup UART to USB connections
Setup and use push button to simulate pulses
into Atmega board
Write Atmega Atmel program code to send
values
Run the GUI and receive the data to display
Phase 3 Testing Method
40. GUI Design (Initially we have no idea of what
GUI is about)
Interface (Between Atmega board to GUI)
Serial communication
Data transfer
Group meeting
System Design – Software and
Interface Challenges
41. To use Atmel AVR studio and Matlab
To create Matlab GUI
To transmit and receive through serial connection
To Debug using breakpoint and check data values
To work as a team
To split the tasks
Finally combine the project
41
42. Display heart rate Graph
Calorie Calculator
Heartbeat Chart
Integrate Bluetooth communication for wireless
data transfer
Interface to phone application.
42
43. Time and resources
Family Commitments
Work Commitments
Meeting Locations
Knowledge - Software and hardware
44. 5 Almost certain 5
10 15
(Fail to meet
project
milestones)
20 25
4 Likely 4
8
(Software virus) 12
16
(Components
Damage)
20
(Injuries)
3 Possible 3 6
9
(Team member
absent/sick)
12
(Change of Plan
& solution)
15
(Damage of
ATMega Board)
2 Unlikely 2
4
(Timetaken to
install
software)
6 8 10
1 Rare 1 2 3 4 5
Insignificant
Minor
Moderate
Major
Severe
1 2 3 4 5
Likelihood
45. Fail to meet project milestones
Daily project progress monitoring ( Whatsapp/e-mails)
Real-time data sharing ( Dropbox)
Weekly meetings with entire team.
Planned buffer time for every tasks.
Team member absent/sick/travelling
Each team has 2 members (back up each other).
Availability of a floating member ( support 3 teams)
Ready to distribute work load ( shared knowledge)
Remote access ( Skype/Lync/….)
Components damage
Availability of extra components.
Shared budget ( SGD 70.00)
Change of designs/solutions
Daily project progress monitoring ( Whatsapp/e-mails/phone)
Knowledge sharing ( provide additional support/other solutions/combine teams)
Utilize buffer time/Assign additional work hours
46. Integrate Bluetooth communication for wireless data transfer
Interface to GSM, Distance walked, Step Count
Calculate Calories