Arduino – Cannot get ECG readings from heart, but I do when I poke at the leads

down vote favorite
I have a minor issue with my ECG. When I poke at the leads, I get a reading. But when I hold the leads or place it near my heart, I don’t get anything. I’m pretty sure this is hardware related, but I don’t want to completely rule out a potential software problem. I used this YouTube video as a guide: https://www.youtube.com/watch?v=NDjRg-KgIXY, with their circuit show below.Arduino - Cannot get ECG readings from heart, but I do when I poke at the leads

My breadboard almost looks exactly the same as that, but with a couple of changes. Instead of connecting the ECG to the computer via a audio cable, I used Bluetooth to transfer it to my phone. Here is my schematic diagram.

Here is my breadboard diagram.

In my breadboard, I used three LM358 op-amps. Here is my Arduino code (if you need it):

const int  signal = 7;    // Pin connected to the filtered signal from the circuit
unsigned long currentBeatTime;   
unsigned long previousBeatTime;

unsigned long frequency;

// Internal variables
unsigned long period = 0;
int input = 0;Arduino - Cannot get ECG readings from heart, but I do when I poke at the leads Schematic
int lastinput = 0;

void setup() {
pinMode(signal, INPUT);
Serial.begin(9600);

previousBeatTime = millis();
}

void loop() {
delay(100);
input = digitalRead(signal);

if ((input != lastinput) && (input == HIGH)) {
    // If the pin state has just changed from low to high (edge detector)
    currentBeatTime 
= millis();

For more detail: Arduino – Cannot get ECG readings from heart, but I do when I poke at the leads


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top