Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an oscillating waveform.

Status
Not open for further replies.

Cincinnati10

Mechanical
Apr 19, 2007
16
I want to create a waveform that resembles a human heartbeat. (At this point I don't need the little "ticks" before and after the beat.) My idea was to start with a square wave and "process it" so that on the rising edge of the pulse, my voltage would rise to a positive voltage and then quickly taper back to zero V. Then with the falling edge of the pulse, the voltage would fall to a negative voltage, quickly tapering back to the baseline of zero V.

As far as parameter values: I'm thinking the Voltage spikes would be +/- 5V on the low side to maybe +/- 12V on the high side.

Is there a simple method of producing this — with discrete components on a circuit board? …computer generated?

If it can be done with digital/analog components: Is there a simulation program that I can use to experiment with the circuit design so that I can see the output waveform result for various inputs and various circuit modifications?
 
Replies continue below

Recommended for you

I would use a micro for this... a look-up table would allow you to create whatever "heartbeat you want". You said "at this point", which tells me parameters are going to change in the future, so make the product as future-proof as possible and stay away from the simple solutions... you'll spend less time up front, but it will bite you in the rear as time goes on.

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
Several companies make arbitrary waveform generators.

Here's an example from Agilent, $1860.


One of the built in functions is "cardiac".

If you're designing a product that needs to generate such a waveform, I agree with Dan, use a micro, they're very versatile. But if you just need one box, to test or calibrate something, the development costs are likely to be much higher than just buying one.

Or you could download one or record one, like the first couple of seconds of before the talking begins, and there's a lovely heartbeat on Pink Floyd's "Dark Side of the Moon". Dump it onto a cheap mp3 player and use an opamp to boost the level to what you need.

(Legal disclaimer: Don't steal music! I'm only advocating whatever Fair Use you may have of legally purchased music.)
 
Hi Cincinnati10,

Yes, you can easily do what you want, with just a few passive components.

Assuming that you already have the square-wave generator (if not, that is almost trivial, too), the basic circuit would be a resistor in series with an inductor, between the signal generator's output and its ground (inductor to sig gen's gnd), with your "heartbeat" waveform appearing across the inductor. With a few more components, you can make it more realistic.

Go to and download the excellent, free LTspice circuit simulation software. Or use the URL below, for a direct link to the download.


I will come back, in a little while, with more details.

- Tom Gootee
 
I'm hoping to go into production. So I will look at the micro approach.

This is a shoestring back yard project at the moment. Still R&D.

It's been 12 years since I've done automation/programming. Is there a code/language of choice for this sort of thing?

Do you know a good resource for learning how to accomplish this?
 
If you don't want to get involved with the [μ]P world just yet, a trick I used a few times was to load a ROM with values corresponding to the values required and just step the memory addresses using a counter. The data out from the memory feeds a DAC. It was a simple way of generating three sinusoids with 120[°] shift which kept the phase relationship as clock frequency was swept. Old fashioned but effective for prototyping.


----------------------------------
image.php

If we learn from our mistakes I'm getting a great education!
 
to minimize the programming complexity, you could start with a BASIC Stamp processor from Parallax. There are also a number of PIC processors that could easily do the job. Max pulse rate is around 200 bpm, so the time resolution is not that critical. 16-bit amplitude is about max that's needed, since that's the max dynamic range of most audio CDs.

TTFN

FAQ731-376
 
jim, IR... I believe the OP is looking for an ECG/EKG of the heart, not an audio waveform of a heart thumping. The clue was his mention of "ticks" before and after the actual beats, so he's probably looking at things like ST segment elevation shapes, etc.



Dan - Owner
Footwell%20Animation%20Tiny.gif
 
Sure, but other than audio comments, a microcontroller with a D/A output still fits the bill.

TTFN

FAQ731-376
 
But the ROM/counter/DAC is likely to have finer resolution in time and in magnitude.

These days, for a product, I'd use a RAM and load it from flash at boot time... i.e., the boot time of the uc that I'd use to provide a simple UI and the ability to modify the waveform in place, save a copy to flash, or accept an entire new waveform and store that in flash.



Mike Halloran
Pembroke Pines, FL, USA
 
In an ECG wave form, the P-Q-R-S-T (the "beat" segment) remains pretty constant in time no matter what the heart rate is. What changes is the time from the last "T" to the next "P." Here the Microprocessor can do this but the ROM/Counter/DAC woud compress the entire waveform with increasing frequency.
 
It would be a trival task to incorporate a variable dwell time between 'beats' by inhibiting the counter for a definable period.

Many ways to solve this one! It just depends where the OP has existing skills and how much he wants to, or has time to, learn new ones.


----------------------------------
image.php

If we learn from our mistakes I'm getting a great education!
 
Hi,

Good ideas posted. The cheapest one I'm thinking is using some midrange PIC MCU (like 16F873A) with reference voltage test output, a simple on-chip 32 step resistor ladder. Then writing a static lookup table in ROM with your waveform values. As said before, You can control the table reading speed to get several frequencies and idle times.

The pin is a high impedance output, so you must add an opamp with some resistors and caps to build a low-pass filter, thus getting a buffered, cleaner signal.

This is another example with an external resistor ladder:


Good luck with this!

Regards,
Gonzalo
 
the old EKG's used a simple circuit to generate typical heart beat. It was used to test the amplifiers and calibration.
 
Clarification on Signal Requirement:

I need an electrical signal that is in the shape of a heartbeat pattern. I need it to carry 50-100W. I want to operate at 0V baseline. At t=0, I want to create a +5000V spike, and immediately drop it back to 0V, followed immediately by a -5000V spike, immediately returning to 0V. I want capability to repeat this cycle, varying the rest period between voltage spike pairs to generate a frequency between 40KHz and 1.5MHz.

I originally thought I would start with a +/- 12V signal and boost it to 5000V; I picked 12V because I planned on using an automotive coil to transform voltages from 12 to 5000V. However, since coils operate today in the magnitude of 25kV output, perhaps I could use a smaller input voltage to get the Vout in the 5000V range. I seem to recall the DACs I formerly used output 1-5V.

Although an ME, I have a little experience with Process Control. After reading the above responses, it seems doable for me to use a computer and a lookup table, or subroutine to create an output waveform.

It's been 20 years since I've done this sort of thing. Can anyone direct me to a resource or tutorial that might assist me?
 
Reminds me of the old movie (castle, lightning)...

"He's ALIVE!"

 
Everything eventually shows up on ebay.....

Just listed is an EXACT 202 complex waveform generator. This seems to have 40 pots that you can adjust manually to create a repeating waveform in steps. Got to love early easy to understand technology!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor