close-circle
Close
0%
0%

HeartyPatch: A single-lead ECG-HR patch with ESP32

HeartyPatch is a fully open-source, IoT connected, BLE enabled heart-rate variability & ECG patch with great accuracy

Similar projects worth following
ECG monitors are plenty, so how is this one different? We're glad you asked, read on to find out more. HeartyPatch is a completely open-source wireless single-lead ECG "patch" which can calculate heart-rate, R-R intervals and most importantly, Heart-rate variability (HRV). Connect this data to the web of things through WiFi/Bluetooth, or also connect to an app on your phone, and you've got your very own, smart, cloud-connected HRV monitor.

HRV is the trend at which the heart-rate, or more specifically, the time between two peaks on your ECG, changes. This change in R-R interval, and ultimately the heart-rate can mean a lot of things. For starters, it gives a good indicator of the health of your heart, one step further than just plain old heart-rate. The social implications of such a product would be enormous, think of a device that can predict heart attacks !!!

Once we laid eyes on the MAX30003 single-lead ECG monitoring chip from Maxim, we were excited to make heart-rate variability available at a much lower cost that "Professional" patches. This led to development of the MAX30003 single-lead ECG monitor breakout board from ProtoCentral.

One thing led to another and here we are with HeartyPatch, a single-lead ECG and R-R intervals/heart-rate monitoring patch. ECG "patches" have long been a dream and a real need for cardiac risk assessment as well as for high-accuracy fitness and health monitoring.

Chest-based ECG has always been the standard for measurement of ECG, especially R-R intervals and HRV. Although optical sensors are available for HR measurement, their accuracy is questionable.

HeartyPatch is completely open-source projects with all schematics, layout, firmware and application software that will be made available for download from the links given further down in this page.

Features:

  • Single-lead ECG with two electrodes
  • On-board connectors for standard disposable electrodes (eliminates the risk of using custom pads).
  • On-board human body temperature sensor (touching the skin)
  • On-board 3-axis accelerometer for position assist and fall/movement detection
  • Uses ESP32 WiFi/BLE SoC
    • Use case for BLE: In a fitness application, data is continuously sent to a the user's smartphone and then optionally to a cloud
    • Use case for WiFi: In a home-based monitoring set-up, data is sent to a cloud using WiFi
  • Li-Ion battery and charging system on the board

All hardware, software, firmware and all other material will be made available open-source once we have some stable code and hardware platform.

pc_heartypatch.brd

HeartyPatch Board (EAGLE)

brd - 745.99 kB - 06/21/2017 at 17:08

download-circle
Download

pc_heartypatch.pdf

HeartyPatch schematic

Adobe Portable Document Format - 893.93 kB - 04/08/2017 at 18:26

eye
Preview
download-circle
Download

pc_heartypatch.sch

HeartyPatch Schematic (EAGLE)

sch - 1.72 MB - 04/08/2017 at 18:26

