Tell us about yourself!

Complete Your Profile
  • ColinD38's instructable Arduino E.C.G. with analog scale's weekly stats: 2 years ago
    • Arduino E.C.G. with analog scale
      274 views
      6 favorites
      2 comments
  • ColinD38 commented on ColinD38's instructable Arduino E.C.G. with analog scale2 years ago
    Arduino E.C.G. with analog scale

    Thank you! Yes its true you can really have fun with this project and add different features to have fun with this project.

    View Instructable »
  • Electrocardiograph & Heart Rate Monitor

    HiI used the code provided, added a few modifications to add a filter, as well as a servo motor to act as a analog BPM scale in a 180 degree range. The lcd displays whats programmed but stuck at 30 BPM, and LED does not flash.....which may work once arduino display the proper BPM. Can anyone check the attached code to verify if everything is ok or if there may be something causing these problems? I do get the wave form on my oscilloscope but thats about it right now. You can reply here or email me: codesroc@gmail.comMany thanks!![code]// This program reads the incoming signal from the electrocardiograph and outputs the heart rate// Pin D7 is connected to the signal input// Pin D6 is connected to a mini-speaker// For the connection to the liquid crystal display, see the LiquidCrystal ...

    see more »

    HiI used the code provided, added a few modifications to add a filter, as well as a servo motor to act as a analog BPM scale in a 180 degree range. The lcd displays whats programmed but stuck at 30 BPM, and LED does not flash.....which may work once arduino display the proper BPM. Can anyone check the attached code to verify if everything is ok or if there may be something causing these problems? I do get the wave form on my oscilloscope but thats about it right now. You can reply here or email me: codesroc@gmail.comMany thanks!![code]// This program reads the incoming signal from the electrocardiograph and outputs the heart rate// Pin D7 is connected to the signal input// Pin D6 is connected to a mini-speaker// For the connection to the liquid crystal display, see the LiquidCrystal Librairy// External variablesconst int signal = 7; // Pin connected to the filtered signal from the circuitunsigned long time;unsigned long frequency;int angle;// Internal variablesint period = 2000;int starttime = 2000;int input = 0;int lastinput = 0;unsigned long death = 0;// include the library code:#include <LiquidCrystal.h>#include <Servo.h>#include <Filters.h>Servo myServo;// initialize the library with the numbers of the interface pinsLiquidCrystal lcd(12, 11, 5, 4, 3, 2);byte heart[8] = { 0b00000, 0b01010, 0b11111, 0b11111, 0b11111, 0b01110, 0b00100, 0b00000};void setup() { myServo.attach(9); Serial.begin(9600); pinMode(signal, INPUT); lcd.createChar(1, heart); // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.write(1); lcd.setCursor(1, 0); lcd.print(" bpm : "); lcd.setCursor(0, 1); lcd.print("You are ");}void loop() { lcd.setCursor(1, 0); time = millis(); input = digitalRead(signal); if ((input != lastinput) && (input == HIGH)) { // If the pin state has just changed from low to high (edge detector) period = time - starttime; // Compute the time between the previous beat and the one that has just been detected starttime = time; // Define the new time reference for the next period computing death = time; tone(6, 800, 100); // Output a short "bip" through the speaker } lastinput = input; // Save the current pin state for comparison at the next loop iteration if (period < 0) { frequency = 0; } else { frequency = 60000 / period; // Compute the heart rate in beats per minute (bpm) with the period in milliseconds } if ((time - death) > 2000) { // Detect if there is no beat after more than 2 seconds tone(6, 900); // Output a continuous tone to the speaker // filters out changes faster that 40 Hz. float filterFrequency = 40; // create a one pole (RC) lowpass filter FilterOnePole lowpassFilter( LOWPASS, filterFrequency ); while ( true ) { lowpassFilter.input( analogRead( 7 ) ); } lcd.print("<30"); lcd.setCursor(8, 1); lcd.print("dead! "); } else { char freq[3]; if (frequency / 100 == 0) { freq[0] = 32; // Print a space to the first character if the frequency is below 100 bpm } else { freq[0] = frequency / 100 + 48; // Sort the hundreds character and convert it in ASCII } freq[1] = (frequency / 10) % 10 + 48; // Sort the thents character and convert it in ASCII freq[2] = frequency % 10 + 48; // Sort the units character and convert it in ASCII angle = map(frequency, 0, 1023, 29, 179); myServo.write(angle); lcd.print(freq);//if doesnt work try input or revert back to freq lcd.setCursor(8, 1); lcd.print("alive! "); } Serial.print("Beats per Minute: "); Serial.print(frequency);}[/code]

    View Instructable »
  • Electrocardiograph & Heart Rate Monitor

    I added filter code to the arduino library, wrote the filter code prior to frequency calculation in the loop and was able to finally acquire a clear signal....take some palying around with the ds0138 to get the right settings. my problem now is the lcd is still stuck show BPM less then 30. I also added serial monitor to the program and that as well is stuck on 30. I have the input onto digital pin 7 just like the instructions says but not sure what else to do now. I now its probably something simple in the program to correct it. Can you provide some thought on how to fix this. As well i have a servo motor mapped to give a analog scale reading of BPM and mapped out the frequency to a 180 degree range. that as well is not working so it has to do with getting the input back out of t...

    see more »

    I added filter code to the arduino library, wrote the filter code prior to frequency calculation in the loop and was able to finally acquire a clear signal....take some palying around with the ds0138 to get the right settings. my problem now is the lcd is still stuck show BPM less then 30. I also added serial monitor to the program and that as well is stuck on 30. I have the input onto digital pin 7 just like the instructions says but not sure what else to do now. I now its probably something simple in the program to correct it. Can you provide some thought on how to fix this. As well i have a servo motor mapped to give a analog scale reading of BPM and mapped out the frequency to a 180 degree range. that as well is not working so it has to do with getting the input back out of the arduino to both servo and lcd.

    View Instructable »
  • Electrocardiograph & Heart Rate Monitor

    you may also want to introduce a potentiometer into the circuit that is being fed in the 3rd pin on the lcd. wire your two front pin of the potentiometer for your polarity. this will act as a contrast adjuster. i had the same issue and once i did this i could adjust the contrast of the text on the lcd.

    I just recently built this project following the diagram shown. however i am having an issue with the 9v battery that is feeding into the breadboard by the regulator. it is over heating and producing a burning smell. i am wondering if this is a common problem or how i should go abouts fixing this. I am also introducing a servo motor into this project to also create a analog BPM meter but currently trying to figure why its not operating.

    View Instructable »