CSE 466 Lab 8-- Final Project:
Building the Electrocardiograph
Introduction
In this lab you'll use the amplifier circuit you built in Lab 7. Then you will interface it to the FriendlyArm for use in next week's lab.
Objectives
In this lab, you will learn about:
- principles of bioelectric sensing
- use of an instrumentation amplifier to amplify heart signals
- standard ECG signal waveforms
Suggested Reading and Resources
Material on detection algorithms
First Week Lab:
I. Display a heart trace on the FriendlyArm LCD
Connect your circuit from Lab 7 to your FriendlyArm board via the GPIO connector and cable, labeled conn6.
You should be using VDD33V (pin 2)for power, GND (pin 3) for return, and AIN1 (pin 6) as input to the FriendlyArm's on-board 10-bit ADC.
- Write code to convert your input signal and display it on the LCD.
- Suggested sample rate is 250 Hz., although you may adjust this to serve your purposes.
- You should buffer the data, to save 30 seconds of cardio trace data.
- We suggest that the display should write from left to right, and wrap around erasing the old trace as it writes.
- You might want to look ahead at the next sections, so that you can accomodate display and control requirements.
II. Add calibrated grid to your display, and some controls
You should add a grid to your display, with the following characteristics (your choice of color):
- Add a control for START and STOP, as well implementing auto-stop after 30 seconds.
- You should not record or display data until the incoming signal has stabilized.
- You may wish to display a message indicating that the unit is stabilizing.
Deliverables
- Turn in all required documents via an e-mail attachment to cse466-tas@cs. For all files turned in, the comments at the top of the file should contain:
- Your full name, login and student number
- The lab number and the part of the lab (e.g. "Lab8, Part1").
- Demonstrate your running codeon the FriendlyArm for the T.A.You can do this during the first 1/2 hour of the final lab
You should create a .zip or .tar archive of all of the files you are turning in.
Final Week Lab: (preliminary... watch for additions)
III. Add some digital processing to clean up your signal
Add some digital filtering to your code to smooth and clean your signal. See the lecture notes on Digital Filtering.
A lowpass butterworth 4-pole IIR filter, an FIR lowpass filter or a moving-average filter are possible choices.
IV. Add Heart Rate display to your FriendlyArm software
Implement a QRS detection algorithm, derive the Heart Rate and and display it. In your code comments, include a brief explanation of how your algorithm works. See the references and lecture slides on QRS detection. Optionally, add a measure of variance (like Std Deviation).
Deliverables