07-22-2010 05:19 PM
The square wave generator in my example outputs a DC signal because the amplitude is set to 0 and the offset is set to 1. With 0 amplitude, you won't get any pulses. I did this just to plot a straight line between the triangle waves.
I don't understand what you mean by converting a square wave to an EKG signal. Is the square wave modulated in some form? Does the pulse duration and frequency change as the EKG voltage changes?
07-22-2010 05:22 PM
@tbob wrote:
I don't understand what you mean by converting a square wave to an EKG signal. Is the square wave modulated in some form? Does the pulse duration and frequency change as the EKG voltage changes?
Yeah, I didn't quite understand that either. I assumed it meant that the EKG pulse happened when the square wave was at the high value. Or maybe the EKG pulse was centered at the transition from high to low. Extremely vague statements.
07-22-2010 05:32 PM
@smercurio_fc wrote:
Yeah, I didn't quite understand that either. I assumed it meant that the EKG pulse happened when the square wave was at the high value. Or maybe the EKG pulse was centered at the transition from high to low. Extremely vague statements.
I'm thinking pulse modulation. Faster pulses for higher voltages. Or pulse width modulation, smaller pulse width for higher voltages. That would be quite a challange to demodulate a PWM signal. Maybe the OP can post a picture of the square wave and its corresponding EKG.
07-22-2010 06:12 PM
I don't think there is anything that will convert square wave to EKG, unless develop the code. My project is to convert square wave of 920 ms/cycle with 4.65 V peak to look a like EKG signal. It doesn't necessarily have to be real EKG signal, it just needs to resemble it ( basically talking about PQRST peaks).
Your program generates dc line. In my project I have to use the square wave (pulse) to get to look like EKG signal. When I use my above specifications, it gives me square waves on the final graph again. I was thinking if there is any way to cut off the peaks of those square waves and just make it look like yours, straight lines in beginning, between, and end. And then may be it will resemble EKG signal!
07-22-2010 06:20 PM
Why are you wanting to take a square wave and make it look like an EKG signal? This makes no sense. Whats the purpose of using a square wave to start off with? By passing it through a filter, you could round off a bit. But you can filter it though the wazoo and you won't get it to look like an EKG. I don't see any purpose of doing this when you can generate an EKG using my method.
07-22-2010 06:30 PM
I assumed it meant that the EKG pulse happened when the square wave was at the high value.
yes, the EKG signals need to be generated when the square waves are generated, simultaneously. We just need to have two graphs (square wave from the pump and the EKG) to show, that they are the same, just different forms.
07-23-2010 07:38 AM
I think you are saying that you want to generate an ECG simulation which is triggered by the square wave from the pump. In other words you want one ECG QRS cycle for each fluid pulse or each cycle of the square wave produced by the pump. Is this a correct interpretation of what you are asking?
Lynn
07-23-2010 08:52 AM
Yes, that is exactly what I meant. It just needs to simulate EKG look a like signal. Thank you!
07-23-2010 09:01 AM
And as I noted, you can change the look of the ekg signal that tbob generated (such as the peak values, frequency, and duty cycle) to match your square wave's frequency and duty cycle by changing the parameters. Did you even try?
07-23-2010 09:43 AM
I tried, but it's no good. It will give me squares (pulses) on the final graph. I don't want square waves to be displayed on the final graph except EKG signal. At the same time, I want second graph that is hooked up to the square generator, which display squares (pulses). So that it would seem the squares are converted to EKG.