This project shows how to use the Analog Discovery Studio's Oscilloscope to measure the natural electrical potential generated by the heart (ECG). As the measured signal is of very low amplitude, it first needs to be amplified with external circuitry, which can be built on the Breadboard Canvas and supplied from the Analog Discovery Studio Power Supplies. With the help of WaveForms, the received data is sent to LabVIEW, where the postprocessing is done.
Analog Discovery StudioAnalog Discovery Studio is a fully functional, portable test and measurement device that can turn any cross-functional space into a pop-up electronics laboratory. Equipped with 13 instruments, including an Oscilloscope, Logic Analyzer, Spectrum Analyzer, Waveform Generator, and more; the Analog Discovery Studio provides an entire stack of bench-top instruments with a convenient, replaceable, and breadboardable interface.
WaveForms is the free software application for the Analog Discovery Studio and enables the use of the available analog and digital instruments. The software has been refined by customer feedback for over 10 years and features a computer and laptop-friendly user interface that has the feel of traditional benchtop software.
LabVIEW offers a graphical programming approach that helps you visualize every aspect of your application, including hardware configuration, measurement data, and debugging. This visualization makes it simple to integrate measurement hardware from any vendor, represent complex logic on the diagram, develop data analysis algorithms, and design custom engineering user interfaces.
Build the ECG circuit on Analog Discovery Studio
There are three steps to complete the circuit:
- Building the Amplifier Circuit - The amplitude of the potential difference on the skin is just in the millivolt or microvolt range, so it has to be amplified.
- Filtering Out the Common Mode Signal - 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. The amplified and inverted common-mode signal (G) is connected to a current limiting resistor, then to the left wrist.
- Eliminating the DC Component - The offset of the signal can be easily eliminated using a small decoupling capacitor between the output of the instrumentation amplifier and the oscilloscope probe.
Wiring diagram in Fritzing
Create the user interface in NI LabVIEW
There are four widgets in the front panel:
- A drop-down list to select the Oscilloscope channel,
- An input field to enter the number of seconds for which signals are acquired,
- A drop-down list to select the mains frequency which will be filtered later
- A Stop button stops the measurement
In addition, a plot pane displays the electrocardiograph signal. A slider and a numeric indicator show the calculated heart rate. The slider is in green when the heart rate is considered normal (between 50 and 100 bpm) and red otherwise. On the right side of the panel, a column displays all the data acquired from the ECG feature extractor block
Measure the ECG signal
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. 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.
The complete project guide and source files can be found on Digilent Reference Page.
Top Comments