Generating electrical signals with my sound card?

In summary: Hz square wave that is bipolar and assymetric. 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)The biggest problem is that your sound card's input is "capactively coupled," meaning
  • #1
Kinslayer
3
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 assymetric. 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 alot!
Gadi
 

Attachments

  • wave.jpg
    wave.jpg
    5.6 KB · Views: 484
Last edited:
Engineering news on Phys.org
  • #2
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.
 
  • #3
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.
 
  • #4
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
 
  • #5
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?)
 
  • #6
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!
 
  • #7
I wouldn't doubt it a bit if the soundcard's output is also capacitively coupled.

- Warren
 
  • #8
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:

1. How can I generate electrical signals with my sound card?

To generate electrical signals with your sound card, you will need software that can control the output of your sound card. This can be done through coding or using a specific program designed for this purpose.

2. What types of electrical signals can be generated with a sound card?

A sound card can generate various types of electrical signals, including analog and digital signals. Depending on the capabilities of your sound card and the software used, you can generate a wide range of signals.

3. Can I use my sound card to generate signals for scientific experiments?

Yes, you can use your sound card to generate signals for scientific experiments. Many software programs allow for precise control and customization of signals, making it suitable for research purposes.

4. What are the potential applications of generating electrical signals with a sound card?

There are many potential applications for using a sound card to generate electrical signals. Some examples include audio signal processing, data transmission, and image generation.

5. Is it possible to damage my sound card by generating electrical signals?

Yes, it is possible to damage your sound card if you do not use appropriate software and settings. It is essential to understand the capabilities and limitations of your sound card and carefully follow instructions to prevent any damage.

Similar threads

  • Electrical Engineering
Replies
7
Views
986
  • Electrical Engineering
Replies
13
Views
1K
Replies
37
Views
3K
  • Biology and Medical
Replies
6
Views
303
  • Electrical Engineering
Replies
3
Views
759
  • Electrical Engineering
Replies
4
Views
968
Replies
12
Views
1K
Replies
3
Views
921
  • Electrical Engineering
Replies
28
Views
3K
Replies
14
Views
2K
Back
Top