Content area
A function generator produces square, sine, and triangular waveforms across frequencies up to 100kHz. It plays a vital role in testing, repairing, and developing electronic equipment, serving as a signal source for amplifier testing and frequency response analysis. At its core, an oscillator generates sine, square, or triangular waves, which are transformed into other waveforms through waveshaping circuits. The breadboard prototype demonstrates this functionality, with the sine waveform output captured on an oscilloscope, as shown in Fig. 1.
Circuit and working
Fig. 2 shows the circuit diagram of the function generator using the ICL8038, which produces sine, square, and triangular waveforms simultaneously with minimal external components. Capacitor C1 is charged and discharged by two current sources.
The ICL8038 incorporates two built-in constant current sources: Current Source 1 operates continuously, while Current Source 2 toggles via a flip-flop. Initially, Current Source 1 charges capacitor C1, causing a linear voltage increase. Upon reaching two-thirds of the supply voltage, comparator 1 triggers the flip-flop, engaging Current Source 2 to discharge the capacitor at twice the rate of Current Source 1. The discharge continues until the voltage drops to one-third of the supply voltage. At this point, the flip-flop resets, restarting the cycle.
When the current sources are set to I and 2I, the voltage across the capacitor forms a triangular wave, and the flip-flop output is a square wave with a 50% duty cycle. These waveforms are fed to a buffer stage and made available at pin 3 and pin 9, respectively.
The current source levels can be adjusted using two external resistors connected between pin 4 and pin 5 of the IC and the supply. The output becomes asymmetrical if the current sources are set to values other than I and 2I. The triangular wave can then be modified to a sawtooth wave, and the square wave’s duty cycle adjusted from 1% to 99%. A nonlinear network converts the triangular wave into a sine wave by providing a decreasing shunt impedance as the voltage moves towards its minimum and maximum values.

The output frequency is adjustable by changing the resistor values between pin 4 and pin 5 of the IC and the supply. These resistor values determine the rise and fall times of the sine and triangular waves, as well as the high state of the square wave. Fixed resistors in series with variable resistors ensure that the charging current remains within an optimal range. The resistors’ values should not be less than 2.2kΩ for stable operation.
If R=(R1+VR1)= (R2+VR2), and C=C1 or C2 based on switch S1 positions, the output frequencies are as shown in the table above. A wide range of RC combinations can achieve the desired frequency.
The frequency and duty cycle can be adjusted by varying the values of R and C using potentiometers VR1, VR2, and switch S1. For a 50% duty cycle, R1+VR1 should equal R2+VR2. The time and frequency are independent of the supply voltage. Resistor R3 is a pull-up resistor for generating square waves, while resistor R4 minimises sine wave distortion.
Construction and testing
An actual-size, single-sided PCB layout for the circuit is shown in Fig. 3, with its component layout illustrated in Fig. 4. After assembling the circuit on the PCB, enclose it in a suitable box.

The device can also be constructed on a general-purpose board. The IC can be powered by a single 12V or dual ±6V supply. If a single supply is used, the output will range between the ground and the supply voltage. With a dual supply, all waveforms are symmetrical above and below the ground.
The pull-up resistor R3 should be connected to the power supply if a square wave with a voltage equal to the supply voltage is required. If a square wave of a different voltage is needed, R3 can be connected to an alternate supply, such as +5V, provided that the voltage does not exceed the IC’s maximum supply voltage of 30V or ±15V.
CON1 connects the 12V input power supply to the circuit. Square, triangular, and sine wave outputs are available at CON2, CON3, and CON4, respectively.
Pradeep Vasudeva is a member of the Indian Forest Service, presently posted as Director, State Forest Research Institute, Jabalpur. Electronics has been his passion since adolescence, and his areas of interest include amateur radio, RF circuits, and audio projects.
Copyright 2025 EFY Enterprises Pvt. Ltd, distributed by Contify.com