ECG Wave form on oscilloscope with PIC?

Thread Starter

Pinnacle187

Joined Apr 28, 2016
16
Hello everyone, does anyone have an idea how to display an Electrocardiogram waveform on an oscilloscope using a PIC16F88 or 16F84a. I have a the idea of how the physical conection of the PIC should be, but I have no idea how to display a wave form of funcion on an oscilloscope. This is the image of the waveform...:
 

ronv

Joined Nov 12, 2008
3,770
Hello everyone, does anyone have an idea how to display an Electrocardiogram waveform on an oscilloscope using a PIC16F88 or 16F84a. I have a the idea of how the physical conection of the PIC should be, but I have no idea how to display a wave form of funcion on an oscilloscope. This is the image of the waveform...:
I don't think you need a PIC, but you do need a good amplifier.
 

Sensacell

Joined Jun 19, 2012
3,432
Are you asking for a method of storing and playing back a sampled version of the waveform using a PIC?

The hardest part will be getting the waveform into a format that can be stored in memory.
Once you have that sorted, you can set up a timer that paces playback of sequential samples stored in memory, either via a PWM output or a DAC. (digital to analog converter) The waveform can be looped to create a continuous output.
 

Thread Starter

Pinnacle187

Joined Apr 28, 2016
16
Are you asking for a method of storing and playing back a sampled version of the waveform using a PIC?

The hardest part will be getting the waveform into a format that can be stored in memory.
Once you have that sorted, you can set up a timer that paces playback of sequential samples stored in memory, either via a PWM output or a DAC. (digital to analog converter) The waveform can be looped to create a continuous output.
Yeah essencially, I'm "simulating" and ECG (electrocardiograph). Yes, I knew I'd need to use a converter, but i don't know how to store a waveform, I'm a newbie at this.
 

AlbertHall

Joined Jun 4, 2014
12,345
Can I also mention safety here. There must be no risk of high (mains) voltages getting to pads connected across someone's heart. The amplifier and PIC can easily be battery powered but unless the 'scope is battery powered it should be isolated from the rest of the circuitry - probably easiest using opto-isolators.
 

Thread Starter

Pinnacle187

Joined Apr 28, 2016
16
Can I also mention safety here. There must be no risk of high (mains) voltages getting to pads connected across someone's heart. The amplifier and PIC can easily be battery powered but unless the 'scope is battery powered it should be isolated from the rest of the circuitry - probably easiest using opto-isolators.
You are right really, but I only intend to see thewaveform in the scope, and not conect anything to the peron; it's more like simulatine the waveform.
 

AlbertHall

Joined Jun 4, 2014
12,345
So the waveform is a list of data points now?
The '88 has a PWM (use to output an analog voltage) and enough memory to store your waveform in.
 

DickCappels

Joined Aug 21, 2008
10,152
A classic approach that works well is to have a table of values, say 1/250 (a number out of the air) of a cycle. Every so many microseconds, fetch the next sample from the table and output it to a DAC. When you get to the end of the table, start over at the beginning. The start of a cycle would be a good time to send a trigger pulse to the scope. The waveform appears at the output of the DAC.

See the example in the text file below.
 

Attachments

Last edited:
Top