# Recording DC-20Hz via soundcard

Discussion in 'Electronic Design' started by [email protected], Feb 26, 2007.

1. ### Guest

The solution presented at the following link describes how to
frequency modulate a DC-20Hz signal onto a relatively high carrier
frequency to get through the soundcard's AC-coupling capacitor, and
then demodulate the signal in software using Matlab.

Unfortunately I don't have Matlab, only Cool Edit Pro. If possible,
what sound editing functions are needed to demodulate the FM signal,
and what would the procedure be?

For example if I were to demodulate an AM signal in CEP, I would use
the "Distortion" function to chop the negative half cycles, then use
the "Filter" function to filter out the remainder of the carrier.

2. ### John BarrettGuest

FM in CEP -- I dont think so -- you have a transformation from tone to
voltage that you cannot "program" into CEP, as its based on the values of
the components used to adjust the VCO

Being a programmer, I would write code to sample the sound card directly and
implement a zero crossing detector.. since its a pure tone, that will give
me the frequency, and the math given in that article will give you the
inverse transform to convert that to a voltage. There is plenty of sample
source code out there for accessing the mic input as raw 8 or 16 bit data
using DirectSound, and with sample rates up to 44khz, you could run the VCO
from 100hz to 20khz range without dropping data needed to detect the zero
crossings.. then the only question is, how long a period of time do you
count crossings before converting -- the longer you count, the more accurate
the conversion.

If you have ever worked with C# -- I could scare up the capture routines
from one of my RF to Internet bridge applications .. get you going in the
right direction

3. ### Jan PanteltjeGuest

Wrong way around.
First use a low pas gradual filter,
then you are left with an amplitude modulated RF signal
(amplitude depends on frequency).

It is called 'flank' detection.

If you 'rectify' that you have the original sort of.
But it is not very linear.

Better to do it in software yourself.