Projects   /   Sensors & Temperature   /   PIC16F876A

ECG on your laptop using PIC16F876 microcontroller

ECG on your laptop! That's right! This Instructable shows you how to build a device that enables you to do an electrocardiogram on yourself, your family or...

Published

At a glance

CategorySensors & Temperature
PIC modelPIC16F876A
IncludesVideo
Reading time~6 min
Jump to a section
  1. ECG on your laptop!
  2. Step 1: Plans, Schematics and Board Layout
  3. Step 2: Getting Ready for the Build
  4. Step 3: Applying Solder
  5. Step 4: Placing the Components
  6. Step 5: Melting the Solder
  7. Step 6: Tests and Troubleshooting
  8. Step 7: Boxing and Final Touches
  9. Step 8: Demonstration
  10. Quick Solutions to Questions related to Palpita-me! ECG Project:
  11. Related projects

Summary of ECG on your laptop using PIC16F876 microcontroller

This article details a school project called "Palpita-me!" where students built a DIY ECG device to monitor heart activity on a laptop. The system uses an amplifier/filter circuit and a PIC microcontroller housed in a metallic box for safety. The guide covers schematics, SMT assembly using solder paste and a hot plate, troubleshooting 50 Hz noise with a notch filter, and final enclosure setup. A critical warning emphasizes that the device is not electrically isolated from power networks and should never be connected directly to a standard computer due to lethal shock risks.

Parts used in the Palpita-me! ECG Project:

  • ECG amplifier/filter board
  • PIC microcontroller (PIC16F876)
  • Metallic box
  • SMT components
  • Oscilloscope.dll software
  • Pneumatic solder paste dispenser
  • Vacuum pipette pick-and-place unit
  • Soldering iron
  • Multimeter
  • Kitchen hot plate
  • Passive 50 Hz notch-filter
  • Connectors and switches
  • Anti-static wrist strap

ECG on your laptop!

ECG on laptop

That's right! This Instructable shows you how to build a device that enables you to do an electrocardiogram on yourself, your family or your friends! All you need is intermediate-level knowledge on electronics, access to Ye' Ol' Electronics Shoppe (or online shopping if preferred) and a laptop.

The device is composed of an amplifier/filter and a microprocessor unit, everything surrounded by a metallic box to avoid interferences.

Safety warning: DO NEVER use devices like this with a regular computer, as it is not isolated from the electrical power network. It may kill you in case of an electrical anomaly!

Information about the authors: we are students living in Portugal and we developed this device for our school project named Palpita-me! (Beat in me!, says the heart). With our project we intend to alert the school community and the general public to the importance of the prevention of cardiovascular diseases. We are studying issues such as the circulatory system, its anatomy, physiology and measurable parameters, relevant diagnostic techniques (especially electrocardiography), hospital services and emergency, telemedicine, statistics and risk factors.

Take good care of your heart so that it will beat inside you for many happy years to come!

Feel free to visit our website and leave us a comment. We'd love hearing from you!

Step 1: Plans, Schematics and Board Layout

FT49ER9G8C40GYO.LARGE

Our ECG amplifier/filter board schematics is derived from an Analog Devices application handbook. We adapted and complemented it to suit our needs and we used PCB123 Schematic to draw the circuit schematics. Then, we used PCB123 Layout to draw the actual board. PCB123 is a great program and it's entirely free, so you can get it here.

The microprocessor unit was made by a member of our team some years ago and at its core lies a PIC microcontroller.

To plot data on a laptop screen, we needed software that could simulate an oscilloscope. For that we used the excellent (and free) Oscilloscope.dll, written by Michael Bernstein. We thank him for his kind support.

Furthermore, we also prepared a list of components that is just too big to show up here. From our website, you can download this list, every schematic and layout we've made.

Step 2: Getting Ready for the Build

If you would like to reproduce the unit with minimum effort, we suggest you work in a properly equipped workshop, as you are going to deal with SMT (Surface Mount Technology).
FQHRUB1G8C3JFA8.LARGERegarding equipment, we used:
- Pneumatic solder paste dispenser, activated by foot pedal;
- Vacuum pipette pick-and-place unit;
- Soldering iron and its support;
- Multimeter;
- Miscellaneous workshop tools, like tweezers, pliers and so forth.

We ordered the bare board from a local electronics store and the rest of the materials (components) from Farnell.

We advise the usage of an anti-static wrist strap and the help of a friend.

Step 3: Applying Solder

F0NALWTG8C40GXQ.LARGE

When you are ready to start assembling, the first step is to apply solder paste  on the proper spots, that is, on the component solder lands.

For that, we used our semi-automated solder paste dispenser, but you could also do it by hand carefully operating the syringe.

Step 4: Placing the Components

FUY3XKDG8C40GY3.LARGE

