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 ?

  • \$\begingroup\$ Well written question. \$\endgroup\$ – KalleMP Jun 19 '16 at 18:26

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.

| improve this answer | |
  • 3
    \$\begingroup\$ Ah ! I see , Thanks , it works perfectly now that I have increased the frequency . \$\endgroup\$ – Vrisk Jun 19 '16 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\$ – Tom Carpenter Jun 19 '16 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 Jun 19 '16 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\$ – Tom Carpenter Jun 19 '16 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 Jun 19 '16 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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