MAX038-Based Sweep/Function Generator With Markers using AVR ATtiny2313 microcontroller

Take Maxim’s MAX038 function generator chip, add some frills, and you have a pretty nice tool for the bench.


Main Circuit Schematic
Power Supply Schematic
You can build this with switches instead of buttons if you don’t want to use a micro controller. Here is the controller code.

Related project: A DC to 20 MHz Coax Driver Using Discreet Transistors


Maxim’s MAX038 function generator chip is capable of producing nearly constant amplitude sine, square, and triangle waves with a low output impedance, from a very low frequency to more than 20 MHz. Basically, a function generator on a chip. Here is a function/sweep generator that uses the MAX038 chip. The design described on these pages are not so much instructions for duplicating the design as they are a collection of ideas to stimulate your own thoughts.
Operation requires an oscilloscope at a minimum to set it up, and a frequency meter is also a good idea. The waveform can be selected by repetitively pressing the “Waveform” button until the one you want comes out.  The amplitude can be adjusted by with the variable attenuator pot, or by using the switchable attenuators. The DC offset on the output can be adjusted with the offset pot. The DC offset is not affected by the attenuators.
To set up the generator to sweep a given frequency range. First select the band that covers the frequency of interest. Press the FLOW button and then adjust the FLOW pot to set the lowest frequency in the sweep range, for example 400 kHz. Then press the FHIGH button and adjust the FHIGH pot to the highest frequency in the sweep range, for example. 500 kHz. Then press the SWEEP button and the output signal will repetitively sweep from frequency set with the FLOW up to the  frequency set with FHIGH pot, in this case, from 400 kHz to 500 kHz, then the frequency will rapidly return to the FLOW.

The large envelope in the middle of the waveform in the photograph above shows the bandpass of a 455 kHz ceramic filter, The two smaller envelopes at the sides correspond to when the generator rapidly sweeps through that frequency again as it returns the MAX038 to FLOW in preparation for another sweep. FLOW must be set to a frequency lower than that to which FHIGH is set in order for the circuit to sweep.
From the preceding, you should see that the generator can be operated at a constant frequency using either the FLOW or FHIGH pots, and that you can use them as presets and use their associated buttons to switch between two frequencies within the same band.
The marker system is composed of one maker circuit, and two marker position pots. The pots can be enabled  one at a time by pressing the button next to the desired pot. The marker circuit makes a fixed width pulse centered on the frequency to which it is set. There are two ways to see the pulse. One is to press the  Marker On/OFF Toggle Button to cause the marker to attenuate the output waveform during the marker pulse. The upper trace in the photograph above shows the waveform output of the generator when set to sweep a sine wave from 1 Mhz to 20 MHz.

Marker 2 is set to 10 MHz and enabled, which causes the narrow notch in the sweep waveform.  The wider notches are indications of the time when the saw tooth generator that sweeps the MAX038 retraces from the FHIGH back to FLOW. A pulse from the  Marker Pulse connector is shown on the lower trace. Since there may be notches and peaks in the waveform, especially when measuring the response of a filter or other circuit, sometimes the notch in the waveform is adequate to see the marker, and sometimes, its necessary to use a second scope channel to see the marker clearly.
To set the frequency for Marker 1, connect the scope or frequency meter to the Waveform Output and turn the Band Switch to the band desired, press the Marker Mode Select Button to put the MAX038’s frequency under the control of the marker pots. Press the  Marker 1 Frequency Set Pot, which is seen as “M1” in the photograph and is R43 in the schematic. While measuring the oscillator frequency on the Waveform Output,  adjust the Marker 1 Frequency Set Pot to the desired frequency. The frequency for Marker 2 Frequency Set Pot is set in a similar manner.
Marker 1 Frequency Set Pot and Marker 2 Frequency Set Pot may be used for fixed frequency presets similar to the way this can be done with Low Frequency Set Pot and High Frequency Set Pot. Marker Mode Select Button must be pressed to switch oscillator control from FLOW and FHIGH pots and the sweep function to the Marker pots.
A sort of inverse procedure can be used to measure the frequency of a feature in a swept envelope. The marker is centered on the feature you want to measure the frequency of, in the case of the photo above, the major peak in the filter response. Then the Marker Mode Select Button us pressed so that the generator puts out a continuous signal at the frequency set with the marker pot, and the frequency is measured. The measured frequency corresponds to the center of the marker pulse.

For more detail: MAX038-Based Sweep/Function Generator With Markers using AVR ATtiny2313 microcontroller

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top