Of all the electrical signals generated by the human body, those coming from the heart are probably the most familiar to the average person. And because it’s also quite simple to implement the required sensors, it makes sense that electrocardiogram (ECG) machines are a popular choice among introductory medical electronics projects. [Dániel Buga], for instance, designed a compact ECG system the size of a credit card, cleverly dubbed Card/IO, that clearly demonstrates how to implement a single-lead ECG.
Although obviously not a medical-grade instrument, it still contains all the basic components that make up a proper biosignal sensing system. First, there are the sensing pads, which sense the voltage difference between the user’s two thumbs and simultaneously cancel their common-mode voltage with a technique called Right Leg Driving (RLD). The differential signal then goes through a low-pass filter to remove high-frequency noise, after which it enters an ADS1291 ECG analog front-end chip.
The ADS1291 contains a delta-sigma analog-to-digital converter as well as an SPI bus to communicate with the main processor. [Dániel] chose an ESP32-S3, programmed in Rust, to interface with the SPI bus and drive a 1″ OLED display that shows the digitized ECG signal. It also runs the user interface, which is operated using the ECG sensing pads: if you touch them for less than five seconds, the device goes into menu mode and the two pads become buttons to scroll through the different options.
All source code, as well as KiCad files for the board, can be found on the project’s GitHub page. If you’re just getting started in the biosensing field, you might also want check out this slightly more advanced project that includes lots of relevant safety information.
Nice project! Guess I have the excuse I need to upgrade to KiCAD 7 – gotta see how the solder-on-daughterboard is done.
The Card10 was the badge of the CCCamp19, which included also an ECG.
https://card10.badge.events.ccc.de/
Fun stuff, been a while but I helped make a 12 lead ECG a few years ago. It’s a really fun mixed signal project. https://voltagedivide.com/2017/10/14/psoc-design-and-implementation-of-a-12-lead-portable-ecg/
Nice, thank you for sharing.
I can’t properly read an ECG, but I do know that if your ECG would look like the one in the video, you’re in trouble. So while from an electronics standpoint this is quite impressive, medically it’s just a toy suitable to detect a heartbeat.
Well, I guess it says so on the card.
It’s pretty clearly a normal sinus rhythm. I was a cardiovascular ICU nurse for 10 years, trauma before that. p to q looks okay, st segment is on the baseline. This could be helpful in a desperate situation.
Exactly. I was going to chime in with a lot less experience than you but you said it 1st and the way I would have. Now of the rhythm line had gone straight across I guess we’d all be a lot more concerned. I would also wonder if big medical tech had gotten to Dániel. I also wondered if this video was posted as part of the Deadman’s switch or something.
It’s not so bad. But baseline is wavering making it look awful.
These devices (like Kardia) usually only get approval for checking rhythm because the filtering makes them look so awful.
The right leg drive circuitry would fix that and I don’t understand how it could have it without a neutral connection somewhere (right leg probably). Either way it doesn’t work so maybe the IC has the pin but it’s not implemented here. In a “real” ECG it’s literally on the right leg on EEGs it isn’t always.
I would love to know what OP thought that an ECG would normally look like though. I mean luckily most people haven’t seen many, so now that I think about it, what do they imagine they would normally look like?
Uhmm…single lead? You need two connections, it is double lead then?
This is Lead I, of the original 3 Leads ECG.
The particular tracings are called leads in ECG terminology.
Once you have 3 electrodes connected you can get the 6 standard Leads. I, II, III, aVL, aVF, aVR which use a virtual/artificial opposing electrode generated from the real electrodes.
Typically there will then be 6 “unipolar” chest leads that draw a quarter circle across the front of the chest crossing the heart and into the armpit. These use artificial opposing electrodes.
Giving the standard 12 Lead ECG from 9 or 10( for right leg drive) electrodes.
I quite like the concept for the menu system.
Possibly quite useful in some circumstances.
In recent EEG/ECG tests I’ve had the unfortunate need to have done, they’ve left the sensors on me for about 10 seconds. How the heck are they supposed to catch anything like an intermittent problem without monitoring for a decent length of time?
They don’t. If it’s an intermittent problem, they order you a compact battery powered monitor that stays stuck on your chest for a whole day, then you mail it back to the vendor to upload the data. It’s only a one lead setup.
I myself was going to wear one, but by the time it arrived in the mail I had developed third-degree AV block, so it seemed fairly pointless.
Right after I got a pacemaker, I used a get-well-soon Sparkfun gift card to put together my own ECG SD card logger. I had an issue where my heart rate was spontaneously jumping between 50BPM and 100BPM every minute or two, and I managed to capture it. When I sent it to my cardiologist, he invited me to come in ASAP to get my parameters tweaked.
These days my AV nerves are mostly working correctly on their own again, but they aren’t perfect. Whenever a new nurse listens to my heart with a stethoscope, I need to reassure them that it’s fine and that I don’t need to rush to the emergency department…
This is HaD! – hacking your own heart.
Once again people are calling an EKG ( electro-kardiogram ) an ECG ( echo-cardiogram ), two very different things. An EKG is the measure of the heart’s electrical signals. An ECG is an ultrasonic examination of the heart.
That’s not true, though. EKG is the German spelling, ECG the English spelling. The widely accepted abbreviation for an echo-cardiogram is simply “echo”. If you burst into a doctor’s office and demand an ECG, they’re going to hook wires up to your chest…
I think EKG probably just sounds cooler, so it’s what they say in medical dramas on TV.
EKG was and is the terminology long before the advent of the ECG ( echo – sic ). The world is full of revisionists- vis NMR became MRI as nuclear became a bad word and CAT became CT for those into the whole brevity thing.
Well, since a) the whole world uses these abbreviations (including Germany, we still say EKG, but we call your “ECG” an “echo” as well) and they’re the standard in case reports, meetings, papers etc, and b) just because something once had a different name doesn’t mean it can’t change (the CT doesn’t even have an A in the long form anymore, “computer tomography”), I think it’s pretty pointless to argue with that.
As a software developer, when you get an email asking “hey I saw your program is Mac-only, is a PC version coming out?” Would you reply with “weeeell technically a Mac is a personal computer”? I hope not.
You have EKG before SPK?
A few months ago I ran my computer off my heart beat (https://youtu.be/kUT16_h7xBE?si=lKJLuq3SWeVd4J1N) which some of you may have seen here on HaD. It worked, but, I also struggled with some stability issues with the signal that seemed related to motion and sweat. I wonder how this would compare… Think I may have to give it a try! Cool project Dániel!
How different is this to a Kardia Mobile 1 or 6 lead EKG?
I have one and it’s about 3″ x 1″ and about as thick as 3 or 4 stacked credit cards.
They also make a credit card size version (search kardia card) of the single lead.
The single lead version that you have uses audio modulation for transmitting ecg, other versions use BT.
The kardia is tested and manufactured as medical device, and includes ecg analysis software. This one may be more fun to play with.