The Sweeper

                                           

                                                                  Wayne Maxwell KD4YGU

 

            There have been many times while building a project, troubleshooting a piece of equipment or aligning a filter that visual information, such as a frequency response display, would have made the job much easier. A spectrum analyzer would have been great, but the cost of even a good used unit is in the thousands of dollars. Too much to justify for my hobby. That was the incentive to develop the Sweeper. While it is not a spectrum analyzer, it does produce a similar display that can be calibrated in bandwidth, frequency and decibels. The Sweeper works in conjunction with an oscilloscope and frequency counter, both of which are vastly less expensive than a spectrum analyzer, and are fairly common on the shack’s workbench. The oscilloscope needn’t be a high bandwidth model, as long as it has an external horizontal input and a Z-axis or intensity modulation input, which most do. The prototype is used with an old HP 1217A, which states a 7 mhz vertical response. The frequency counter need only measure the frequencies that the user will be working with.

            The concept here is that if a variable frequency oscillator can be synchronized to the sweep of an oscilloscope, and the VFO frequencies at the start and end of the sweep are known, the output of that oscillator can be applied to the input of a unit under test. The output of the unit under test can then be rectified and applied to the vertical input of the oscilloscope to display the frequency response characteristics, similar to the display of a spectrum analyzer. If we also have a way to measure the frequency anywhere along the sweep, we’ll have a pretty useful piece of test equipment. That is exactly what the Sweeper does. It will provide the horizontal sweep for the scope and the marker signal to intensity modulate the trace. It will provide an adjustable VFO control voltage, synced to the horizontal sweep and also rectify and log-convert into decibels, an RF input from DC to 900 mhz for display on the scope vertical input.

            The sweep signal is a positive-going ramp signal generated by U2 and the R-2R resistor network. U2 is an 8 bit counter configured to continuously count up from zero to 255, carry over to zero and count again. The Qa to Qh outputs of U2 drive the R-2R resistor network, which integrates the byte into a DC voltage. The 0 to 255 output of U2 corresponds to approximately 0 to 3.5 volts DC being fed to buffer U5. Because U2 is repeatedly counting from 0 to 255, the signal to U5 is a positive going ramp at a repetition rate equal to 1 / 256 of the U2 clock frequency. The R-2R network is simply two standard 16 pin resistor DIPs wired to produce a DC voltage proportional to an 8 bit digital input. Since U2 is a TTL device, and a high output equals approximately 3.5 volts, a digital input of 255 (all 8 bits TTL high), would produce a DC output of 3.5 volts from the network. U5 is an opamp configured as a high input impedance buffer and drives the  ‘Sweep Output’ to provide the horizontal sweep signal for an oscilloscope. The output of U5 drives U6A and B, which generates an adjustable output derived from the sweep signal, to be used as the control voltage to a VCO or other voltage controlled device.

 To this point, we are generating a sweep for the oscilloscope and a control voltage that is synchronized to that sweep. If we used the control voltage to vary the frequency of an oscillator, fed that oscillator output to say, the input of a bandpass filter, then displayed the output of that filter on the oscilloscope vertical input, we would see the response of the filter to the output frequencies of the oscillator. And since the sweep and control voltage are synced together, the oscilloscope horizontal display can now be calibrated in frequency instead of time. For instance, if the controlled oscillator is being swept 1 mhz on each sweep, and the oscilloscope horizontal trace is adjusted for 10 screen divisions, then each division would represent 100 khz. The start frequency is not important, the span determines the frequency per division.

