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
User discussion here and 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.
Basic tutorial
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
For a low distortion audio sinewave, the Wien Bridge oscillator is widely used:
The RC filters provide a 0 degree phase shift at the desired frequency providing positive feedback to keep the oscillation going. You can think of them like a high pass filter followed by low pass filter to give a bandpass response.
The negative feedback needs an exact gain of 3. Since component values vary in practice, we can't just use two resistors, we need an AGC (automatic gain control) In the circuit shown this is achieved using the lamp as the bottom of the resistive divider. The lamp is like a resistor with a PTC (positive thermal coefficient) or a PTC thermistor. So when the voltage rises on the output, the lamp heats up and the resistance rises. This causes the voltage drop across it to rise and more negative feedback to be applied to the opamp inverting input, therefore reducing the gain and keeping the circuit stable.
The frequency is controlled with a dual gang pot (VR1A and VR1B)
The circuit shown should give from ~145Hz to ~1590Hz. Obviously you can adjust the component values to give different ranges. The formula is: f = 1/(2 * pi * R * C) with R1 = R2 and C1 = C2.
So for the pot at max (100k + 10k) we get:
1 / (6.28 * 10e-9 * 110e3) = 144Hz
and with the 100k pot at minimum (10k) we get:
1 / (6.28 * 10e-9 * 10e3) = 1592Hz
ESP has a some good info on audio oscillators and plenty of example circuits.
The other option if you are familiar with microcontrollers is digital synthesis. You can get far more control but you need a quality DAC to give comparable THD to the circuit above.
I made a little audio test oscillator which gave excellent results from a dsPIC33FJ64GP802 which has 2 good quality 16-bit audio DACs onboard. Simply feed the outputs into an opamp (and write the code of course)
There are also function generator ICs out there that could do the job, have a look on Mouser, Farnell, etc. You could also add a (preferably quite sharp) low pass filter to Russell's 555 circuit to give you your sine wave if you don't mind a bit of extra distortion.
Best Answer
It really depends on the value that your trying to measure and to what accuracy you are trying to measure it. Realize that you are going to have noise in your system and probably the biggest limiting factor will be the resolution of your scope. Buy the function generator with a range based on the desired frequency below.
Here is a great article on how to measure capacitance or inductance. In short you are measuring the reluctance of the circuit.
If you know some algebra and want to use this method for capacitors instead of indicators it works well. You pick a point say 1/2 of your input voltage and then solve the equations for that. I usually do a sweep and then fit the entire equation to a curve so I have multiple points that average but only one point should suffice. $$ \left|\frac{Vscope}{Vgen} \right|= \left|\frac{\frac{j\omega}{C}}{R+\frac{j\omega}{C}} \right| = \left|\frac{\omega^2}{(RC)^2+\omega^2} +j\frac{RC\omega}{(RC)^2+\omega^2} \right| = ...= \frac{\omega }{\sqrt{(CR)^2+\omega^2}}$$
And then solving for \$ \omega\$ which is \$ 2\pi f \$ with R = 50
$$ \frac{1}{2}=\frac{\omega }{\sqrt{(CR)^2+\omega^2}} \Rightarrow C=\frac{\omega\sqrt{3} }{R} $$
Here is the circuit for reference
simulate this circuit – Schematic created using CircuitLab