With prosthetics, EEG, and all the other builds focused on the body and medicine for this year’s Hackaday Prize, it might be a good idea to take a look at what it takes to measure the tiny electrical signals that come from the human body. Measuring brain waves or heartbeats indoors is hard; AC power frequencies easily couple to the high impedance inputs for these measurements, and the signals themselves are very, very weak. For his entry to The Hackaday Prize, [Paul Stoffregen] is building the tools to make EEG, ECG, and EMG measurements easy with cheap tools.
If the name [Stoffregen] sounds familiar, it’s because he’s the guy behind the Teensy family of microcontroller boards and several dozen extremely popular libraries for everything from displays to real time clocks. The biopotential signal library continues in [Paul]’s tradition of building very cool stuff with just code.
The hardware used in this project is TI’s ADS1294, a 24-bit ADC with either 4 or 8 channels. This chip is marketed as a medical analog front end with a little bit of ECG thrown in for good measure. [Paul] is only using the ADS1294 initially; more analog chips can be added later. It’s a great project in its own right, and when you include the potential applications of this library – everything from prosthetics to body sensors – it makes for an awesome Hackaday Prize entry.
[Eric] tipped us about the OpenHarwareExG project which goal is to build a device that allows the creation of electrophysiological signal processing applications. By the latter they mean electrocardiography (ECG, activity of the heart), electroencephalography (EEG, signals on the scalp), electromyography (EMG, skeletal muscles activity), electronystagmography and electrooculography (ENG & EOG, eye movements) monitoring projects. As you can guess these signals are particularly hard to measure due to their small amplitude and therefore susceptibility to electrical noise.
The ADS1299 8-channel 24-bit analog front end used in this platform is actually electrically isolated from the rest of the circuit so the USB connection wouldn’t perturb measurements. An Arduino-compatible ATSAM3X microcontroller is used and all the board is “DIY compatible” as all parts can be sourced in small quantities and soldered by hand. Even the case is open source, being laser cut from acrylic.
Head to the project’s website to download all the source files and see a quick video of the system in action.
Interested in measuring the body’s potential? Check out an ECG that’s nice enough to let you know you have died, or this Android based wireless setup.
The title of [Nuclearrambo’s] post says it all, “Android based wireless ECG monitoring (Temperature sensor and glucometer included).” Wow! What a project!
The project is built around the HC-06 bluetooth module and the Stellaris LaunchPad from TI, an inexpensive ARM developer kit. Building an ECG is a great way to learn about instrumentation amplifiers, a type of differential amplifier used for its extremely high common mode rejection ratio (CMRR). Please be sure to keep in mind that there are a myriad of safety issues and regulation concerns for medical device, and there is no doubt that an ECG is considered a medical device. Sadly, [Nuclearrambo’s] post does not include all of the code and design files you need to build the system, which is understandable considering this is a medical device. That being said, he provides a lot of information about building high-quality ECG instrumentation and the web interface.
It would be great if [Nuclearrambo] could post the Android application code and Stellaris LaunchPad code. Even with these omissions, this post is still worth reading. Designing medical devices requires a lot of know-how, but who knows, maybe your next project can save your life!
After a failed crowdfunding campaign, MobilECG has gone open source. MobilECG is a medical grade 12 lead electrocardiograph. A 12 lead system is quite a bit more complex than some of the ECG systems we have featured in the past. [Péter], the founder and designer of the device attempted to fund it through an Indiegogo campaign. While MobilECG is relatively cheap, medical certifications are not. The campaign didn’t reach its goal of $230,000 USD. [Péter] tried again with a grass-roots donation round at his website. That round also fell short of [Péter’s] goal to keep working on the project. Rather than let his hard work go to waste, [Péter] has made the decision to release his hardware and software to the community. The hardware is licensed under CERN OHL v1.2. The software is released under the humorously named WTFPL.
While we’re not ECG experts, the basic hardware design appears to be sound. MobileECG is based around the Texas Instruments ADS1278 octal analog to digital converter. Two AVR microcontrollers are used, an ATTiny24, and an ATUC64. The analog design incorporates such niceties as lead off detection and defibrillator protection. It should be noted that there are some known bugs in the design, [Péter] mentions he can be contacted with questions. The software seems to be in an early state, and would require quite a bit of work to get it to a final design. While we do wish [Péter] had better luck with his campaign, we’re always glad to see designs released into the open source community.
Continue reading “MobilECG goes open source”
Just when you thought you’d seen an Arduino do everything, [birdyberth] built an Arduino powered Electrocardiogram (ECG or EKG). Electrocardiography is a non invasive method of studying the heart. For many of us that means a 10 minute test during our yearly physical exam. Medical grade ECGs can use up to 10 electrodes. To keep things simple [birdyberth] went the route of a few circuits we’ve seen before, and reduced it to two electrodes and a ground reference. [birdyberth] makes note that the circuit is only safe if battery power is used.
The “heart” of any ECG is an instrumentation amplifier. Instrumentation amplifiers can be thought of as super differential amplifiers. They have buffered inputs, low DC offset, low drift, low noise, high open loop gain, and high impedance among other favorable characteristics. The downside is cost. A typical op amp might cost 0.50 USD in single piece quantities. Instrumentation amplifiers, like [birdyberth’s] INA128 can cost $8.30 or (much) more each. The extra cost is understandable when one thinks about the signals being measured. The ECG is “picking up” the heart’s electrical signals from the outside on skin. On commonly used ECG graph paper, a 1mm square translates to about .1 mV. High gain and clean signals are really needed to get any meaningful data here.
Electrodes are another important part of an ECG. Medical grade ECG units typically use disposable adhesive electrodes that make a strong electrical connection to the skin, and hurt like heck when they’re ripped off by the nurse. [birdyberth] was able to make electrodes using nothing more than tin foil and paper clips. We think the real trick is in the shower gel he used to make an electrical connection to his skin. While messy, the gel provides a low resistance path for the tiny currents to flow.
The actual processing in [birdyberth’s] circuit is easy to follow. The signal from the instrumentation amplifier is sent through a low pass filter, through a 741 op amp, and then on to the Arduino. The Arduino uses a 16×2 LCD to display heart rate in beats per minute, along with a friendly message informing you if you are alive or dead. The circuit even provides audible feedback for heart beats, and the classic “flatline tone” when the users either disconnects the electrodes or expires. [birdyberth] has also plugged in his pocket oscilloscope just after the low pass filter. As his video shows, the familiar ECG waveform is clearly visible. We’d love to see a more complex version of this hack combined with [Addie’s] heart simulator, so we could know exactly which heart malady is killing us in real time!
Continue reading “Arduino Powered ECG Informs Users of Their Death”
It’s difficult to image a more bare-bones approach to building an ECG. [Raul] used an Arduino nano to collect samples and push them to a computer for graphing.
An Electrocardiogram measures electrical activity around your heart. The white circles above are the sensors which he picked up in a box of fifty for 11 Euros (under $15). Stick them on your skin in just the right places and they’ll report back on what your heart is doing.
He used a AD8221 to amplify the signals. He mentions that this is an ins-amp, not an op-amp. We didn’t find a concise reference explaining what that is. It might be a good topic for the comments section. The signal from that chip feeds into an LM324 op-amp before being dumped into the Arduino.
Simplicity comes at a price. This measures very small electrical impulses and has very little in the way of shielding and filtering. Because of this you may need to do a rain dance, say a prayer, burn a candle, and stick needles into a doll to get a reliable signal on the other end.
Here’s another version that doesn’t require special sensors.
[James] has been building a heart rate monitor using a very cool TI chip. He needed a way to test his device, and commercial ECG simulators, like all biotech devices, are absurdly expensive. [James] decided to build his own heart rate simulator, and in the process made a great tool and one of the most well documented projects we’ve ever seen.
Of course, if you’re building an ECG simulator, you’re going to need a good sample of a heart’s electrical pattern. To get this sample, [James] found an old army manual with a diagram of an ideal ECG pattern. [James] took this PDF manual, screen capped the diagram, and used a Python script to generate an array in C the Arduino could repeat over and over.
The rest of the build consisted of a D/A converter, a pot to change the heart rate, a very nice seven-segment display, and a few banana jacks to connect to [James]’ heart monitor. Everything is up in a git, including an amazingly well documented (87 pages!) tutorial for building your own Arduino heart simulator.