Now that we have an oscilloscope display of amplitude versus frequency, a useful feature would be a marker that could be moved along the horizontal axis. U3 is an 8 bit comparator. It compares two 8 bit bytes, and generates an output when they are equal. This output drives U7, an optical isolator, that outputs a negative voltage pulse to the oscilloscope Z-axis input. This input will intensity-modulate the scope trace, producing a bright spot on the trace as a marker. The output of U2 serves as the A input to the comparator, U3. The B input to U3 is the data input to U2. Whenever these two bytes are equal, a low output is generated at U3, pin19. With any arbitrary number on the B input of U3, a single output pulse equal to one U2 clock period is generated each sweep. This happens because U2 is continuously counting from 0 to 255, while the data at the U3 B input is steady. U1 is an ADC0804, 8 bit Analog to Digital Converter configured to free-run. That is, it will continuously output an 8 bit byte at DB0 to DB7, equal to the DC input voltage at pin 6. The input is simply a pot that varies this voltage from 0 to 5 volts. U1 is calibrated by the LM336 at pin 9, and the ground at pin 7, to read 0 to 5 volts full scale. Thus, U1’s output at 0 volts is 0, and the output at 5 volts is 255. By operating the ‘Marker Position’ pot, any number from 0 to 255 may be generated by U1. This number also is the B input to U3 and allows the marker to be moved along the scope trace. The clock for U1 consists of the RC combination at pins 4 and 19, and runs at roughly 250 khz. The signal at pin 19 is fed to U4 and divided down to generate the clock for U2 and thus, the sweep speed. Please note that pins 4 and 19 are reversed on the schematic. A 4 position DIP switch is included to select a pleasing sweep on the scope. It should be noted that to place U1 in free-run mode, the ‘end-of-conversion’ signal at pin 5 is tied to the ‘start conversion’ input at pin 3. The ADC0804 databook states that a ‘start’ pulse may be required to begin the cycle. Upon trying several IC’s, it was found that the free-run mode started every time, but be aware of this if U1 does not start on power up.

The simple control circuitry consisting of the ‘Spot’ pushbutton and the ‘Min / Max’ switch in conjunction with the ‘Min’ and ‘Max’ pots allow setting the sweep range of interest. The momentary, center-off switch is moved to ‘Min’, and the ‘Min’ pot is adjusted for the minimum sweep frequency, or the start point. Then the switch is held to ‘Max’ and the high or end frequency is set with the ‘Max’ pot. There is some interaction between the pots, so a check should be made after the initial setup. Upon releasing the switch to the center position, the unit will begin sweeping the VFO between the low and high set frequencies. If a receiver IF strip was to be swept, for instance, the minimum and maximum frequencies could be set to 450 khz and 460 khz. If the scope trace was  adjusted to fill the 10 divisions of the scope screen, then each division would equal 1 khz, with 455 khz at the center of the trace, since the sweep is linear. The ‘Spot’ pushbutton will stop and hold the sweep and VFO frequency at the point of the marker. Thus, the marker can be moved to a point of interest on the scope trace, ‘Spot’ is pressed, and the frequency at that point in the sweep may be measured.

At this point we have an operable unit, but the scope display is somewhat difficult to interpret, as it is a display of the amplitude of the RF through the unit under test. The function of the AD8307 Logarithmic Amp is to turn this amplitude display into a more meaningful log display such as that used in a spectrum analyzer. We now have a horizontal baseline with vertical peaks corresponding to increasing amplitude. The marker is very easy to follow along this trace, and a meaningful display of bandpass response is produced. The logamp output is scaled at 25 mv per db, with a 90 db dynamic range. For instance, if the scope vertical input is set to .1 volts per division and the trace is set to the bottom horizontal scale line, the display would be 4 db per division and a full scale display of 32 db. At .2 volts per division, it is 8 db per division and 64 db full scale. Finally, at .5 volts per division vertical sensitivity, we have 20 db per division. The AD8307 has an input impedance of 1100 ohms. A BNC ‘tee’ connector is used at the RF input port with various value terminators to match lower impedances. A 50 ohm match would require a 52.3 ohm resistor be crimped or soldered into a BNC connector to form a terminator. 50 ohm and 75 ohm terminators are commonly available items.

