My son and I spent some time today debugging his data logger. I also convinced him to add some documentation, though not nearly as much as I think is needed. This version is just a text command interface, with no GUI—the PyGUI interface he was building seemed to slow things down a lot, and is not yet ready for use.
The data logger works fine as long as the sampling interval is at least 3msec. With 2msec sampling, I think that serial communications (over a 115200 baud USB serial connection) is getting overwhelmed. The Arduino seems to be capable of sending out data ok at 2msec/sample, though 1msec/sample causes it to miss some timer interrupts.
If the Python program can’t empty the serial port fast enough, I think that there operating system problems. My MacBook Pro sometimes gets wedged with long runs at higher sampling rates—I’ve had to reboot it a couple of times today. If the problem is with the MacBook Pro, it may be possible to run with slightly shorter sampling intervals on faster hosts, before hitting the limits of the Arduino.
I did manage to get a nice recording for about 8.5 seconds at 3msec sampling:
I think that the signals were clearer today, because I was using a ground electrode on my chest, rather than on my elbow, reducing the common-mode noise a little. The 3msec resolution allows zooming in to get a pretty clear view of the structure of the pulses:
Although it took my son and me a little debugging to get everything working today, overall I’m quite pleased with the data logger code he wrote. He still has more documentation to add (both in-code and external), and there are some more features that could be added, but it is basically usable as is.
Incidentally, I found out today from Cardiology Explained by E.A. Ashley and J. Niebauer, that
ECG terminology has two meanings for the word “lead”:
- the cable used to connect an electrode to the ECG recorder
- the electrical view of the heart obtained from any one combination of electrodes
So it is not surprising that I was confused by the usage—I was only familiar with the first usage, which corresponds to normal engineering terminology.
[…] EKG recording working […]
Pingback by Order and topics for labs « Gas station without pumps — 2012 August 16 @ 23:39 |
[…] EKG recording working […]
Pingback by EKG blinky boards work « Gas station without pumps — 2012 August 18 @ 11:51 |