Professional Documents
Culture Documents
Function generator with adjustable frequency from 0 Hz to over 400 kHz, adjustable amplitude, DC offset, duty, and of
course the function selection – square, triangle, and sine. Generator based on good old ICL8038 integrated chip generator
that gives pretty good shaped signals as for amateur purposes. This circuit has been designed a little differently than ICL’s
note or other similar circuits are suggesting. I tested a bunch of different configurations with different peripherals and
chosen the best – so to get good waveshape at 400kHz. I got rid of some of the elements, I added my own solutions. The
two ICL chips that i have can oscillate around up to 420-430kHz, and practically we can get good waveforms up to that
frequency.
electronics-diy.com/icl8038-function-generator.php 1/9
07.03.2021 ICL8038 Function Generator
The biggest problem of these circuits generators is strong distortion on sine wave output pin 2 at frequencies above
100kHz – so most of the solutions based on this chip has a limited frequency. I found a workaround by not putting the
load on the square wave output from pin 9 (open collector that needs to be pulled up to the power supply). In some way
the quality of other waveforms is dependent on the load on this pin. Pull-up resistor is activated only when switching
output to the square waveform – with the same switch. I got rid of the recommended in the note 10M pot to “improve”
the vaweforms. As it turned out its only making them worse, and add a characteristic spout on the top of the upper half of
the sine.
Square output pin 9 with open collector, normally would never be able to give a good square wave at these frequencies.
Rising edge depends only on the pull-up resistor and its growing very slowly. If we give too strong pull-up resistor, in
turn, the trailing edge will be weak because the internal transistor is too heavily loaded. Here, i fixed the square wave
with a comparator so that the slope is pretty steep, steep as applied comparator can give. Shown in the schematic LM393
(1.3μs response time) has been replaced by LM293 comparator with 300ns response time – so square wave is acceptable
at 400kHz, but it would be good to use even faster model of comparator.
The amplitude of the signal, unfortunately, is not the same for each function, tests have shown that trying to match it
with the usual R/R signal dividers will give very distorted waveforms (rounded square and triangle) – so i resigned from
such divisors. When ICL is powered from +-12V voltage, it gives VPP voltage waveforms:
We don’t have to concern for the last of them because it gets fed to the input of comparator supplied from +-5V, giving at
the output amplitude of signal almost equal to its supply voltage, let’s assume (because each comparator can give
different output voltages) that it is a 9.5 VPP (peak to peak). Since the input voltage for the comparator has a greater
amplitude than its supply voltage, I decided to fed it just trough the current limiting resistor. Here, the potentiometer is
used as a source of compare voltage for the comparator, set it to get the same signal duty that has been set for ICL.
Sinusoidal signal coming from the ICL is 5.28 VPP and triangular is 7.92 VPP – so the spread is not that large. A small
note here, the scale of the amplitude potentiometer can only have a decorative function or you can match it to only one
electronics-diy.com/icl8038-function-generator.php 2/9
07.03.2021 ICL8038 Function Generator
function. Use of R/R dividers pretty destroys signals, so choice is yours.
The frequency meter has been used in this construction, so its completes the whole generator and allows to perform the
frequency adjust without using an external meter or oscilloscope. Shown generator board allows connection of such a
meter, giving him power supply and signal to probe. This signal is taken after the waveform switch and is formed in the
second half of the above mentioned comparator, and produces a square wave signal with +-5V voltage which its bottom
half is then cut off with a 1N4148 diode to the level of -0.7 V. This signal is fed to the meter, the AVR input pin accepts
such signals.
Supply
Power supply components included on the board are producing +5 V and-5V for the comparator and frequency meter, and
+12 V and-12V for the ICL8038 and operational amplifier. When making this construction and starting it for the first time,
make sure that the frequency meter do not draw too much current from the positive line, witch can cause a voltage drop
so that 7805 or 7812 stabilizers will experience a drop below their working voltage and give a small sine shaped drops
from 50Hz mains – impossible to see without oscilloscope. If this happen, you must increase the capacity of the main filter
capacitors or use a more powerful transformer. Voltage transformer should have a 2x14V minimum to allow the proper
operation of 7812 and 7912 stabilizers.
Imperfections
In this article i described how to make a simple front panel (its not translated, sorry), and beside regular files such as PCB
files, i added a ready-to-print design of the front panel in the PDF format, suitable for housing Z1A, in the attachment.
Due to certain limitations of the program in which the panel was designed, scales of the potentiometers provide a full
range of regulation, such as duty fill from 0% to 100%, where the circuit does not achieve such regulation. In series with
potentiometers, you can try to add resistors so that they will show exactly what generator is doing – i was not playing
with this. Duty adjustment is in the range of about 5-10% to 90-95%, is non-linear, and adjusting its lower half reduces
the frequency of oscillation for a large values – its a defect or the ICL8038 or it just is designed to work in such way.
Offset, amplitude, and frequency scales are pretty accurate.
Additionally
In my version of device i added the input mode for the meter, which can be selected on the range switch, and the output
connector can be used to measure external signals. Provide a minimum 0V-3V signal – such signal can be measured by
the meter. The signal may be larger, it is matched by the same elements that adjust it at the output of the comparator.
Graphics in attachment shows the connections of switches, in this case, I used two rotating ones, 2 x 6 rows each. “Gold-
plated” RCA connector is used temporary because I ordered BNCs but they came with a big delay.
electronics-diy.com/icl8038-function-generator.php 3/9
07.03.2021 ICL8038 Function Generator
electronics-diy.com/icl8038-function-generator.php 4/9
07.03.2021 ICL8038 Function Generator
electronics-diy.com/icl8038-function-generator.php 5/9
07.03.2021 ICL8038 Function Generator
Related Links
Accurate LC Meter
ESR Meter / Transistor Tester / LC Meter
BA1404 HI-FI Stereo FM Transmitter
500mW FM / VHF Transmitter Amplifier / Booster
USB IO Board
60MHz Frequency Meter / Counter
electronics-diy.com/icl8038-function-generator.php 6/9