I would like to generate simulated ECG (electrocardiogram) signals in PC software, but since they are subaudio, they cannot be output through the sound card.
My idea is to use the raw ECG signal as an envelope with which to amplitude modulate an audio carrier. This will then pass through the sound card's frequency limiting network.
Then a low pass filter can be applied external to the PC to recover the original subaudio ECG.
Can anyone please suggest what the best design approach would be for this project?
Google "DAQ" (for Data AQuisition) -- the same people who sell A to D hardware also sell D to A. If you stay away from National Instruments there's some affordable stuff out there.
Then a low pass filter can be applied external to the PC to recover the original subaudio ECG. You will need a precision rectifier as a demodulator before filter. A higher frequency ~ 10K will be easier to filter.
Can you throw money at the problem? A Rigol DG1022 is only ~$350 I've never used it's arbitrary waveform generator, but it does low frequencies just fine... (micro Hz.)
That can work, but the usual treatment (as when seismometers feed into analog tape recorders) uses FM (add a bias voltage, do V-F conversion with the guaranteed-always-positive V). AM modulation is more troublesome to demodulate.
Lab-control cards or USB I/O gizmos are easier to use in this kind of application. It costs some money, of course...
Thanks for the suggestion. However, I was planning to use a consumer audio editing application such as Adobe Audition which does not provide for frequency modulation by complex signals.
Several people have reasonably suggested I just buy a DAQ. But I would eventually like to build the demodulator into a stand-alone device and feed the signal in via an MP3 player.
I think what you'd want to do, is first determine the *highest* frequency that you want to pass through your low-pass filter... the highest component of the ECG signal that's required to be able to create the desired ECG waveform.
Then, use a carrier frequency at least 10 times greater than this... higher is better as it will be easier to filter out.
What you'll probably want to do, is "bias" the ECG waveform in the positive direction during synthesis, so that its value never falls below zero. Use this biased waveform as the amplitude value with which you modulate the carrier. This is similar to the trick that AM radio stations use, in order to prevent the RF carrier from trying to modulate down below cutoff (which generates a lot of splatter).
Then, you can feed the resulting audio signal to an op-amp-based precision rectifier / peak detector:
formatting link
Use their "peak detector" circuit, but replace the reset switch next to the capacitor with a resistor, so that the R/C circuit has a -3 dB rolloff point somewhat above the cutoff frequency you determined in the first step. The output of this circuit will be a copy of the biased-upwards ECG signal, with a bit of carrier ripple on it.
You can then subtract the bias value electronically (a simple DC-blocking series capacitor may be enough), and add an additional stage or two or six of low-pass filter to get rid of the remaining carrier.
My guess is that you could do a very credible job of this, with one dual op amp. The first section to act as the precision peak detector and with one stage of low-pass filtering (from the peak detector's RC time constant). The second section could be a two-pole low-pass filter.
Really? I once demodulated an AM signal by taping a solar cell to my oscilloscope screen. My teacher didn't understand why it worked, he thought the solar cell was acting as a rectifier, lol.
If you want to use an MP3 player, check out a few to see if they work at the lowest frequency you are interested in. The cutoff frequency is not a brick wall. It may not even be determined by the analog circuitry. The CODEC I use in one of my designs has an internal high pass filter which is only -3 dB at 3.4 Hz. I don't remember my ECG data. Is this low enough?
If not, you *will* need to modulate the data unless you find a unit that is DC coupled. AM modulation is *fine* and *easy* to demodulate. Radios don't get any simpler than AM types. For your purposes I am pretty sure you don't need anything more than a common diode and capacitor with an appropriate amp to drive the following circuit. Just modulate the signal to account for the detection circuit.
That may not work. Many CODECs have internal high pass filters on the ADC. If the OP needs frequencies below a handful of Hz, he may have no choice but to modulate the signal.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.