Again with the help of our dispenser equipment, we used a vacuum pipette to suck the tiny components and to place them according to the layout of the board. It is mostly a work of patience and precision.

In case you don't possess specialized equipment, use the tweezers and take your time.

Step 5: Melting the Solder

FNMIBXRG8C40GYP.LARGE

The last main assembly step consists of applying heat to the board, so that the solder paste melts and establishes perfect contact between the board's copper pads and the components' legs.

We used a simple kitchen hot plate to get 200º C or 392º F. The board heats up gradually until the solder paste gets shiny as we know it from finished boards.

After removal and cooling down, we soldered via wires on some holes and the input and output cabling for the preliminary testing.

Step 6: Tests and Troubleshooting

FRF4YQJG8C40H17.LARGE

After the assembly session, we ran tests and realized that our wave was suffering from 50 Hz noise originated by power conductors all around us. We then decided to build a small, passive 50 Hz notch-filter, as seen in one of the Intro pictures.

Even using the filter and a protecting metal box, due to the high amplifier gain we should operate our ECG apparatus away from cables, computers, projectors, etc.

Step 7: Boxing and Final Touches

FWB6JUZG8C3JFHY.LARGE

We bought a metal box from our local electronics store and, with the help of an employee from our school, we managed to pierce it with the right holes for connectors, switches and so on.

Then, we placed stickers made by ourselves to show which plug is which.

Our device is now ready to roll!

Step 8: Demonstration

FMW1G7KG8C3JFIR.LARGE

We enjoyed very much this activity of our project. It was a way of applying technology to medical science and showing people their heart's electrical activity.

Below, we show a video demonstrating the operation of our ECG device:

Thanks for reading and have fun with ECG on your laptop! Again, feel free to visit our website and leave us a comment. We'd love hearing from you!

 

Source : ECG on your laptop using PIC16F876 microcontroller

  • What is the main purpose of this project?
    The project aims to alert the community to the importance of preventing cardiovascular diseases by allowing users to perform electrocardiograms on themselves or others.
  • Can I connect this device to a regular computer?
    No, you should never use devices like this with a regular computer as it is not isolated from the electrical power network and may kill you during an anomaly.
  • How did the authors draw the circuit schematics?
    They used PCB123 Schematic to draw the circuit schematics derived from an Analog Devices application handbook.
  • What software was used to plot data on the laptop?
    The authors used the free Oscilloscope.dll written by Michael Bernstein to simulate an oscilloscope.
  • How can I apply solder paste if I lack specialized equipment?
    You can operate a syringe by hand carefully instead of using a semi-automated dispenser.
  • What temperature was used to melt the solder paste?
    The team used a kitchen hot plate to heat the board to 200º C or 392º F until the solder paste became shiny.
  • What caused the 50 Hz noise in the initial tests?
    The wave suffered from 50 Hz noise originated by power conductors all around the testing area.
  • Why was a metal box used for the device?
    The metallic box surrounds the electronics to avoid interferences and protect the user.
  • Is prior experience required to build this device?
    Yes, intermediate-level knowledge on electronics is required to build this device.
  • What specific microcontroller lies at the core of the unit?
    The microprocessor unit features a PIC microcontroller, specifically identified as the PIC16F876 in the source text.
Development Boards & Kits · PIC16F876A

Ultrasonic Range Finder Circuit AD605 PIC16F876

Ultrasonic distance measurement, detection circuit pic16f876 microcontroller and ad605 (Dual Low Noise Variable Gain Amplifier singlesupply) integrated circuit diagrams used are C...

Sensors & Temperature · PIC16F876A

Interfacing Temperature Sensor with Microchip PIC16F876A

The tutorial aims at providing the necessary information for interfacing an analog type temperature sensor with a Microchip PIC Microcontroller. PIC (Peripheral...

Beginner Tutorials · PIC16F876A

Homemade Scope Clock DG7 tube and PIC16F876

Powersupply and CRT deflection and microcontroller test circuit. I was lucky to purcase two used but working DG7 tubes and a transformator...

Sensors & Temperature

Spectrum Analyzer using TMS320F28023DA with Proteus Simulation

Introduction This project demonstrates a real-time audio spectrum analyzer using the TMS320F28023DA Piccolo microcontroller, simulated in Proteus VSM. The system captures an...

Sensors & Temperature

DHT22 Low Cost Humidity Sensor using PIC18F25K20 with Proteus Simulation

IntroductionThis microcontroller project demonstrates how to interface a DHT22 (RHT03) digital temperature and humidity sensor with a PIC18F25K20 using Proteus simulation.The project...

Sensors & Temperature

Crafting a Microcontroller-Based Temperature Monitoring System

Abstract As technological advancements progress, processes become increasingly intricate, demanding a corresponding expansion in the parameters necessary for efficient analysis. Data acquisition,...

Ibrar Ayyub

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough...