A function generator produces electrical waveforms — sine, square, triangle, sawtooth, and pulse — at precisely controlled frequencies and amplitudes. It is the electronic engineer's equivalent of a signal source: you use it to inject known, repeatable test signals into a circuit and then observe what the circuit does with them on an oscilloscope. Without a function generator, testing amplifiers, filters, controllers, and communication circuits becomes guesswork. With one, it becomes science.
What Waveforms It Produces
Every function generator produces at minimum three standard waveforms. Understanding when to use each waveform is as important as knowing how to set the frequency.
| Waveform | Shape | Primary Uses |
|---|---|---|
| Sine wave | Smooth, continuous oscillation. Pure single-frequency signal. | Audio testing, amplifier frequency response, filter characterisation, AC power simulation, communication circuit testing |
| Square wave | Instant transitions between two levels (high and low). Rich in odd harmonics. | Digital circuit testing, clock signals, rise/fall time measurement, transient response testing, power converter testing |
| Triangle wave | Linear rise and fall between two levels. Rich in odd harmonics but softer than square. | ADC/DAC linearity testing, sweep generation, ramp inputs to control systems, op-amp testing |
| Sawtooth wave | Linear rise, instant fall (or vice versa). Contains all harmonics. | CRT deflection, sweep circuits, power electronics analysis, harmonic content testing |
| Pulse wave | Square wave with variable duty cycle (on-time can be adjusted). | PWM circuit testing, servo and motor control, digital I/O testing, timing circuit verification |
| Noise (on advanced generators) | Random signal across a spectrum. | Immunity testing, audio amplifier stress test, EMC pre-compliance screening |
Key Specifications Explained
Frequency range: The minimum and maximum frequencies the generator can produce. A basic bench unit might cover 0.1 Hz to 1 MHz; a higher-end instrument may reach 30 MHz, 80 MHz, or beyond. Match the range to your circuit's operating frequency — you need to test above the highest frequency of interest.
Frequency accuracy and stability: How accurately the displayed frequency matches the actual output, and how stable it remains over time and temperature. Crystal-controlled generators are far more stable than RC-based designs. For audio work ±1% is acceptable; for communication testing or precise filtering measurements, you need ±0.01% or better — specified as ppm (parts per million).
Amplitude range: The output voltage from the minimum (often a few millivolts) to the maximum (often 10–20 V peak-to-peak into an open circuit). Note that most generators specify amplitude into 50 Ω or high impedance — see the impedance section below.
DC offset: The ability to add a DC voltage to the AC waveform. A ±5 V DC offset lets you, for example, produce a 1 V peak-to-peak sine wave centred at +2.5 V rather than at 0 V — essential for testing circuits that require a bias voltage.
Output impedance: Almost all laboratory function generators have a 50 Ω output impedance. This is designed to drive 50 Ω coaxial systems and transmission lines at RF. When you connect a 50 Ω generator to a high-impedance input (like an oscilloscope probe at 1 MΩ), the voltage at the output is approximately what the generator displays. When you connect it to an actual 50 Ω load, the voltage at the load is half the open-circuit value — the generator and load form a voltage divider. This catches out many beginners.
Rise time: For square waves, the time taken for the output to go from 10% to 90% of its final value. A fast rise time is essential when testing digital circuit timing and transient response. A 1 MHz bandwidth circuit requires rise times below about 350 ns; a 10 MHz circuit needs below 35 ns.
THD (Total Harmonic Distortion): For sine wave output, how much harmonic content is present in addition to the fundamental. A high-quality generator has THD below 0.1% — its sine wave is clean enough to test audio and signal processing circuits. A cheap generator with 3–5% THD will corrupt measurements where signal purity matters.
How to Use a Function Generator
- Set the waveform type: Select sine, square, or triangle using the function switch or menu.
- Set the frequency: Use the frequency dial or numeric keypad. Always confirm on the display. Start at a low frequency (e.g., 1 kHz) when testing an unfamiliar circuit.
- Set the amplitude: Turn the amplitude control to a safe, low level initially. For a circuit rated at 5 V, start with a 100 mV amplitude and increase gradually. Remember the 50 Ω loading effect if your load is not high impedance.
- Set DC offset to zero: Unless you specifically need a bias, centre the waveform at zero by setting offset to zero. An accidental large DC offset can damage sensitive circuits.
- Connect to the circuit: Use a BNC-to-probe cable or BNC-to-BNC with an appropriate adapter. The generator output is typically a BNC socket.
- Enable the output: On many generators the output is disabled by default — press the OUTPUT button.
- Monitor on an oscilloscope: Always verify the actual output waveform on an oscilloscope before trusting the generator's display. The displayed values are what the generator is attempting to produce; what arrives at the circuit depends on cable losses, loading, and impedance matching.
Attenuate rather than turn the amplitude knob to minimum
Frequency Sweep Mode
Advanced function generators (and DDS — Direct Digital Synthesis — instruments) include a sweep mode that automatically varies the frequency over a specified range, either linearly or logarithmically, over a programmable sweep time. This is invaluable for:
- Plotting the frequency response of an amplifier or filter on an oscilloscope without manually stepping through frequencies
- Identifying resonant frequencies in mechanical or electrical systems
- Characterising the bandwidth of a circuit in seconds rather than minutes
- Generating a swept-frequency audio signal for speaker and microphone testing
Connect the generator's sweep output to the oscilloscope's X input (external horizontal) and the circuit output to the Y input, and you get an analogue Bode plot on the oscilloscope screen — amplitude versus frequency.
AM and FM Modulation
Function generators with modulation capability can produce amplitude-modulated (AM) or frequency-modulated (FM) signals by accepting an external modulation signal through a second BNC input. These are used to:
- Test AM and FM demodulator circuits in radio receivers
- Simulate sensor outputs (many sensors produce frequency-modulated signals)
- Test lock-in amplifiers and phase-sensitive detectors
- Verify servo and PLL (phase-locked loop) circuit behaviour
DDS vs Analogue Function Generators
Traditional analogue function generators use RC oscillators that produce triangle waves, then wave-shaping circuits to convert them to sine and square waves. They are limited in frequency accuracy, sine purity at high frequencies, and feature set.
Modern DDS (Direct Digital Synthesis) generators use a digital-to-analogue converter (DAC) clocked by a crystal-controlled oscillator to produce waveforms by looking up sample values in a stored table. DDS generators offer:
- Precise frequency resolution (often 1 mHz or better) across the entire range
- Crystal-controlled frequency stability
- Arbitrary waveform capability (load any shape from a PC)
- Phase-locked dual channels (two synchronised generators in one box)
- Much better sine wave purity at frequencies above 100 kHz
The tradeoff is that DDS output has a staircase nature at very high frequencies (visible on an oscilloscope) and may require an output filter for sine waves near the Nyquist limit. For most bench work below 10 MHz, this is not an issue in practice.
Practical Tests Using a Function Generator
Amplifier bandwidth test: Feed a sine wave into the amplifier input. Increase frequency gradually while monitoring the output amplitude. The −3 dB frequency (where amplitude drops to 70.7% of its low-frequency value) is the bandwidth. A 10 MHz DDS generator and a 100 MHz oscilloscope can characterise most audio and instrumentation amplifiers completely.
Filter characterisation: Same method as above — the output amplitude vs. frequency plot is the filter's frequency response. Use the sweep mode for a continuous plot.
Rise time measurement: Apply a square wave at a frequency low enough that the circuit responds completely between edges (start at 1/100 of the expected bandwidth). Measure the 10%–90% rise time of the output waveform on the oscilloscope.
Crystal oscillator testing: Drive the crystal with a sine wave sweep and look for the series resonant frequency on the oscilloscope — the frequency at which the impedance is minimum and the output is maximum.