I want to count pulses through sound-card of a PC or a smartphone's audio port. Two different pulses will originate from two LM331 and I can scale them to 1V or any amplitude.

I want to feed these pulses to the audio port of a sound card's channels. Then the rest is to software to count the pulses.

So far I plan to use this analog interface between the pulses and the audio jack and sound-card:

enter image description here

Do you think the topology is correct? How can I improve this interface for the noise? I am only interested to count pulses not to view any other signal.

Edit: R1 R2 sets the voltage at X.

enter image description here

  • \$\begingroup\$ This question would be much better if you explained why you chose to design it like this. \$\endgroup\$ May 18, 2017 at 10:17
  • \$\begingroup\$ And the frequency of these pulses is ??? \$\endgroup\$ May 18, 2017 at 11:00
  • \$\begingroup\$ @JImDearden Frequency of the pulses can be set from 100Hz upto 10kHz or more by LM331. I can adjust the freq. I mean. So lets call it "f" if you have an idea. \$\endgroup\$
    – user16307
    May 18, 2017 at 11:03
  • \$\begingroup\$ The reason I asked was if the frequency is in the audio band (as you've indicated) - no problem, if it was a very low frequency such as 0.1Hz then you'll need a different technique to get the pulse into an audio card. \$\endgroup\$ May 18, 2017 at 11:06
  • \$\begingroup\$ @JImDearden How about if it were a smart phone audio jack instead of a soundcard? Can I use the same interface? \$\endgroup\$
    – user16307
    May 18, 2017 at 11:08

1 Answer 1


Check what the input impedance of the sound card is. It may be that the signal will get significantly attenuated by the 22 kΩ in series. A common input impedance for "line" inputs is 600 Ω, for example.

I'd start with 1 kΩ in series followed by just two back to back diodes to ground. ±700 mV is still a substantial signal for line level audio, and totally overwhelming for a microphone input.

If you only have a microphone input, then add another resistor divider after the clipping diodes. ±10 mV is a strong microphone signal.

  • \$\begingroup\$ Should I match the series resistor to the input impedance of the soundcard? Is that something to do with max power transfer? \$\endgroup\$
    – user16307
    May 18, 2017 at 11:07
  • \$\begingroup\$ I edited my question regarding your answer. Please see my edit. Was that you suggested? And the voltage at X should not exceed 10mV(pulse amplitude in my case) right?. \$\endgroup\$
    – user16307
    May 18, 2017 at 11:44
  • \$\begingroup\$ @user: The diodes should be parallel, not series. \$\endgroup\$ May 18, 2017 at 11:48
  • \$\begingroup\$ I see thanks, I changed that. Hopefully makes sense now. \$\endgroup\$
    – user16307
    May 18, 2017 at 11:52

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.