Construction is straightforward and non-critical for the sweep generator portion of the project, with the exception of the logamp. More on that later. The sweep generator and logamp are built as a common unit and connection to an external VFO or other device is through a DB9 connector. +5, +12 and -12 volts, vco control voltage and the unadjusted sweep ramp is fed to this connector. A standard computer serial cable makes the connection to external units. Verify that the chosen cable has all 9 pins connected, as some RS232 and cheap mouse extender cables don’t use all 9 wires. Any type construction may be used, the prototype was built using pc boards and the IC’s were selected for simple layout. Wirewrap construction also would be fine, as no high frequencies or high currents are involved with the sweep circuits. The logamp is another story. This IC operates at extremely high gain to well beyond 500 mhz. The prototype uses a very small pc board held to the rear panel by it’s BNC connectors. Although not initially shielded, voice modulation was evident on the baseline display of the scope, probably from a commercial or amateur station. Thin brass or copper sheet shielding, formed to enclose the logamp is recommended.

The VFO sweep oscillator was chosen for simplicity. A simple rotary switch selects a capacitor for the various frequency bands and the range pot allows each band to be compressed to use a greater control voltage swing. For instance, on any given band, the minimum and maximum frequencies are specified for a control voltage of 0 to 5 volts. If a small range of frequencies within a band are swept, the total control voltage to sweep this range would also be small. This can make setting the ‘Min’ and ‘Max’ pots somewhat difficult. Using the ‘Range’ pot, the band can be made smaller and the required control voltage to sweep the same range of frequencies increases. The output ‘Level’ pot is probably not the preferred method of level control, but at these frequencies it works and is ultimately simple.

A few words on modifications and component substitution are in order. The IC’s in this project were chosen for simplicity of pc board layout. The pinout of U1, U2 and the R-2R network are ‘bus-friendly’ and allow simple pc board traces for interconnection. U1 and it’s associated circuitry may be replaced by a single 8 position dipswitch. U1’s function is to generate an 8 bit number, and the dipswitch will do that also, although with much more operator intervention. The only other requirement is that the 8 outputs, DB0 to DB7 in this case, must pull to logic high when the ‘Max’ switch is operated. U2 may be replaced by any loadable 8 bit or two 4 bit counters. It must have a clear or reset  function to output logic 0 when the ‘Min’ switch is activated, and a load function to transfer input data to the output pins when the ‘Spot’ or ‘Max’ switches are pressed. U3 can be any 8 bit or two cascadeable 4 bit comparators with an A=B output that can drive an LED. U4 may be replaced by nearly any source that can generate a TTL clock in the range of roughly 500 hz to 2500 hz. A 555 timer would be a good choice. The R-2R network may be replaced by an 8 bit Digital to Analog Converter, but with it’s associated circuitry and power supply requirements, nothing is gained, as the network is simply two standard 16 pin resistor DIPS. Although the network may be replaced by individual resistors, most resistor DIPs use elements matched to 2%. The values in the ‘Max’ and  ‘Min’ control voltage circuits of U6 may be tailored to output any voltage from about plus to minus 10 volts. The trimpots at U6 of the prototype were set to allow a 0 to +5 volts range for the ‘Min’ pot, and a 0 to 5 volts peak ramp waveform for the ‘Max’ pot. Be aware that the ramp waveform rides on the voltage set by the ‘Min’ pot, and therefore can rise to +10 volts in the prototype setup. This is the reason for the 5.1 volt zener diode at the VFO frequency control input, pin 13. U6 may be replaced by any of several dual opamps with the same pinout. The entire unit may be powered by a single supply, using 5 volts for the logic and logamp, and roughly 9 volts for U5 and U6. This is easily accomplished with a 6.3 volt transformer and 5 volt IC regulator. If a single supply is used, U5 and U6 should not be substituted, as this IC is designed to operate on a single supply. Also, a 9 volt battery would be needed for the negative supply for the marker output.

If the VFO sweep oscillator is too simple or even too elaborate for a given application, this is where the external device concept works. The sweep generator provides oscilloscope horizontal sweep, marker, and log output, as well as providing power and an adjustable control voltage to an external device. The device that the sweep generator controls is up to the imagination of the user. A voltage controlled tuner from an old TV or VCR may make a very nice spectrum analyzer. A function generator IC such as the 8038 would make a nice audio testing unit. Or the venerable CD4046 or higher frequency 74HC4046, or a VHF varactor tuned oscillator, the list is endless. With a little thought, I’m sure any number of ideas to fit any number of applications are possible.

 

Email questions and comments to wayne@350rx7.com