0% found this document useful (0 votes)
19 views42 pages

FINAL - Electrocardiography (ECG) - 1122

elc_project

Uploaded by

k0966493450.ee11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views42 pages

FINAL - Electrocardiography (ECG) - 1122

elc_project

Uploaded by

k0966493450.ee11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 42

EELab(2) Final

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

• Week 15: Final project-ECG lab - Part 2


• Arduino Project
• Lab10-Instrment Amplifier simulation lab (LFH week)
• Return device and modules
• Week 16: Final Exam
• Week 17, 18
• Final project-ECG lab (LFH week)
• Class suspend
ECG project
ECG VIEWER
ECG Project Specification
• An electrocardiography (ECG) system.

• Monitor object: function generator, human body.

• Implement every small step gradually.

• You may not fulfill full project requirements.

• 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.

• You can implement bonus design on breadborad without soldering.

• 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%

2. Set every “Channel Coupling” to “DC Coupling”


3. Record the waveform and relevant parameters.
◦ e.g. frequency, peak-peak voltage, etc.

4. Record the result of FFT. (Outputs of U1 and U4)


Experiment 3
1. Construct the instrumentation amplifier with band-pass filter. Apply the following FG
conditions.
• USE “RIGOL” function generator. (Lower limit = 2m Vpp)
• v1: F.G. , v2: GND
• Arb: 1Hz, Vpp=10mV, Wform=Cardiac (Select Wform >> Buildin >> Bioelect)
• Mod: AM, internal, f=60Hz, sine, depth=100%

2. Set every “Channel Coupling” to “DC Coupling”


3. Record the waveform and relevant parameters.
◦ e.g. period, peak-peak voltage, etc.

4. Record the result of FFT. (Outputs of U1 and U4)


Experiment 3
step 1 step5: use knob to select “Cardiac”

step 2 step 3

step 4

step 6
Experiment 3: waveform
reference

Before mod pushed After mod pushed


Experiment 3: FFT plot reference
Experiment 3A (optional)
Use AD2 to generate test ECG signal and input test signal to instrumentation amplifier.
Requirements:
◦ ECG waveform: fg_cardiac.wav
◦ waveform replay: AD2’s wavegen
◦ modified instrumentation amplifier: increase output’s DC level to 2V
Import ECG waveform (1/5)
Import ECG waveform (2/5)
Import ECG waveform (3/5)
Import ECG waveform (4/5)
Import ECG waveform (5/5)

可調整至小於 2mv
( 以最後輸出波形不截波為原
則)
Modified circuit (for
measurement)

Input test ECG signal Instrument Amplifier out


waveform and FFT : waveform and FFT :

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 替代人體信號 )

• Take Electrodes as signal source or Keep VDC ≈2~3V


AD2’s wavegen ECG waveform:
fg_cardiac.wav.
• Connect instrumentation amplifier,
Arduino and computer altogether. Arduino
Record the waveform. A0
◦ Arduino A0 <-> out of the circuit
◦ Arduino GND <-> GND of the circuit
GND

1. Power Source: ± 5V (for AD2)


2. U4 Op-amp’s V+ configuration for
2V (for Arduino ADC)
3. When add to human body, please
adjust R7 to get higher voltage
gain (10k -> 2k)
4. R9 = 100k
Experiment 5
• Power supply’s GND and Arduino’s GND should be connected together.

• PLUG YOUR ADAPTER TO YOUR Laptop!

1. Full installation of DAQPlyaer_Package.exe in Lab08 (2020 Verison). If you’ve removed the


program, please re-install again.
2. Upload “ecg_viewer.ino” in Lab08 to Arduino before you start to read the signal.
3. Execute “ECG_Viewer.exe” in Lab08 to plot waveform and calculate the heart rate.
4. In default settings, record the ECG waveform plot and calculate the heart rate in bpm. (beat
per minute)
5. Change the order of the digital low-pass filter from 2 to 10, record the ECG waveform,
spectrum, and compare the result with step 4.
Experiment 5A [Use Arduino and ICL7660 to replace AD2 power supply]
(optional, 可用已有 ICL7660 練習應用 )
Use Arduino +5V and use ICL7660 convert +5V to -5V, to replace AD2 power supply, repeat ECG
measurement with 5V and -5V waveform
• Take Electrodes as signal source or AD2’s Keep VDC ≈2~3V
wavegen ECG waveform: fg_cardiac.wav.
• Connect instrumentation amplifier , Arduino
and computer altogether. Record the
waveform.
◦ Arduino A0 <-> out of the circuit
Arduino
◦ Arduino GND <-> GND of the circuit
A0
• (LFH by AD2) GND
1. Power Source: + 5V (by Arduino)
Power Source: - 5V (by ICL7660)
(ICL7660 Vcc=+5V by Arduino)

2. U4 Op-amp’s V+ configuration for 2V


(for Arduino ADC)
3. When add to human body, please
adjust R7 to get higher voltage gain (10k
-> 2k)
4. R9 = 100k
Experiment 5B [Use Arduino and ICL7660 to replace AD2 power, supply, with MCP4251]
(optional, 可用已借 MCP4251 練習應用 )
Use Arduino +5V and use ICL7660 convert +5V to -5V, to replace AD2 power supply,
• Take Electrodes as signal source and AD2’s Keep VDC ≈2~3V
wavegen ECG waveform: fg_cardiac.wav.
• Connect instrumentation amplifier , MCP4251
as Digital Potentiometer to replace R7.
Record the waveform.
◦ MCP4251 P0B <-> V- of the U2
Arduino
◦ MCP4251 P0W <-> V- of the U3
A0
• (LFH by AD2) GND
1. Power Source: + 5V (by Arduino)
Power Source: - 5V (by ICL7660)
(ICL7660 Vcc=+5V by Arduino)

2. U4 Op-amp’s V+ configuration for 2V (for Optional for


B
Arduino ADC) two Arduino
3. When measure small signal, we can
W application
adjust R7 to Digital Control higher
voltage gain (10k -> 2k) by MCP4251, to
4. R9 = 100k
Arduino project
(Experiment6)
MULTIFUNCTION DISPL AY
Architecture
Push
button
input

LM335
Temperature input
Sensor

HC-SR04P Ultrasonic input


Module Distance
Measuring
Sonar Sensor
output
2-digit
Seven
Segment
Display
Arduino Project Specification
• Components:
• Arduino UNO
• Ultrasonic sensor HC-SR04
• Temperature sensor LM335
• 2 digit 7 segment displays and resistors

• 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

•The output of 7660 IC is range 1.5 to 10


Volt. It can not provide -15V to the circuit.
•It may be broken if input is large than the + 7660 +
design range. 10 uF
10 uF - -
Vout,7660 = -Vcc
Appendix: MCP4251 Digital
Potentiometer
•MCP4251 digital potentiometer offers 8-bit resistor networks using SPI interface.
RWB is programable for
Device Block Diagram
this lab.

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

You might also like