Generating electrical signals with my sound card?

Click For Summary

Discussion Overview

The discussion revolves around the challenges of generating and measuring electrical signals using a sound card, particularly focusing on the limitations of sound card inputs and outputs for handling square waves and DC signals. Participants explore the feasibility of using a sound card for both input and output of electrical signals, including the implications of current and voltage levels.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes connecting a device that emits a 0.5 Hz square wave to a sound card's mic-in, noting unexpected output behavior.
  • Another participant explains that sound cards are not designed to drive high current, suggesting the need for an amplifier capable of supplying up to 1A of current.
  • It is noted that the output observed is the derivative of a square wave due to the sound card's input circuitry, which may not handle square waves well.
  • A participant mentions that the sound card's input is capacitively coupled, preventing the transmission of DC signals and only allowing AC signals to pass through.
  • Further discussion reveals that using the sound card to generate a square wave results in a pulsing effect rather than a constant on/off state, raising questions about the limitations of audio equipment for generating constant currents.
  • One participant corrects their earlier statement about current levels, clarifying that the original device operates at up to 1000 microamps, which is within the sound card's output capability.
  • Questions arise about the relationship between amplitude and current, as well as the average voltage output of sound cards.
  • Suggestions are made for alternative methods to generate signals, including using a parallel port for signaling or pulsing a sine wave to achieve desired effects.

Areas of Agreement / Disagreement

Participants generally agree on the limitations of sound cards for handling certain types of signals, particularly DC and square waves. However, there are multiple competing views on the feasibility of using sound cards for generating electrical signals and the best methods to achieve this.

Contextual Notes

Limitations include the sound card's low-frequency bandlimit, which may restrict its ability to generate or measure signals accurately. The discussion also highlights the potential for confusion regarding current measurements and the definitions of terms used.

Who May Find This Useful

Individuals interested in electronics, audio engineering, or signal processing may find this discussion relevant, particularly those exploring the use of sound cards for non-audio electrical signal applications.

Kinslayer
Messages
3
Reaction score
0
Ok, admit to absolute naivety in this subject, so please excuse any glaring errors and ignorance in this question :)

I have a device which according the specs emits a 0.5 Hz square wave that is bipolar and asymmetric. The current ranges from 0 - 1000 mA.

Figuring that this was a safe enough current to play around with, I connected it to the mic-in on my soundcard (I don't have a line-in). As expected, I could hear a clicking sound every second. In a sound editing program, I see a relatively straight line at 0 with short spikes in 1 second intervals to either +1 or -1 (not exactly the square wave I was expecting, what do I call this?) (see attachment below)

Ok now here comes the real ignorance part: I was hoping that by playing back this sound file and connecting to the line-out, I could get the same effects as the original device. This doesn't happen. Why? :) (I have some ideas but I'd rather not voice them :) - it sounds exactly the same though).

For starters, I have err.. one of those screwdrivers witht he LED inside of it (what do you call these? :)), and used it to complete the circuit. In both cases, with no output the light remains on. With the original device, once I raise the current sufficiently the light is either on or off each second. From the PC, there is no effect.

What do I have to do/build/use to make this work?

Thanks a lot!
Gadi
 

Attachments

  • wave.jpg
    wave.jpg
    5.6 KB · Views: 554
Last edited:
Engineering news on Phys.org
Your sound card is not designed to drive high current, it can maybe supply 20mA or whatever a set of headphones/speakers would need. What you'd need is an amplifier with a gain of 1 but with the ability to supply up to your 1A of current. A bigger audio amplifier should be able to handle this without too much of an issue.

You're referring to a test light (screwdriver with light bulb) and these are ok if you need to test an old car's wiring, a car made before the 1980s. But test lights are really not a very good way to test electronics, they use a large amount of current and can damage circuits. A digital voltmeter is a much better choice, their high internal resistance presents a load that won't affect circuits and or allow any current to flow.
 
Your output is the derivative of a square wave. This would be due to the nature of you sound cards input circuitry. Typically audio circirts do not do good square waves.
 
The biggest problem is that your sound card's input is "capactively coupled," meaning the sampling circuitry is connected to the outside world through a capacitor. This prevents the transmission of DC, and only permits the transmission of AC signals. This is done to remove any possible DC component of a powered microphone so it doesn't saturate (or damage) the rest of the circuitry.

In the context of sound, the DC component is unwanted and inaudible anyway: it corresponds to a frequency of 0 Hz.

You're not going to be able to use a sound card to "scope" DC signals.

- Warren
 
Hi Guys,

Thanks for all the help. I still have some more questions :)

Ok so using my sound card's input as a scope or even "recording device" for electrical signals is out. Let's focus on using it to generate signals. Say I generate a perfectly square wave using a sound editor.

If I rig this up to a test light (sorry it's all I have with me right now) I would expect the same results as the original device (light on, light off, at 1 second intervals), but I seem to be getting something resembling the first recording I made: the light is mostly constant but pulses to brighter and back or off and back at 1 second intervals (this is while using a low powered amp).

So, am I out of luck here? When Integral said that "audio circuits don't make good square waves" - I'm guessing this is for output aswell? I noticed that if I plugged in the original device through the amp, the test light behaved the same way.

So the main question is: Is it impossible using audio equipment to generate a constant current (if that's the right word) of either a positive or negative polarity? It can't seem to maintain the signal (?) and it spikes rather than holding it at a constant.

And, secondary question: is there any way around this? (some kind of circuit or something that I can build so I can still use my PC to generate the waves?)
 
Oops! I seemed to have confused microamps and milliamps in my original post; sorry! The original unit seems to run at up to 1000 uA. So if my sound card runs at 20mA, this means I can still generate a signal with atleast the required current if not the right wave?

That's the more important question... the less important ones for those of you with the extra time, and if my terminology is right. Is the amplitude of the soundwave the current of the electrical signal? Does anyone know the average voltage output of sound cards? Thank you!
 
I wouldn't doubt it a bit if the soundcard's output is also capacitively coupled.

- Warren
 
The soundcard is likely has a low-frequency bandlimit - it might go as low as 20Hz but it might be higher than that and the capacitor sized for this frequency.

You can use a soundcard for some signal measurements, look up winscope online and its a pretty nice little interface. But just like how the soundcard might not be viable above 20KHz (or maybe lower like 10KHz) the bandwidth is going to have a limit on the bottom end as well. Different cards behave differently.

If all you need is pulses, you could always just simply pulse the signal coming out. The light bulb will work fine with an AC source, they work just fine doing that all day. Maybe try pulsing a sine wave of 50Hz or slightly higher and it should be fast enough to not see any pulsing.

That, or you could build an amplifier and use a pin on the parallel port (TTL level) to signal on/off at nearly any frequency below the ECP or whatever high frequency limit your hardware would have.
 
Last edited:

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
13
Views
3K
Replies
37
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 27 ·
Replies
27
Views
5K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 14 ·
Replies
14
Views
5K