12
\$\begingroup\$

This is what I did

I read somewhere that the soundcard can handle about 3 volts , so I figured 2.5 V wouldn't hurt

I expected a nice square wave on my soundcard oscilloscope software but I'm getting this

enter image description here

What is happening ?

\$\endgroup\$
1
  • \$\begingroup\$ Well written question. \$\endgroup\$
    – KalleMP
    Commented Jun 19, 2016 at 18:26

1 Answer 1

25
\$\begingroup\$

AC Coupling.

Sound cards have a capacitor in series with the input which acts as a high pass filter, removing frequencies lower than around 20Hz.

You appear to be feeding in a signal of only 2Hz which is basically going to get filtered into nothing more than an impulse response at each transition as you are seeing. The reason you see the impulse is that a step change in the signal voltage has a large bandwidth requirement - having many higher order harmonics which will not be filtered out.

\$\endgroup\$
10
  • 3
    \$\begingroup\$ Ah ! I see , Thanks , it works perfectly now that I have increased the frequency . \$\endgroup\$
    – Vrisk
    Commented Jun 19, 2016 at 18:09
  • 5
    \$\begingroup\$ @AnirudhGanesh AC Coupling. You signal that goes from 0-5V is essentially a +/-2.5V signal with a 2.5V DC offset. What frequency is DC? :) \$\endgroup\$ Commented Jun 19, 2016 at 18:13
  • 1
    \$\begingroup\$ .... 0 ? wouldn't that mean the DC part will be filtered out completely and nothing else would happen ?? \$\endgroup\$
    – Vrisk
    Commented Jun 19, 2016 at 18:24
  • 4
    \$\begingroup\$ @AnirudhGanesh correct, the DC part goes away. So you are left with just the +/-2.5V square wave, hence you see negative. \$\endgroup\$ Commented Jun 19, 2016 at 18:25
  • 2
    \$\begingroup\$ Not quite - the capacitor-resistor combo means that changes that are fast enough get passed through, but levels decay rapidly to 0V on the soundcard side of the capacitor. So the rising edge of the square wave turns into an upward spike. Then it decays. Then the falling edge turns into a downward spike. \$\endgroup\$
    – pjc50
    Commented Jun 19, 2016 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.