實驗一報告 報告繳交期限 : 10 月 9 日 ( 二 )11:00 Report content ( 報告內容 ) 1. Complete three experiment reports ( 三份實驗紀錄表格檔案 ) 2. Complete additional questions 請合併成一個 PDF 檔案寄到助教的信箱 (belab.ntu@gmail.com), 主旨標明組別及實驗序
行事曆
期中報告 期中報告 (Group) 題目 : 生醫工程相關皆可, 例如 : 生理電信號原理 醫學影像等 在決定題目之前請先跟助教討論, 確定報告的題目範圍是否會太廣而無法負荷 要求 : 每組報告時間約 15 分鐘, 提問 5 分鐘 ( 有提問者另外加分 ) 註 : 期中報告結束的一個禮拜一定要給我們發票 11/06 截止
實驗二 : 生理電信號量測電路 設計與實現
Introduction 根據實驗一選定的生理電信號繼續對這種信號作量測電路的設計 在操作實驗一的時候你發現什麼? 應該很順利都可以量到信號 是否跟文獻做過比較? 自行設計電路 不同的生理電信號其設計方式也會不同 利用 NI ELVIS / Arduino + Android APP Invertor 實現
Experiment Overview Design circuit(s) for bio-signal detection 1. ECG 2. EMG 3. EEG PART I Digitize the detected waveform (ADC) Transmit to the self-designed APP via bluetooth APP: Waveform display oscilloscope PART II
PART I: 量測電路 Circuit Design for Bio-Signal Detection
PARTI: Introduction Characteristics of ECG, EMG, and EEG waveform Based on the findings from experiment 1 and published reports/journals Examples: amplitude, center frequency and bandwidth Design your own detection circuit(s) Use NI ELVIS II to test the effectiveness of your circuit Energy efficient circuit
Simplified Layout of Detection Circuit Signal Inputs (3 Leads) ~µv ~mv Pre-Amplification Filter (LPF / HPF / NOTCH / BPF) Display Post-Amplification ADC Circuitry Voltage Level Shifter Signal Output (0V 5V)
Noise Figure 如何達成最高的增益 最低的雜訊指數? Noise Figure
Pre Amplifier Lead II 三點 ECG( 正極 負極 接地 ) OP 放大器? 雙極訊號轉為單極訊號 差動放大器
Buffer 使前一級電路不受負載影響 R=
儀表放大器 差動放大器 儀表放大器 (INA128) 在正負輸入端都加上 unit gain buffer 非常低直流偏移 低漂移 低雜訊 非常高的開迴路增益 非常大的共模拒斥比 高輸入阻抗
市電 市電, 又稱壁上電源 交流電 輸電網, 為城市裡主要提供市民使用的電源 一般家庭用電為 AC 100~125V 60Hz 正弦波 該如何解決 60Hz 的訊號影響? Notch filter
訊號頻率範圍 從頻譜以及文獻看訊號主要的頻帶在哪 設計適當的濾波器 高通濾波器 (DC offset 低頻雜訊) 低通濾波器 ( 高頻雜訊 ) Notch filter( 市電 )
Low Pass Filter V out V in R V out 1 R + sc V out V in = f c = 1 2πRC = V out 1 sc = V in R 1 1 1 + src = RC s + 1 RC C = 0.33uF R = 10k Cut off frequency = 48Hz
Low Pass Filter 頻率響應 Gain = 1 RC s + 1 RC 1 2πRC 參考電路 ( 二階低通濾波器 ) Sallen-Key Lowpass filter
High Pass Filter V out V in = V out 1 R sc 1 V out R + sc = scv in V out = src V in 1 + src = s s + 1 RC f c = 1 2πRC
High Pass Filter 頻率響應 Gain = s s + 1 RC 1 2πRC 參考電路 ( 二階低通濾波器 ) Sallen-Key highpass filter
Notch Filter Twin-T notch Center reject frequency https://www.changpuak.ch/electronics/active_notch_filt er.php
Notch Filter Wien Bridge Notch Filter f c = 1 2πRC
Post Amplifier 基本 OP 放大器 non-inverting amplifier Gain=1+R2/R1
Level Shifter Arduino 接收電壓範圍 0~5V 不准送負的電壓進去 Arduino V out = V + 1 + R2 R1 V + = R3V2 R3 + R4 + R4V1 R3 + R4 透過電阻與電源的分壓讓心電圖的訊號平移至 0V 以上
Analog to Digital Converter 如何將 0~5V 電壓轉換為數位訊號? 8bits ADC 2^8=256 0~255 例如輸入電壓 3V 255/5*3=153(DEC)=10011001(BIN)
Digital Signal ADC (Analog-Digital-Convertor) Nyquist sampling frequency Quantization error Offset error (LSB) Digital filter: MATLAB Built-in functions: butter / besself / cheby1 / maxflat Self-design: designfilt
Simplified Layout of Detection Circuit Pre-Amplification Filter (LPF / HPF / NOTCH / BPF) Post-Amplification Circuitry Voltage Level Shifter
This detection circuit could be the platform for building your term project
Goals Accuracy MOST IMPORTANT! Regardless of the complexity of the detection circuit Compare the detected signal with the results from exp.1 ECG: PR interval / QRS interval / ST intervals etc. EMG: Tonus measurement etc. 與實驗二結果比較 量到的電信號波形穩定與否 Noise 的情況又是如何?SNR? 商用儀器 v.s. 自行設計之電路
Goals 1. ECG EMG 必須透過電路設計出適當的濾波器 2. EEG 可以藉由電腦設計出適當的濾波器 α: 8 13Hz β: 13 40Hz θ: 4~7Hz δ: 0.5~4Hz
PART II: 資料擷取與 APP 設計 DAQ and APP for Bio-Signal Detection
Simplified Layout of Detection Circuit Signal Inputs (3 Leads) ~µv ~mv Pre-Amplification Filter (LPF / HPF / NOTCH / BPF) Display Post-Amplification ADC Circuitry Voltage Level Shifter Signal Output (0V 5V)
Analog Input 類比輸入 Analog Outputs 類比輸出 Func. Generator 函數產生器 Manual Control 手動控制 Var. Power Supply 可變電源 Fix Power Supply & Ground 固定電源 & 接地
NI ELVISmx Instrument Launcher 可變電源供應器 - 可變電源供應器 +
NI ELVISmx Instrument Launcher 啟動 頻率 波形 振幅 Offset
NI ELVISmx Instrument Launcher 顯示 頻道 歸零 刻度 Time Base 啟動 固定波形 紀錄
NI ELVISmx Instrument Launcher
PARTI: Introduction Analog signal Digital signal Digital filter Decrease the chance of signal distortion System integration Arduino Uno v3 (or any mcu eval. board) User interface & display recorded signal Bluetooth (BT) module HC-05 App Inventor 2 Android APP
Arduino Uno Microcontroller evaluation board ATmega328 microcontroller Clock: 16 MHz 14 Digital I/O 6 Analog inputs 10 bits ADC Software serial function https://www.arduino.cc/en/main/arduinoboarduno
Arduino IDE 1. Import Library 2. Define Variables/Constants 1. Setup Pins 2. Initialize Functions Do until power is turned off! 1. Read ADC output 2. Send ADC result via BT module
Arduino IDE Tool Please select the correct board and port
HC-05 Bluetooth Module Enter AT Mode 1. KEY: HIGH (or) 2. Push Button Down Before power up Bluetooth Module 1. AT 2. AT+NAME? 3. AT+PSWD? 4. AT+UART = Baud Rate, 停止位元, 同位 (parity) 位元
App Inventor 2 You need to have a Google Account URL: ai2.appinventor.mit.edu http://ai2.appinventor.mit.edu/
App Inventor 2 http://ai2.appinventor.mit.edu/
App Inventor 2 http://ai2.appinventor.mit.edu/
App Inventor 2 http://ai2.appinventor.mit.edu/
Important! Arduino CANNOT sample negative voltages. Voltage range: Vref_- (i.e., GND) and Vref_+ (i.e., +5V, +3.3V or external voltage) What is your sampling frequency, and how is this defined in Arduino s code. Syntax: references Arduino http://arduino.cc/en/reference/homepage App Inventor 2 http://appinventor.mit.edu/explore/library.html Please download: Arduino software: http://www.arduino.cc/en/main/software
Demo Date: 23 October 2018 (12:20 14:00) Circuit: ECG(30%), EMG(30%) and EEG (20%) Display your recorded waveform on oscilloscope (ELVIS II) Display your recorded waveform on your designed APP (Arduino + App, 20%) Grading Accuracy of the bio-signal recorded App v.s. Oscilloscope
Report Date: 30 October 2018, 11am Contents Normal report format: Introduction, Method, Results, Discussions, Conclusions Design/Specification: circuits, Arduino program, App Additional questions! ( 詳見生醫工程網頁 )