Ugenz Academy/IoT Tutorial

Function Generator

10 min read1,807 words

Reading progress

Keep learning

Function Generator in Electronics

1. Introduction to a Function Generator

A function generator is an electronic testing instrument that produces electrical signals with different waveforms, frequencies, and amplitudes. These signals are used to test, analyze, and troubleshoot electronic circuits.

A function generator can produce signals such as sine waves, square waves, triangle waves, and pulses. Engineers and students use these signals as inputs to circuits to observe how the circuits behave.

For example, if you build an audio amplifier, you can connect a function generator to its input and use an oscilloscope to observe the output signal.

2. Why Is a Function Generator Needed?

A function generator provides a controlled electrical signal for testing electronic devices.

Its main purposes include:

  • Testing amplifiers and filters.
  • Checking circuit frequency response.
  • Generating clock-like and pulse signals.
  • Testing sensors and signal-processing circuits.
  • Producing input signals for oscilloscopes and other instruments.
  • Simulating certain signals during circuit development.
  • Troubleshooting analog and digital electronics.

Example: If you want to test whether an amplifier works at 1,kHz1\\,kHz, you can generate a 1,kHz1\\,kHz sine wave and apply it to the amplifier's input.

3. How Does a Function Generator Work?

A function generator creates an electrical signal and allows the user to adjust its characteristics.

A simplified signal-generation process is:

User Controls

Waveform, frequency, amplitude and offset

Signal Generation Circuit

Creates the requested waveform

Output Signal

Sent to the circuit under test

Modern function generators commonly use digital signal synthesis, such as Direct Digital Synthesis (DDS), to create accurate waveforms. Other designs use analog oscillators or a combination of digital and analog circuitry.

4. Main Parts of a Function Generator

B&K Precision 4045B - 20 MHz DDS Function Generator with ARB Function | TEquipment

tequipment.net

PartFunction
DisplayShows the selected signal settings
Waveform selectionSelects sine, square, triangle, or other waveforms
Frequency controlSets the number of cycles per second
Amplitude controlAdjusts the output signal level
Offset controlAdds a DC voltage to the waveform
Duty-cycle controlAdjusts pulse or square-wave timing, if supported
Modulation controlsVary a signal's properties for supported modulation types
Output connectorDelivers the signal, often through a BNC connector
Output enableTurns the signal output on or off

The available controls depend on the function generator model.

5. Types of Waveforms

A function generator can produce several kinds of electrical waveforms.

1. Sine Wave

Rohde & Schwarz HMO1002 Digital Oscilloscope | TEquipment

tequipment.net

A smooth periodic waveform commonly used for testing audio amplifiers, filters, and AC circuits.

v(t)=Vpsin⁡(2πft)v(t)=V_p\sin(2\pi ft)

2. Square Wave

Course: Circuiti digitali, porte logiche e famiglie

elisabettavannucchi.com

Alternates between high and low voltage levels. It is useful for testing switching circuits, logic inputs, and timing behavior.

3. Triangle Wave

Basic Waveform Analysis with an Oscilloscope - Technical Articles

allaboutcircuits.com

Rises and falls approximately linearly. It is useful for testing comparators, waveform-processing circuits, and some control systems.

4. Pulse Wave

Oscyloskopy cyfrowe - podstawowe parametry użytkowe | elektro.info

elektro.info.pl

Produces a pulse with a controllable duration or duty cycle, depending on the instrument. It is useful for triggering and testing digital circuits.

5. Ramp or Sawtooth Wave

RP2040 using Arduino IDE - Programming - Arduino Forum

forum.arduino.cc

Changes gradually in one direction and then returns rapidly, or vice versa. It can be used in timing, scanning, and signal-processing circuits.

Not every function generator supports every waveform.

6. Important Parameters of a Function Generator

When setting up a signal, several parameters determine its behavior.

ParameterSymbolMeaning
FrequencyffNumber of cycles per second
PeriodTTTime taken for one complete cycle
AmplitudeVpV_pPeak voltage measured from the waveform's reference level
Peak-to-peak voltageV_ppV\_{pp}Difference between maximum and minimum voltage
DC offsetV_offsetV\_{\text{offset}}Constant voltage added to the waveform
Duty cycleDDPercentage of a period during which a pulse is active
Phaseϕ\phiRelative timing position of a periodic waveform

Frequency and Period

Frequency and period are related by:

f=1Tf=\frac{1}{T}

For example, if a function generator produces a signal with a frequency of 1,kHz1\\,kHz:

f=1000,Hzf=1000\\,Hz T=11000=0.001,s=1,msT=\frac{1}{1000}=0.001\\,s=1\\,ms

Each cycle takes 1,ms1\\,ms.

Amplitude and Peak-to-Peak Voltage

For a sine wave centered at 0,V0\\,V:

V_pp=2VpV\_{pp}=2V_p

If the peak amplitude is 2,V2\\,V, then:

V_pp=2×2=4,VV\_{pp}=2\times2=4\\,V

The signal varies from −2,V-2\\,V to +2,V+2\\,V.

This relationship assumes a waveform centered at zero and does not account for a DC offset.

7. Understanding DC Offset

A DC offset shifts a waveform up or down by adding a constant voltage.

For a sine wave:

v(t)=Vpsin⁡(2πft)+V_offsetv(t)=V_p\sin(2\pi ft)+V\_{\text{offset}}

Suppose a signal has:

  • Peak amplitude: 2,V2\\,V
  • DC offset: 3,V3\\,V

The minimum voltage is:

V_min⁡=3−2=1,VV\_{\min}=3-2=1\\,V

The maximum voltage is:

V_max⁡=3+2=5,VV\_{\max}=3+2=5\\,V

The signal therefore varies from 1,V1\\,V to 5,V5\\,V.

DC offset is useful when testing circuits that require signals to remain within a particular voltage range. Always ensure the output stays within the input limits of the circuit being tested.

8. Understanding Duty Cycle

Duty cycle describes how long a pulse signal remains active during one period.

D=T_ONT×100%D=\frac{T\_{\text{ON}}}{T}\times100\%

Where:

  • T_ONT\_{\text{ON}} is the active pulse duration.
  • TT is the total period.

For a square wave with a 10,ms10\\,ms period and a 5,ms5\\,ms high interval:

D=510×100%=50%D=\frac{5}{10}\times100\%=50\%

A 50% duty cycle means the signal is high for half the period and low for the other half.

Duty-cycle adjustment is especially useful when testing digital circuits and PWM-based control systems.

9. Function Generator vs. Oscilloscope

These instruments are often used together, but they perform different jobs.

FeatureFunction generatorOscilloscope
Main purposeProduces test signalsDisplays and measures signals
Generates a waveformYesUsually no
Displays input waveformsNot its main purposeYes
Frequency controlSets output frequencyMeasures or analyzes frequency
Amplitude controlSets output amplitudeMeasures voltage amplitude
Common applicationProvides a test inputObserves the circuit response

Simple way to remember:

  • A function generator creates the signal.
  • An oscilloscope observes the signal.

10. Function Generator vs. Signal Generator

The terms are closely related, and their meanings can overlap.

FeatureFunction generatorRF or specialized signal generator
Main purposeGeneral-purpose waveform generationSpecialized signals for particular systems
Typical signalsSine, square, triangle, pulsesRF carriers, digitally modulated signals, specialized test signals
Common applicationsBasic electronics and circuit testingWireless, radio-frequency and communication testing
Important specificationsFrequency range, amplitude, waveform qualityFrequency range, phase noise, modulation quality, spectral purity

Modern instruments may combine both functions. The actual capabilities depend on the model.

11. How to Use a Function Generator

Follow these steps to test a low-voltage electronic circuit.

  1. Connect the function generator's output to the circuit input using a suitable cable.
  2. Connect the circuit and instrument grounds appropriately.
  3. Select a waveform, such as a sine wave.
  4. Set the required frequency, for example 1,kHz1\\,kHz.
  5. Set a small amplitude suitable for the circuit.
  6. Set the DC offset if needed.
  7. Enable the output.
  8. Observe the input and output using an oscilloscope.
  9. Increase the amplitude only if the circuit's input ratings allow it.

Example: Testing an Amplifier

Suppose you want to test an audio amplifier.

  • Select a sine wave.
  • Set the frequency to 1,kHz1\\,kHz.
  • Set a low input amplitude, such as 100,mV100\\,mV peak-to-peak, if appropriate for the amplifier.
  • Connect the signal to the amplifier input.
  • Observe the output on an oscilloscope.

If the amplifier is operating correctly, the output should generally have a similar waveform with greater amplitude, subject to the amplifier's gain, bandwidth, and operating limits.

12. Applications of Function Generators

Function generators are used in many fields of electronics.

  • Audio electronics: Testing amplifiers, filters, and audio circuits.
  • Communication systems: Testing supported modulation and signal-processing circuits.
  • Digital electronics: Generating pulses and clock-like signals.
  • Power electronics: Testing control circuits and feedback responses with appropriate equipment.
  • Educational laboratories: Demonstrating frequency, amplitude, and waveform concepts.
  • Sensor circuits: Simulating certain electrical input signals.
  • Circuit troubleshooting: Applying known inputs to identify faults.

A function generator cannot directly simulate every real-world sensor. For example, a temperature sensor may require a specific resistance or digital communication protocol rather than a simple voltage waveform.

13. Advantages and Limitations

AdvantagesLimitations
Produces repeatable test signalsOutput amplitude and frequency range are limited
Allows precise adjustment of signal parametersAdvanced models can be expensive
Supports testing of many circuit typesOutput impedance affects the actual signal delivered
Works well with oscilloscopesSome waveforms may contain distortion or unwanted harmonics
Helps diagnose circuit behaviorCannot automatically reproduce every real-world signal

14. Safety and Practical Considerations

  1. Check the input voltage limits: Ensure the generated signal cannot damage the circuit under test.
  2. Understand output impedance: Many instruments specify amplitude for a particular load, often 50,Ω50\\,\Omega. The actual voltage can differ when the load changes.
  3. Check DC offset: An excessive offset can push the signal outside the circuit's safe input range.
  4. Use correct grounding: A grounded instrument output may create an unwanted connection to earth.
  5. Start with a low amplitude: Increase it gradually while observing the output.
  6. Avoid direct mains connections: A standard function generator is not intended to be connected directly to household mains voltage.
  7. Check maximum frequency: The instrument may not generate accurate waveforms beyond its specified frequency range.

15. Summary

A function generator is an essential testing instrument that produces electrical waveforms at adjustable frequencies and amplitudes. It is used to test amplifiers, filters, digital circuits, and many other electronic systems.

The most important settings are waveform type, frequency, amplitude, DC offset, and duty cycle. When used with an oscilloscope, a function generator allows you to apply a known signal and observe how a circuit responds, making it a valuable tool for learning electronics and troubleshooting circuits.

Keep learning. Keep building. Keep growing.

© 2026 Ugenz Academy