I never had any chance yet to play with function generators, but I know what they. What I don't see at this moment is their practical usage in digital electronic. For audio I can see it probably for comparison of how good or bad your amp is by comparing the outputs for example, and for digital I saw that some of these function generators can record a digital signal, and later reproduce it on demand and in that case they would act as simulators (right?), but what would be some other practical scenarios?
Electronic – Waveform Function Generator – Practical Usage
function generator
Related Solutions
No. GNU Radio is not the best way to go about making a simple oscilloscope + function generator setup BUT it may suit what you are trying to do, which is actually something slightly different.
If you are specifically aiming at producing real-time real-world arbitrary waveform generation and basic oscilloscope functionality where speed is not critical and you have a PC available, then there are numerous free or low cost software solutions available that directly target these capabilities, either separately or in combination. Gargoyle and friends will tell you about many of these by using search strings such as
arbitary waveforms soundcard
The above produced either directly or via linked links (examples only) the references listed at the end of this post under "OSCILLOSCOPES & FUNCTION GENERATORS:"
BUT
GNU Radio is targeted more towards RF solutions than towards what you appear to be wanting to do. It essentially attaches processing software to an ADC/DAC front end of your choice with a minimum of intervening hardware an with a software radio as the mos likely target - BUT not the only one.
As it is RF focused in original mindset the most supported hardware look suspiciously like multi MHz RF front ends and costs accordingly, BUT it does have sound card drivers and also has emulation capability allowing complete software playing with no hardware at all.
So, yes, it will do what you want.
It is Python based. Whether it uses NumPy arrays or other means of data presentation is entirely your choice.
GNU Radio oscilloscope module usrp_oscope.py
Usefully, GNU Radio has an oscilloscope module available - usrp_oscope.py - here - 350 lines of Python code.
Oscilloscope module
Basic Q & A here
An excellent introduction to what GNU Radio does (and doesn't) do is here
[http://www.gnu.org/software/gnuradio/doc/exploring-gnuradio.html]
A good overview of hardware supported here
[http://gnuradio.org/redmine/projects/gnuradio/wiki/Hardware] with mention of soundcard interfaces.
They note:
Most computers nowadays are shipped with a built-in sound interface or sound card. 16 Bit resolution at 44.1 kHz (kSPS) and two channels is a long available level that you can expect. Virtually every operating system supports this hardware out of the box, and it's sufficient for a lot of DIY and hobby applications. You can expect stereo (2 channels) input and output.
If the quality of a built in sound interfaces are not very expensively built and introduce noise or show bad frequency characteristics or degraded resolution, that is dynamic range. Fortunately, high quality sound interfaces are offered, like professional digital recording equipment, with more than a dozen channels, up to 24bit resolution and 192kHz sampling rate. These interfaces can be connected internally via PCI bus or externally via USB.
GNU Radio's own Wiki - excellent get you ging page here
"Exploring GNU Radio" by Eric Blossom - the 'father' of the GNU Radio concept here
Python writing tutorials for GNU Radio here . They say:
Welcome, GNU Radio beginners. If you are reading this tutorial, you probably already have some very basic knowledge about how GNU Radio works, what it is and what it can do - and now you want to enter this exciting world of Open Source digital signal processing (DSP) yourself.
This is a tutorial on how to write applications for GNU Radio in Python. It is no introduction to programming, software radio or signal processing, nor does it cover how to extend GNU Radio by creating new blocks or adding code to the source tree. If you have some background in the mentioned topics and are starting to work with GNU Radio, this probably is the correct tutorial for you. If you don't know what a Software Radio is or what a FIR filter does, you should probably go a few steps back and get a more solid background on signal processing theory. But don't let this discourage you - the best way to learn something is by trying it out.
Although this tutorial is designed to make your introduction to GNU Radio as easy as possible, it is not a definitive guide. In fact, I might sometimes simply not tell the real truth to make explanations easier. I might even contradict myself in later chapters. Usage of brain power is still necessary to develop GNU Radio applications.
Wikipedia / GNU Radio here
- "OSCILLOSCOPES & FUNCTION GENERATORS:"
Free "Soundarb" soundcard based function generator. here
1
- SoundArb is a free program from David Sherman Engineering Co. that allows you to control a PC sound card like you would a conventional function generator. You can select standard waveforms, load arbitrary waveforms from a text wave table file, control the frequency and amplitude of the waveform, and select from a versatile set of triggering modes. With a stereo sound card, one channel can be used as a "sync" output.
Free software download here
XOSCOPE - GNU Sourceforge Oscilloscope here
- xoscope is a digital oscilloscope using input from a sound card orEsounD and/or a ProbeScope/osziFOX and will soon support Bitscopehardware. Includes 8 signal displays, variable time scale, math,memory, measurements, and file save/load.
Opencircuits.com/Oscilloscope - vast range of oscilloscopes including open source hardwrae, sound card based, more. Superb. Here
Free miniscope pc oscilloscpe front end here
This offering via EDN may be free Program turns PC sound card into a function generator with softwarehere
Wikipedia provides this introduction which in turn links to
Virtins Sound Card Signal Generator 3.2. Typical lowish but note free commercial offering. Free trial . $20 ish ull version here . Many siilar availabnle. Many free.
This handbook for a commercial product but with some good related material here
DIY Verilog FPGA implementation
Instructable AWG using an AVR microcontroller. Not quite what you want but shown minimalist hardware that can be used with no PC here
500kHz is a ways past the maximum specified frequency for square waves for this generator: 100kHz. It appears to have a single-pole RC of about 3.5µs, which would work great for a 0.35/(3.5µs)=100kHz square wave. The output may have a LPF for slew limiting. Also, it is a 50Ω source, so it should be terminated properly to avoid ringing. Try using the TTL and CMOS waveforms, too. B&K have put together this document: Function & Arbitrary Waveform Generator Guidebook .
The external CMOS inverter is not a 50Ω source -- it's source impedance is only a few ohms at most (for low currents) due to VCC and ground impedances and FET RON equivalent resistances. Notice that the output duty cycle isn't 50%, and the edges are ringing.
Best Answer
You are right to say that they are very useful in audio applications. But function generators are also very useful for filter design, Analog-to-digital converters, switched-mode power supplies, and many more.
Here is one very useful example for a power supply unit. Half-bridge, full bridge rectifiers produce a DC output essentially from an AC signal. To raise the AC signal above 0V, you would indeed use a clamping circuit.
Another example I can think of right now would be Analog-to-Digital Converters (ADC). You could have a 10 bits ADC just like what the Arduino Uno's are. Some the analog voltage would be assigned to a bit. For example, 1024 would be 15V and 0 would be 0V. 512 would be 7.5V.
A third example is filters. Low-pass, high-pass, band-pass, and band-stop filters are some you could design and use an AC waveform from the function generator to test it.
Finally, function generators are usually capable of generating a clock signal (square waveform) which can be useful for digital electronics and memory circuits like Flip Flop, Shift registers, and many more. Here is what a function generator can typically generate: