Ecg Heart Rate Monitor Design

Discussion in 'The Projects Forum' started by keane2097, Feb 19, 2009.

  1. keane2097

    keane2097 Thread Starter Member

    Joined:
    Feb 19, 2009
    Messages:
    21
    I'm currently building a heart rate monitor based on the MSP430 from Texas Instruments. This is the schematic I'm basing my preamplifier design on, it's a TI design with some electrical isolation added:

    [​IMG]

    I've built a test version of the circuit on breadboard and I want to check that I've done it properly without attaching it to myself...

    Unfortunately I'm not sure what input signals I should apply to test it suitably.

    Basically, can anyone tell me what kind of signal I should apply to the right-leg driven circuitry and to each of the inputs that will be connected to the patient's arms?

    Thanks
  2. keane2097

    keane2097 Thread Starter Member

    Joined:
    Feb 19, 2009
    Messages:
    21
    Could somebody possibly explain this section of the schematic to me specifically please?

    [​IMG]

    I can't really understand what it's telling me to do here with regards to the connection of + and - Vcc, seemingly to the Vin+/- pins?
  3. bertus

    bertus Administrator Staff Member

    Joined:
    Apr 5, 2008
    Messages:
    12,736
    Location:
    Amsterdam,Holland (GMT + 1)
    Hello,

    The diodes to +Vcc and -Vcc and the inputs - and +, are protecting the inputs.
    The inputs can not go higher than +Vcc + Vdiode (+5.7)
    and lower than -Vcc - Vdiode (-5.7), in this schematic.

    Greetings,
    Bertus
  4. keane2097

    keane2097 Thread Starter Member

    Joined:
    Feb 19, 2009
    Messages:
    21
    What I'm confused about is the fact that it seems to be telling me to attach both + and - VCC to the same pin... Is this correct?

    If so, is it some sort of protection for the circuit?
  5. bertus

    bertus Administrator Staff Member

    Joined:
    Apr 5, 2008
    Messages:
    12,736
    Location:
    Amsterdam,Holland (GMT + 1)
  6. keane2097

    keane2097 Thread Starter Member

    Joined:
    Feb 19, 2009
    Messages:
    21
    So I connect both + and - Vcc to the positive and negative input pins of the amplifier, each through a diode?

    Thanks for the link.
  7. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,096
    Location:
    In the vast midwest of the USA; CST
    No.
    On the vertical edge of the triangular amplifier symbol, you will see the noninverting (+) input and the inverting (-) input. Those are signal inputs, not Vcc/Vee.

    With instrumentation amplifiers, there are two additional lines on the vertical edge of the symbol; these are used to set the gain of the amplifier.
  8. keane2097

    keane2097 Thread Starter Member

    Joined:
    Feb 19, 2009
    Messages:
    21
    This is the pin-out diagram of the chip i'm using:-

    [​IMG]

    From what you've said I don't connect the diodes and Vcc+/- to the noninverting (+) input and the inverting (-) input, that there are two other input lines for this, but it doesn't look like this in the pin-out diagram.

    From what I can see, I need to connect my two 40 ohm resistors up between pins 1 and 8, Connect pin 7 to a 5V source, and connect the diodes and Vcc+/- to pins two and three...

    Is this correct?
  9. beenthere

    beenthere Retired Moderator

    Joined:
    Apr 20, 2004
    Messages:
    15,815
    Location:
    Missouri, USA (GMT -6)
    From the data sheet, you also need to have pins 4 and 5 to circuit ground. Pin 5 is the reference (always circuit ground, unless you need an offset in the output), and 4 is the negative supply pin (V-). The boxes that indicate "input protection circuitry" are explained in the data sheet. You don't need clipping diodes.

    Operating the INA118 with a single supply means that it can't respond to a signal that drives the output negative with respect to ground. Unless you are certain that all signals will be positive-going with reference to ground, a -5 volt supply might be a good idea.

    Do you have the data sheet for the device? It's always a good idea to have it, as it has example applications illustrated.
    Last edited: Feb 20, 2009
  10. keane2097

    keane2097 Thread Starter Member

    Joined:
    Feb 19, 2009
    Messages:
    21
    Thanks for this post - it's made things somewhat clearer. I have the datasheet for the INA118 alright.

    Having studied the schematic a little more I've come to the following conclusions:

    Pin 1: 40 kOhm Resistor, sets amp gain along with pin 8
    Pin 2: Inverting Input - connected through 390 kOhm resistor to left arm
    Pin 3: Non-Inverting Input - connected through 390 kOhm to right arm
    Pin 4: Negative Supply Voltage - Connected to ground
    Pin 5: See below
    Pin 6: Instrumentation Amp Output line
    Pin 7: Positive supply voltage - 5V applied
    Pin 8: 40 kOhm Resistor, sets amp gain along with pin 8

    The final thing I'm unclear about is setting up the reference (i.e. Pin 5). In your post you say it should be connected to ground, however in my schematic it seems to be connected through a parallel resistor and capacitor to the integrator op-amp (A4).

    Does this provide the offset voltage you spoke about, or am I again mislabelling the pins?

    Thanks for all the help, I'm fairly sure I have the circuit constructed correctly now and just want to be sure everything's right...
  11. keane2097

    keane2097 Thread Starter Member

    Joined:
    Feb 19, 2009
    Messages:
    21
    So I've gotten the circuit in the schematic built on breadboard and I'm now happy enough that all the connections are correct.

    I'm having a problem with the supply voltages though.

    I'm using a power supply to generate a +5 to -5 voltage. The +5 is being used to provide the instrumentation amplifier with its positive supply. I'm then using two voltage dividers from the +5 and -5 signals to get the 2.5V supplies for the OPA2335 op-amps.

    Unfortunately when I connect the op amps to the voltage divider the voltage drops considerably and the amps aren't therefore supplied with the desired +/-2.5V.

    I've tried buffering the two signals with voltage followers. Again the output from the voltage followers are the desired +/-2.5V but when I connect to the op-amps the voltage drops again and I don't get the supply I want.

    Clearly I'm absolutely hopeless with analog circuitry. Can someone please give me an idea of how I can drive the desired voltages into my op-amps so i can get back to the land of 1s and 0s asap!?
  12. KMoffett

    KMoffett Senior Member

    Joined:
    Dec 19, 2007
    Messages:
    2,345
    Location:
    Minneapolis MN USA
    Please post a schematic of what you've done.

    Ken
  13. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    Why use the odd opamps that have a max allowed total supply voltage of only 7V?
    Instead use ordinary opamps that work perfectly from the plus and minus 5v supplies.
  14. keane2097

    keane2097 Thread Starter Member

    Joined:
    Feb 19, 2009
    Messages:
    21
    I've been testing out various parts of the circuit on their own since I still don't have the overall circuit performing correctly...

    I've been having a look at the integrator part of the circuit and I've built it stand-alone to test it. This is the setup I have:

    [​IMG]

    Now all the theory I've come across suggests this should behave as a low-pass filter, and indeed this is the behavior I see when I test the circuit, however in the overall schematic of the ECG Amplifier it seems to be suggested that it should behave as a high-pass filter to eliminate baseline wander...

    Can someone please explain how the setups differ?

    Thanks...
  15. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    Didn't i answer your question this morning on another thread on another website?
  16. keane2097

    keane2097 Thread Starter Member

    Joined:
    Feb 19, 2009
    Messages:
    21
    Yes you did thanks. I posted my question on both sites.

    I'm currently still trying to debug my circuit by building the different blocks separately and making sure they are working as expected. Currently I'm looking at the O/P amplifier as shown:

    [​IMG]

    The setup I'm using is supplying the op amp with +/- 2.5V and I've got the positive input grounded. The negative input takes in the signal...

    If I have, say, a 10mV p-p sine wave as my input what should my output be? I'm guessing I should be getting a 2V p-p sine wave from the schematic, but I'm not sure how to do the calculations to confirm this?

    Thanks
  17. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    The lowpass opamp is an inverting type. An input voltage causes a current in the 5k input resistor that is amplified by the opamp.
    Your opamp does not have the important input resistor.

    Attached Files:

  18. keane2097

    keane2097 Thread Starter Member

    Joined:
    Feb 19, 2009
    Messages:
    21

    Ok so I should add in a 5k resistor at the inverting input and then apply a voltage to that and I should see an inverted, amplified version of this signal at the output?
  19. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    Yes, the same as is done in the original circuit. Look at Inverting Opamp Circuit in Google.
  20. HelenaL

    HelenaL New Member

    Joined:
    Mar 11, 2009
    Messages:
    1
    Hi all,

    About Keane2097's first question, what would be the correct way to test the circuit without connecting it to a person? The problem in this case is that there is a leg drive that provides feedback to the circuit.

    Another question: I have tried a similar circuit using INA118 but I was unable to see the ECG signal. Instead I get 50Hz noise, although I have a simple notch filter. I will be digitizing the signal and filter it. Any ideas?

    Thanks in advance.
    HelenaL
Similar Threads
Forum Title Date
The Projects Forum Help with Bluetooth Heart Rate Monitor May 22, 2014
The Projects Forum Bluetooth heart rate monitor Feb 15, 2014
The Projects Forum heart rate transmitter Feb 18, 2013
The Projects Forum Help for my heart rate monitor Feb 21, 2012
The Projects Forum ECG/Heart Rate Monitor Jan 29, 2012

Share This Page