Early last week I woke to a sharp pain in my side every time I inhaled, I decided to check WebMD. I should have known better since WebMD had already misdiagnosed me with everything from Ebola to Swine flu but I couldn’t help it. After spending five minutes reading through the many heart problems associated with chest pain I was sure I was done for.
Luckily the part of my brain that holds onto some form of rational thought and logical reasoning pulled my attention away from taking my pulse (110 beats per minute from the stress) and reminded me that there were actual medical professionals that I could talk to. I immediately called my doctor and within an hour he was informing me that it was only a minor rib strain (apparently I jumped back into my yoga routine a little too fast). Before he cleared me though he hooked me up to a device called an electrocardiograph (ECG). The goal of this machine is to amplify, measure, and record the natural electrical potential created by the heart. An ECG can reveal a wealth of information about cardiac regulation, as well insights into pathological conditions. My ECG results allowed my doctor to rule out heart problems.
When I got to work later that day I did some research on how an ECG worked. I found out that each heartbeat produces a similar pattern in the ECG signal, called a PQRST wave. The different parts of this wave represent the hearts electrical activity at different stages of a heartbeat. I decided to try and make my own ECG using my Analog Discovery 2. The problem was that the changes in voltage between each stage that could be detected by electrodes are only a few millivolts. The ECG signal would need to be amplified significantly without gaining the noise from power line interference, electrode contact, and muscle activity. After spending some time learning about the ways medical ECG’s amplify the ECG signal while filtering out the noise, I was able to build a circuit using op-amps from my Analog Parts Kit.(Fritzing drawing of my circuit shown below)
I attached my Analog Discovery 2 to the circuit in the places shown above and opened Digilent WaveForms. After making some adjustments to the sampling rate and range I obtained the signal shown below.
As you can see the signal is still very noisy. My next step is to use the LabVIEW Driver for the Analog Discovery 2 to filter the signal in LabVIEW. I will also be able to use LabVIEW to get the heart rate since it can be calculated as the inverse of the R-to-R interval(the sharp peak is the R component).
Fortunately thanks to my homemade ECG (and you know, a real medical opinion) I have quelled my concerns regarding personal health. Considering I no longer feel I am in immediate danger, I am excited to continue this project, posting updates as I go along. I would like to thank the Analog Discovery 2, the Analog Parts Kit, my actual doctor and LabVIEW for making this peace of mind possible.
Also if you or anyone you know might be suffering from the paranoia that can be induced by online self-diagnosing, please feel free to inform them that right now for a limited time only, the Analog Discovery 2 (and all its scientific and actual research capabilities) is currently being bundled with the BNC Adapter Board, BNC Oscilloscope Probes, and a Digilent Sticker Sheet…all for free. This offer is running until the end of the month so make sure you buy now so that you are prepared and can get started with this incredible product. You never know when you (or your projects) may get sick, and the Analog Discovery 2 can not only determine your heart-rate, it can also debug your projects.
Thank you for reading, and feel free to comment with any questions you may have.