FINAL - Electrocardiography (ECG) - 1122
FINAL - Electrocardiography (ECG) - 1122
project
E L E C T R O C A R D I O G RA P H Y ( E C G ) – ( O P T I O N A L BY A D 2 )
&
A R D U I N O M U LT I - F U N C T I O N D I S P L AY
DISCLAIMER
All content found on the final project, including: text, images, audio,
or other formats were created for informational purposes only.
Offerings for continuing education credits are clearly identified and
the appropriate target audience is identified. This lab is not intended
to be a substitute for professional medical advice, diagnosis, or
treatment. Always seek the advice of your physician or other
qualified health provider with any questions you may have regarding
a medical condition. Never disregard professional medical advice or
delay in seeking it because of something you have read on this lab.
Outline
• Schedule
• ECG Project Specification
• ECG Circuit
• Modified Instrumentation Amplifier
• Experiment 1: Noise Measurement
• Experiment 2: Noise and filter
• Experiment 3: Cardiac signal, Noise and filter
• Experiment 3A Input test ECG signal to instrumentation amplifier with filter (optional by AD2)
• Experiment 4: human body Cardiac signal
• Experiment 5: human body Cardiac signal and Arduino ADC
• Electrodes assembling
• Arduino Project Specification (Experiment 6)
• Special font
Schedule
• Week 13: Lab10 - Instrment Amplifier lab
• Week 14: Final project-ECG lab - Part 1
• Check project materials
• Electrodes assembling (depends)
• Implement and verify project
• An appropriate report on all steps or results you take to complete the project
• Better report format and clear data may get better report performance
• “Copy and paste” too often may lower your report performance
• For achieving better score, you need take more steps as possible. You are not necessary to implement bonus design if you don’t
understand how it works and why you need it.
• Additional function doesn’t imply bonus score. Instead, your response to TA’s question during demonstration is the key factor.
Modified Instrumentation Amplifier
(LFH by AD2)-optional
For Lab from Home and Arduino ADC,
we need some modifications of the
instrumentation amplifier in Lab10.
Please change the following parts:
1. Power Source: ± 5V (for AD2)
2. U4 Op-amp’s V+ configuration for 2V Vdc≈2V
3. R7 = 10k
4. R9 = 100k (from Lab10)
NOTICE THAT YOUR INPUT SIGNAL SHOULD BE
MEASURED BY “DC COUPLING” CHANNEL
If you prefer DC ± 12V own DIY power supply, you
need to change U4 Op-amp’s V+ configuration for 2V
to Arduino ADC, (R10 : R11 can change to 10k : 2k)
USE FUNCTION GENERATOR AS INPUT SIGNAL
Experiment 1
1. Turn on the oscilloscope and connect a BNC cable to the CH1. Let BNC cable’s two terminal
be open. (i.e. floating status) Set vertical scale to “10 mV/” and horizontal scale to “10.00
ms/.” Record the waveform and relevant parameters. (e.g. frequency, peak-peak voltage,
etc.)
2. Use your two hands to hold each BNC cable’s terminal. Repeat step 1.
Experiment 2
1. Construct the instrumentation amplifier with band-pass filter. Apply the following FG
conditions.
• v1: F.G. , v2: GND
• Sine: f=1Hz, vpp=10mV, or (Vamplitude =5mV)
• Mod: AM, internal, f=60Hz, sine, depth=100%
step 2 step 3
step 4
step 6
Experiment 3: waveform
reference
可調整至小於 2mv
( 以最後輸出波形不截波為原
則)
Modified circuit (for
measurement)
Filter out
waveform and FFT :
•Import ECG waveform to test ECG signal
• (LFH by AD2)-optional
1. Power Source: ± 5V (for AD2)
2. U4 Op-amp’s V+ configuration for 2V
When add to human body, please adjust
R7 to get higher voltage gain (10k -> 2k)
3. R9 = 100k
USE HUMAN BODY AS INPUT SIGNAL
Prerequisites: Assemble
Electrodes
•Please refer to these two documents:
• connector_part1_ 杜邦接頭壓接示意圖 .pdf
• connector_part2_ 心電接頭壓接示意圖 .pdf
Experiment 4
•Take Electrodes as signal source.
•Set every “Channel Coupling” to “DC
Coupling”
•Record the waveform and relevant
parameters. (e.g. frequency, peak-peak
voltage, FFT plot, etc.)
1. Power Source: ± 5V (for AD2)
2. U4 Op-amp’s V+ configuration for 2V
3. When add to human body, please
adjust R7 to get higher voltage gain
(10k -> 2k)
4. R9 = 100k
Experiment 5 ( 若沒量到 ECG 信號 , 可用 Exp3A 的 AD2’s wavegen ECG
waveform: fg_cardiac.wav 替代人體信號 )
LM335
Temperature input
Sensor
• Functions:
• Use marquee to display temperature value which contains 7 digits. Measure temperature continuously.
• Format: XX.X°C[space]
• example
• Use marquee to display distance value which contains 6 digits. Measure distance once when button pushed.
• Format: XXXcm[space]
• example
• Use button to change two different functions.
• You can decide the initial function of your system.
• Example
一個 74HC595 連接多個七段顯示器
https://swf.com.tw/?p=1307
Eight Stage Shift Register
74HC595
https://jimirobot.tw/arduino-tutorial-7segment-74hc595-204/
Two 4-bit Shift Registers
CD4015B
https://www.instructables.com/Arduino-With-CD4015B-Shift-Register/
What is a 4-Stage Shift Register?
A shift register is a simple memory circuit that can store a number of
bits. You can build one using a series of D flip-flops. Each flip-flop can
store one bit. A 4-bit shift register like the ones in the CD4015 chip
has 4 flip-flops and is often called a 4-stage shift register:
https://www.build-electronic-circuits.com/4000-series-integrated-circuits/ic-4015/
Arduino Project Specification (Use Shift
Register 74HC595 or CD4015B for another
demo with bonus)
• Components:
• Arduino UNO
• Ultrasonic sensor HC-SR04
• Temperature sensor LM335
• 2 digit 7 segment displays and resistors
• 74HC595 or CD4015B
• Functions:
• (Arduino UNO connect 2 digit 7 segment displays by Shift Register 74HC595 or CD4015B) , use marquee to display temperature value which
contains 7 digits. Measure temperature continuously.
• Format: XX.X°C[space]
• example
• (Arduino UNO connect 2 digit 7 segment displays by Shift Register 74HC595 or CD4015B) use marquee to display distance value which
contains 6 digits. Measure distance once when button pushed.
• Format: XXXcm[space]
• example
• Use button to change two different functions.
• You can decide the initial function of your system.
• Example
Special font
cm
°C
[space]
Return device and module list ( 尚須
歸還器材 )
1. Ultrasonic distance sensor, HC-SR04
2. Analog Discovery 2 ( 若有借用 )
3. MyDAQ ( 若有借用 )
4. MCP4251 Digital Potentiometer ( 若有借用 )
Appendix: ICL 7660 Voltage
converter
Vcc
50 nF
Vcc
MCP4251 𝑅 𝐴𝐵
𝑅WB = 8
𝑁 + 𝑅𝑊
2
Example:
• A value of 0 is no resistance.
• A value of 128 is
approximately 5k ohms.
• A value of 255 is
approximately 10k ohm
resistance.
Appendix: Appendix: MCP4251
Digital Potentiometer
Pin Assignments
Arduino MCP4251
5V Pin14 = VDD
GND Pin4 = VSS
13 Pin2 = SCK
12 Pin13 = SDO
11 Pin3 = SDI
10 Pin1 = CS
Appendix: Appendix: MCP4251
Digital Potentiometer