Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
test-and-measurement:analog-discovery-studio:ecg-demo:start [2021/10/13 21:06] – external edit 127.0.0.1 | test-and-measurement:analog-discovery-studio:ecg-demo:start [2024/04/16 21:00] (current) – title case Arthur Brown | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== DIY ECG With Analog Discovery Studio and LabVIEW ====== | + | ====== DIY ECG with Analog Discovery Studio and LabVIEW ====== |
{{ reference: | {{ reference: | ||
**Note:** //This is NOT a medical device. Should be used for educational purposes only.// | **Note:** //This is NOT a medical device. Should be used for educational purposes only.// | ||
Line 22: | Line 22: | ||
<WRAP group> | <WRAP group> | ||
* [[https:// | * [[https:// | ||
- | * Analog parts and wires (all found in the [[https://store.digilentinc.com/ | + | * Analog parts and wires (all found in the [[https://digilent.com/shop/ |
* 1 x [[https:// | * 1 x [[https:// | ||
* 2 x [[https:// | * 2 x [[https:// | ||
- | * 1 x 47nF capacitor (473) | + | * 1 x 47 nF capacitor (473) |
- | * 4 x 4.7KΩ resistor (yellow-purple-red-gold) | + | * 4 x 4.7 KΩ resistor (yellow-purple-red-gold) |
- | * 1 x 10KΩ resistor (brown-black-orange-gold) | + | * 1 x 10 KΩ resistor (brown-black-orange-gold) |
- | * 2 x 20KΩ resistor (red-black-orange-gold) | + | * 2 x 20 KΩ resistor (red-black-orange-gold) |
- | * 3 x 100KΩ resistor (brown-black-yellow-gold) | + | * 3 x 100 KΩ resistor (brown-black-yellow-gold) |
- | * 1 x 150KΩ resistor (brown-green-yellow-gold) | + | * 1 x 150 KΩ resistor (brown-green-yellow-gold) |
- | * 2 x 470KΩ resistor (yellow-purple-yellow-gold) | + | * 2 x 470 KΩ resistor (yellow-purple-yellow-gold) |
* Jumper wires | * Jumper wires | ||
* 3 x Alligator clips | * 3 x Alligator clips | ||
Line 50: | Line 50: | ||
=== Building the Amplifier Circuit === | === Building the Amplifier Circuit === | ||
<WRAP column half> | <WRAP column half> | ||
- | The amplitude of the potential difference on the skin is just in the millivolt or microvolt range, so it has to be amplified. To amplify the signal an instrumentation amplifier is built using OP482. The gain is set to 500 (A = (1 + 2 * R2/R1) * R3/R4). The **+** input should be connected to the right leg, above the ankle, the **-** input to the right hand, on the wrist. Between the surface electrodes and the inputs of the instrumentation amplifier | + | The amplitude of the potential difference on the skin is just in the millivolt or microvolt range, so it has to be amplified. To amplify the signal an instrumentation amplifier is built using OP482. The gain is set to 500 (A = (1 + 2 * R2/R1) * R3/R4). The **+** input should be connected to the right leg, above the ankle, the **-** input to the right hand, on the wrist. Between the surface electrodes and the inputs of the instrumentation amplifier |
</ | </ | ||
{{ reference: | {{ reference: | ||
Line 63: | Line 63: | ||
=== Filtering Out the Common Mode Signal === | === Filtering Out the Common Mode Signal === | ||
<WRAP column half> | <WRAP column half> | ||
- | It can be seen, that the measured signal is too noisy, the heart signal can't be recognized. To correct this, the common mode signal from the output of the first amplifier stage is amplified and inverted using the fourth operational amplifier in OP 482 (A = - R6/R5). The amplified and inverted common mode signal (**G**) is connected to a current limiting resistor, then to the left wrist. Two antiparallel diodes are connected between the **G** surface electrode and the device' | + | It can be seen, that the measured signal is too noisy, the heart signal can't be recognized. To correct this, the common mode signal from the output of the first amplifier stage is amplified and inverted using the fourth operational amplifier in OP 482 (A = - R6/R5). The amplified and inverted common mode signal (**G**) is connected to a current limiting resistor, then to the left wrist. Two antiparallel diodes are connected between the **G** surface electrode and the device' |
</ | </ | ||
{{ reference: | {{ reference: | ||
Line 117: | Line 117: | ||
=== Postprocessing === | === Postprocessing === | ||
<WRAP group>< | <WRAP group>< | ||
- | The acquired signal is still as noisy as seen on the // | + | The acquired signal is still as noisy as seen on the // |
After proper filtering, the maximum point of the data set is acquired and, with a peak detector, all the data points above 75% of this maximum and 10 ms wide are found (the P - preceding QRS - and T - proceeding QRS - signals of the should not reach that amplitude). The location of these points are multiplied with the time derivative of the signal and summed with the starting time to get the exact time of each peak. Time between two consecutive peaks is calculated and converted to frequency, then multiplied with 60 to get the number of beats (peaks) per minute. | After proper filtering, the maximum point of the data set is acquired and, with a peak detector, all the data points above 75% of this maximum and 10 ms wide are found (the P - preceding QRS - and T - proceeding QRS - signals of the should not reach that amplitude). The location of these points are multiplied with the time derivative of the signal and summed with the starting time to get the exact time of each peak. Time between two consecutive peaks is calculated and converted to frequency, then multiplied with 60 to get the number of beats (peaks) per minute. | ||
Line 136: | Line 136: | ||
==== Testing ==== | ==== Testing ==== | ||
<WRAP group>< | <WRAP group>< | ||
- | To test the device, build the circuit on the Breadboard Canvas, turn on the Analog Discovery Studio and connect it to a PC. Open the ECG VI. Place one surface electrode on the inner side of your left wrist, one on the inner side of your right wrist and one on the inner side of your right ankle. With the alligator clips, connect the circuit to the electrodes, as shown in the image to the right. Start the VI with the pLay button. If you stay still for a few seconds, you will see on the plot pane your ECG signal and the estimated heart rate. | + | To test the device, build the circuit on the Breadboard Canvas, turn on the Analog Discovery Studio and connect it to a PC. Open the ECG VI. Place one surface electrode on the inner side of your left wrist, one on the inner side of your right wrist and one on the inner side of your right ankle. With the alligator clips, connect the circuit to the electrodes, as shown in the image to the right. Start the VI with the play button. If you stay still for a few seconds, you will see on the plot pane your ECG signal and the estimated heart rate. |
</ | </ | ||
{{ reference: | {{ reference: | ||
Line 167: | Line 167: | ||
For more information about how to use the software featured in this demo, please visit its respective guide: [[test-and-measurement: | For more information about how to use the software featured in this demo, please visit its respective guide: [[test-and-measurement: | ||
- | For technical support, please visit the [[https:// | + | For technical support, please visit the [[https:// |
{{tag> | {{tag> |