blank
See BOM
download-circle
Download

  • Code update

    Ashwin K Whitchurch06/12/2017 at 10:50 0 comments

    We've updated the latest code for the HeartyPatch on Github (https://github.com/Protocentral/protocentral_heartypatch)

    It's also planned to explore the use of Initial State (https://www.initialstate.com/) for the platform.

  • Check out our new entry

    Ashwin K Whitchurch06/11/2017 at 11:17 0 comments

    Check out our latest project on Hackaday, also for open medical applications:

    https://hackaday.io/project/25380-connected-health-open-source-iot-patient-monitor

  • A new enclosure

    Ashwin K Whitchurch05/25/2017 at 18:22 0 comments

    We now have a new enclosure, thanks to Thileepan (https://hackaday.io/TPN23).

    The new enclosure looks better and feels better. Shown below is the same enclosure, 3D printed on a Makerbot Replicator 2.

    There's also a circular cut-out for the temperature sensor contact. The same buttons used for the electrode connections are reversed and stuck on the temperature sensor using thermally conductive glue, that is also electrically insulating.

    The new enclosure fits snugly with the body and give great electrode contact.

    The Sketchup designs and the STL files will be put up on Thingiverse shortly and link will be posted to this page.

  • BOM is here

    Ashwin K Whitchurch05/25/2017 at 17:39 0 comments

    We have our entire BOM online at FindChips: https://www.findchips.com/org/10/list/32829-pcheartypatchsch, lots of cool features and great place to store BOMs.

  • We splunkified the data: internet of useful things

    Ashwin K Whitchurch05/18/2017 at 07:28 0 comments

    Once we took the HeartyPatch data to Amazon Web Services IoT (https://aws.amazon.com/iot/), we wanted to visualize the data and run some analytics on it to find the heartrate "trend" throughout the monitoring period (could be a day). AWS is a managed IoT platform hosted on the AWS cloud. This makes it easier to send "thing" data to the cloud for storage and processing. The reason for choosing AWS IoT now is mainly because of security and ease-of-use reasons.

    AWS IoT, however, does not store any data (not persistent). It just uses the received data to trigger actions or "rules". Internally, it uses the MQTT (http://mqtt.org/faq) to transfer to and from a thing, in this case the HeartyPatch. MQTT is very light-weight compared to HTTP or HTTPS and still can use X.509 certificates for authentication.

    Enter Splunk; a "big data" platform, or in simple words, it just reads machine-generated data and stores over a long period of time. The reason we chose Splunk is actually from a suggestion from a customer of ours for another project, but we liked it so much that we decided to keep using it.

    We installed Splunk on an AWS EC2 instance and used AWS Lambda (https://aws.amazon.com/lambda) to pick-up the data from AWS IoT and post it to the Splunk instance as a HTTP request. Spunk's internal HTTP Collector modules then receives the HTTP request, classifies the data and stores it. However, all said, Splunk is NOT Open-source or even free for commercial application. It is free to use for individual use, with some restrictions, such as the data transfer limit of 500 MB/day.

    Now, it is possible to do all kinds of stuff with the data. In the screen-shot below, we have taken a small part of the data to analyse the heart-rate trend and calculate variability.


  • And we have lift off...

    Ashwin K Whitchurch05/14/2017 at 18:21 0 comments

    We have now hooked up the HeartyPatch to AWS IoT (https://aws.amazon.com/iot/) and able to send data securely with certificates issued by AWS.

    Next step: integrate this data going to AWS IoT to a persistent data store and possibly some basic data analytics. We're thinking to use Splunk (https://www.splunk.com/). Feel free to let us know your comments below.

  • Our designs are all now public !

    Ashwin K Whitchurch05/08/2017 at 18:01 0 comments

    We have made our Github repository public. However, please do note that there will be constant changes, so don't be surprised if the code you cloned and the current code is totally different.

    https://github.com/Protocentral/protocentral_heartypatch

  • We're almost ready to make the code public

    Ashwin K Whitchurch05/01/2017 at 16:37 0 comments

    We're just finishing up on some final touches to the BLE code and will have the Github repository made public in a couple of days !!!

  • We now have an enclosure

    Ashwin K Whitchurch04/27/2017 at 20:26 0 comments

    One of the main things that we noticed and which is reasonable is that people do not want to stick a circuit board to their chest. So, we set out make a simple enclosure. These have been the results of our efforts so far. These are 3D printed on a Makerbot using PLA. We will come up with a more elegant enclosure in the future. Our goal here was to make the enclosure as thin as possible so as to not obstruct the user's mobility too much.

    Red because it was nice :) .

    We have holes on the back for the two electrode snap connectors.

    The two halves snapped together. It's still quite thin. Shown here is the USB port connector used for battery charging and debugging.

  • HeartyPatch ECG: First tests

    Ashwin K Whitchurch04/27/2017 at 16:26 0 comments

    We just finished our testing with the ECG signal quality and we are happy to say that we got some pretty good signal quality. The below picture shows the heartyPatch being tested with a desktop application. For the sake of testing, we set up a TCP socket-based server on the heartyPatch's ESP32 itself and connected to the server using TCP client running in processing. While this may not be the best way to utilize battery power, it allowed to test for things like motion artifacts in real-time.

    We made a video of the several test steps that we went through and the results of the testing. Check it out below.

    We're quite satisfied with the results at this point, although some level of digital filtering would be required to remove both the remaining baseline wandering and the occasional random noise. Next steps would be (what we're working on currently):

    • Smartphone/Desktop app for BLE connection and data display
    • Transferring the data to AWS (only HR and R-R interval data)

View all 12 project logs

View all instructions

Enjoy this project?

Share

Discussions

robertncstrickland wrote 05/24/2017 at 10:30 point

imagine if we all had this, hooked to our smart phones and a 911 server, so when something bad happens, we know, and so does the EMTs! kinda like auto Life Alert, but for your heart!

  Are you sure? yes | no

jarek319 wrote 05/18/2017 at 19:00 point

For one thing, the schematics and code running on those devices isn't available on those sites ;)

  Are you sure? yes | no

Ashwin K Whitchurch wrote 05/23/2017 at 17:38 point

Yes, I was going to say the same. None of those are open-source, which we believe also means that none of them can be made better with each comment :) Thanks @jarek319 for believing in open source !!

  Are you sure? yes | no

Deep-Thought wrote 05/15/2017 at 10:41 point

This is absolutely the product I need for my mom. She has some kind of heart arythimia, which is impossible to monitor for doctors because it happens so seldom. (I'm sure long term monitoring exists. But it isn't applied in such cases)

I always wanted to build something she can quickly apply to her chest to monitor the signal while such a episode is happening. But I never got anywhere with this idea.

And here it is. Exactly what I was looking for. And opensource. I have no clue on how to analyse heart signals or how a signal would need to be conditioned to be valuable to doctors. But I'm sure we will get there...

  Are you sure? yes | no

Ashwin K Whitchurch wrote 05/23/2017 at 17:42 point

Deep-Thought, thank you. We had those people in mind when we started with this project. We have made a good start I believe and we will get there soon. 

  Are you sure? yes | no

robertncstrickland wrote 05/14/2017 at 19:01 point

hook this up to a pair of smart glasses, and bingo, sniper heart rate monitor in the field!

  Are you sure? yes | no

Ashwin K Whitchurch wrote 05/23/2017 at 17:39 point

I don't know what that means, but sure sounds cool :)

  Are you sure? yes | no

robertncstrickland wrote 05/24/2017 at 10:29 point

basically, when sniping, you want to pull the trigger right after a heartbeat, and slowing your heart rate down will allow you to relax, thus pulling off more accurate shots, its a widely controversial topic,

but my own experience (in hunting, and target shooting) has me in the habit of monitoring my heartbeat when shooting, i'm able to instinctively know when my heart beats while not moving in a calm enviroment now. i used to use a stethoscope (not even kidding) and then a couple of rubber bands around my off hand's wrist, to slow circulation and better feel my pulse. i do not reccomend that as it can be harmful even if done right!

  Are you sure? yes | no

Ashwin K Whitchurch wrote 05/24/2017 at 14:44 point

Wow, that really is some awesome stuff. Heart rate control, so its like some kind of bio-feedback to get a better shot. I've always wondered how snipers get it so right.

  Are you sure? yes | no

Rasit Eskicioglu wrote 05/12/2017 at 15:07 point

Ashwin, I liked this project and want to use it as a tool in my research and teaching. How soon can I get hold of a kit or two?

  Are you sure? yes | no

Ashwin K Whitchurch wrote 05/14/2017 at 18:13 point

Thank you Rasit, for your interest. We will get in touch with you as soon as we are ready with the tested devices, we do not have a date as of now.

  Are you sure? yes | no

Alex Gibson wrote 05/10/2017 at 10:20 point

Hi, this is amazing work guys.  

My dad just had a 'mild' heart attack, he's out of hospital but I am not confident he is being properly monitored on leaving hospital as he has other risk factors but there is a lot of hand-waving, and I would love to have this in my hands right now.

Ashwin & team, if I pay direct, would you be able to send me a kit of parts I could solder up? I also have electronics experience so I can give testing feedback, I also have a LOT of 3D printers (that's my business) and could potentially help you distribute in the UK.   I am on twitter @alexgibson3d

  Are you sure? yes | no

Ashwin K Whitchurch wrote 05/10/2017 at 16:57 point

Thanks Alex. We will work together as discussed over messaging.

  Are you sure? yes | no

Ashwin K Whitchurch wrote 05/10/2017 at 04:37 point

Thank you everyone for all the likes/skulls, it helps us keep going

  Are you sure? yes | no

Tim Meyer wrote 05/09/2017 at 20:33 point

As for the electrode connector, it would be nice to have them 46mm apart so they fit 'standard' polar chest belts or shirts with built in electrodes. Also, these typically have the male push-button part on the sensor and the female on the electrodes (see e.g. https://www.decathlon.de/laufshirt-kiprun-cardio-herren-id_8367680.html?searchedText=cardio+shirt) . Can't wait to get the kit! 

  Are you sure? yes | no

Ashwin K Whitchurch wrote 05/10/2017 at 16:56 point

Hi Tim: Thanks for the info. We designed this with the objective to use regular gel-based disposable sticker electrodes (that you find in hospitals) for ease of re-use and their low cost, without requiring any maintenance.

  Are you sure? yes | no

Diego Galue wrote 04/23/2017 at 10:24 point

Quick question, where did you buy the electrode snap terminals? its been impossible for me to get them. thank you in advance

  Are you sure? yes | no

Ashwin K Whitchurch wrote 04/23/2017 at 15:40 point

Hi Diego, right now we've pulled out the button out of a standard ECG lead and soldered it onto a pad. However, we've placed and order with these guys: http://www.setolink.com/ for getting the buttons alone, will know the quality only once we  receive them

  Are you sure? yes | no

fest wrote 04/21/2017 at 10:37 point

I do realize that it's probably too early for this but do you have a potential price in mind?

Any preliminary specs on battery life?

  Are you sure? yes | no

Ashwin K Whitchurch wrote 04/21/2017 at 15:04 point

Thanks for following. Yes, we haven't priced it as of now, but our plan is to do a crowdfunding campaign for this project and thus bring the cost of the device under $50 

  Are you sure? yes | no

Ashwin K Whitchurch wrote 04/21/2017 at 15:06 point

As for battery life, we have a target run-time of at least a week on a single charge, with a 250 mAH Li-Poly battery. We will have more detailed information on power characteristics soon as we continue testing

  Are you sure? yes | no

Steven Merrifield wrote 04/20/2017 at 03:27 point

I don't see any under-voltage lock out protection to prevent damage to the battery.

  Are you sure? yes | no

Ashwin K Whitchurch wrote 04/20/2017 at 03:34 point

Thank you, comments do help us improve. UVLO protection is built into the battery packs itself, this causes the battery to not discharge itself below about 2.5 volts. 

  Are you sure? yes | no

Rodrigo wrote 04/18/2017 at 05:57 point

Hi. Loved the project. Recently I started developing a ECG viewer and I loved this project. Are you selling the kits ready made? I would like to purchase and try integrating it with my viewer. Thanks.

  Are you sure? yes | no

Ashwin K Whitchurch wrote 04/18/2017 at 06:39 point

Thanks. This product is still under development and will be available for sale on protocentral by the middle of May 2017, you can follow the progress right here. However, if you need only an ECG interface, you can check out our breakout board: https://www.protocentral.com/open-medical-devices/1149-protocentral-max30003-single-lead-ecg-breakout-board.html

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates