Design Project Instructable

by ddsakhrani in Circuits > Arduino

168 Views, 0 Favorites, 0 Comments

Design Project Instructable

Instructable pic.png

In this intractable, you will learn how to create a functional ECG with automated plotting of the bio-signal and automated BPM readout.

Step 1: Gathering Your Materials

First, you should obtain a breadboard to build your circuit on. Then, using your values from you schematics in LTSpice, gather the relevant resistors, capacitors and op amps with the correct values.

Next, obtain bnc cables to connect the Agilent 33220A Function Generator to your circuit, as well as cables that connect your circuit to the Agilent DSO6014A Oscilloscope. Additionally, obtain cables to power your op amps (-V, +V) and a grounding cable to connect to the Agilent E3631A DC Power Supply.

Step 2: Building Your Circuit

amplifier.png
notch filter.png
low pass.png

Now it is time to build your amplifier, notch filter, and low pass filter. You should have a schematic built in LTSpice for this part.

To build the instrumentation amplifier, follow your schematic to build the amplifier. Once you have this built, make sure you power your op amps and ground it as well using the DC power supply. Next, use your alligator clips from the function generator and input a sine wave signal of 1mv amplitude and 100Hz. Gather the other set of alligator clips connected to the oscilloscope and connect it to the output of the amplifier. Turn on the power supply and function generator to see an output plot on the oscilloscope.

To build the notch filter, follow your schematic to build the notch filter. Once you have this built, make sure you power your op amps and ground it as well using the DC power supply. Next, use your alligator clips from the function generator and input a AC power supply of amplitude 1. For the frequency, you will want to test frequencies above and below 60 Hz, since the notch filter will attenuate at 60Hz. You should see outputs on the oscilloscope. Be sure to record the Vin and Vout values for each frequency. Using these values, create a frequency vs. magnitude response plot to make sure your notch filter attenuates at 60Hz.

To build the low pass filter, follow your schematic to build the low pass filter. Once you have this built, make sure you power your op amps and ground it as well using the DC power supply. Next, use your alligator clips from the function generator and input a AC power supply of amplitude 1 and a sine wave of 1mv amplitude. For the frequency, once again you will test low and high frequencies starting at 10Hz and working up to 10000Hz. You should see outputs on the oscilloscope. Be sure to record the Vin and Vout values for each frequency. Using these values, create a frequency vs. magnitude response plot to make sure your low pass filter attenuates high frequencies.

Step 3: Creating Your Integrated Circuit

Instructable pic.png

Once you have created the three separate stages of your circuit, you will want to connect all three stages of your circuits via wires.

You will connect the output (pin 6) from the third op amp of the instrumentation amplifier to the input (pin 3) of the op amp of the notch filter. Then you will connect the output (pin 6) of the notch filter op amp to the input (pin 3) of the op amp of the low pass filter. This circuit is now referred to as the integrated circuit.

Next, use your alligator clips from the function generator and input of an arbitrary signal. Gather the other set of alligator clips connected to the oscilloscope and connect it to the output of the amplifier. Turn on the power supply and function generator to see an output plot on the oscilloscope. This plot should simulate an ECG waveform

Step 4: Connect Your Human Subject

Once you have a working integrated circuit that forms an ECG using the function generator, you can now connect you human subject.

Disconnect the cables from the function generator and the DC power supply to your circuit.

Using electrodes, connect these via alligator clips to the circuit as ground, input to the first op amp, and input to the second op amp.

The electrode pads should be placed on your human subject on the left wrist and the proximal ankles of both legs. Your human subject should remain extremely still.

Using the alligator clips that are connected to the output of your integrated circuit and the oscilloscope, view the ECG waveform on the oscilloscope of your human subject.

Step 5: Using Arduino

Arduino.png

Once you can see the ECG waveform on the oscilloscope, disconnect the alligator clips to the oscilloscope. This is because we will now use your Arduino code to view the ECG waveform, as well as a beats per minute readout.

Download the Arduino software, don't worry, it's free.

Once this is downloaded, copy and paste the code that is provided to you in the program.

Next, obtain an Arduino circuit board and connect this to your laptop via USB.

Now, you will want to connect your integrated circuit (functional ECG) to the Arduino circuit board using the V1 pin and the Ground pin.

Once your ECG is connected to the Arduino circuit, it is time to measure your human subject.

Step 6: Obtaining ECG and BPM Readout

arduino plot.png
arduino bpm.png

Make sure your human subject is properly connected and very still. Any movement will result in unnecessary noise in your readout.

Upload your code and click "Tools" -> "Serial Monitor" to see the BPM readout. Click on "Serial Plotter" to view the ECG readout.

If the ECG is not fully visible, go back to your code and adjust the Upper and Lower Thresholds. Once you have this adjusted, your ECG should be fully visible.

Congrats, you now have a functional ECG with automated plotting of the bio-signal and automated BPM

readout.