Clean up an ECG signal with digital filters
Record a heart signal with an AD8232 module and an Arduino, remove the 50 Hz mains hum and baseline drift with digital filters, and calculate heart rate.
What this proves to recruiters
- You can filter real, noisy biomedical signals.
- You can detect features in a signal.
- You think about safety when working with people.
Skills you will use
- Biomedical signals
- Notch and high-pass filters
- Peak detection
- Python
Parts list
You can buy the listed parts online here:
| Part | Qty | Approx. price | Shop |
|---|---|---|---|
| Arduino Uno compatible board with USB cable | 1 | ₹550 | Find on Amazon |
| AD8232 ECG sensor module with electrodes | 1 | ₹550 | Find on Amazon |
| Breadboard, 830 points | 1 | ₹90 | Find on Amazon |
| Jumper wire set (male-male and male-female) | 1 | ₹120 | Find on Amazon |
| Total, about | ₹1,300 | ||
Prices are rough online prices in India and change with the seller. You may already have some parts, or find them in your college lab.
As an Amazon Associate I earn from qualifying purchases. Buying through these links costs you nothing extra and helps keep this site free.
Free software
- Arduino IDE
- Python with SciPy
Steps
- Safety first: run the laptop on battery, unplugged from the charger, while electrodes are on. This is a learning project, not a medical device.
- Connect the AD8232 output to A0 and sample at 250 Hz, sending values over serial.
- Record 30 seconds and plot the raw signal: you will see hum and a wandering baseline.
- Apply a 0.5 Hz high-pass filter for drift and a 50 Hz notch for hum.
- Detect the tall R peaks and compute heart rate from the time between them.
- Compare your heart rate with a smartwatch or counting your pulse.
Make it stand out
- Run the filters on the Arduino in real time.
- Show heart rate on an OLED.
Put it on your resume
Acquired ECG with an AD8232 and Arduino; removed baseline drift and 50 Hz hum with digital filters and computed heart rate from R-peaks.
Replace each [x] with a number you measured. Real numbers make a line believable.
Keep going
This project fits stage 2, “Digital signal processing”, of the Signal processing and edge AI roadmap. See also how freshers get into embedded AI and DSP engineer jobs.