Sound card based signal generators
Posted by Matthew
Previously, E-DSP visited the possibility of using your sound card as a signal/function generator. I was curious about the results, but did not have a Windows machine close by to test it. After some searching, I found a Linux alternative and was able to test the limitations of my Sound Blaster Live!
SigGEN: A Linux signal generator

SigGEN is a fairly advanced signal generator designed specifically for Linux. It is able to generate sine, cosine, triangle, sawtooth, square, and pulse waves as well as white noise and frequency sweeps. It also supports separate waves on each stereo channel and setting phase differences between them.
Digital Signal Generator (Windows)

I was also able to find a Windows-based solution more advanced than E-DSP’s. It is able to generate sine, square, and triangle waves as well as chirp signals and noise.
Reproduced wave accuracy
Modern computers have no problem accurately calculating a reproducing small signals. Therefore, any limitations will lie in the sound cards specs. Most modern sound cards have a 16-bit digital to analog converter (DAC), and 24-bit DACs are becoming more popular. Even 16 bits of accuracy is far better than the 10 bits common on most embedded microcontrollers.
The major limiting factor in wave reproduction is the sound cards sampling frequency. It is limited to 48kHz. Hence, any frequencies near or above 24kHz are extremely hard (if not impossible) to reproduce without additional hardware. This limit is rather low and limits the generator usefulness as a high frequency signal generator.
Maximum deliverable voltage

I am sure that different sound cards are capable of delivering different voltages. My Sound Blaster Live! card was able to deliver four volts as seen above.
Maximum current and power
A sound card is also limited in the amount of power it can deliver. Once a voltage source reaches its power limit, it begins acting as a constant current source. It simply delivers less voltage to compensate for the limited current.
In order to test the sound card’s limit, a potentiometer is connected between the generated signal and ground. The resistance is then decreased until the current peaks and the voltage starts to decrease.

Once we find the point of maximum power, the potentiometer’s resistance is measured, and Ohm’s Law is used to find the current delivered. In this case, the resistance is 24.8K ohms. V = I*R tells us 0.16mA is being delivered. P = V*I = 0.6mW maximum power.
This is not a lot of current or power. This is why E-DSP reccommends an amplifier.








Hey, Good job. I liked this a lot, once again. I wrote an article about it, and sent your article into makezine.com. Hopefully it wil be picked up and give you a lot of hits.
try baudline it’s got a built in function/signal generator
For a nicer UI for a Linux signal generator, check out Signalgen http://www.arachnoid.com/SignalGen/
I like to use this program as a signal generator to test circuits, and use a sound-card based oscilloscope, Xoscope, to look at the output.
http://xoscope.sourceforge.net/
Enjoy!
I should mention that all of these voltages and currents are RMS values. They were measured with a sine wave output.
I will admit that was not the smartest thing that I ever did.