There are two principle methods to produce an accurate radio frequency signal level: Generate a signal and measure it, or generate the signal and accurately adjust the level. My previous low-level signal generator, the EZGen3, used a potentiometer for control and then measured the level with an AD8307. When the Peregrine Semiconductor PE4302 6-bit RF digital step attenuator became widely available I thought that it might be a simpler solution.
The PE4302 is a numerically controlled attenuator with a 31.5 dB range in half decibel steps. Rated from DC to 4GHz it should be more than adequate for my intended 1.8 to 30 MHz. By placing two of these devices in series and applying the control to them in parallel, they exhibit a 63 dB range in 1 dB steps. Wonderful! Even more exciting, they are available in module form, mounted with peripherals on printed circuit boards. Cheap, too!
Unlike the EZGen3 project with its 44 dB range, 63 decibels might allow for higher levels and much lower levels. In precise steps as well. Since both the level and the frequency will be controlled with the microcontroller I can use just the one rotary encoder knob for both frequency and level. I can use a panel toggle switch to go from frequency control to level control. I never used both knobs at once anyway.
Like the EZGen3, I used a surplussed data switch for the cabinet and a transformer from a 5 volt wall-wart power supply. Unlike that project, this one was built to supply 3.3 volts since the PE4302 is built for that voltage. Both the Arduino Nano and the OLED display run quite nicely at 3.3 volts, the Nano even using the normal 5 volt input pin with the lower voltage. There is one difficulty, however; When the Nano is being flashed (when the firmware is being loaded via the USB port) then the 5 volts from the computer also appears on all of the data ports – including the control to the PE4302, probably damaging it. So I installed pin headers to the control lines, thus allowing them to be easily disconnected whenever I wanted to re-program the controller.
To improve the shielding of the generator I decided to enclose each section in individual printed circuit board material compartments instead of the Altoids tin. Indeed, that takes a LOT more work and planning. I used double-sided un-etched board to build open-topped boxes with all joints soldered with continuous seams. Short sections of 1/8” square brass tubing soldered at the corners and slightly lower than the lip of the boxes taps easily for 4-40 screws since brass is nice and soft. The lids are then easily fitted.
The Si5351 synthesizer board is mounted in one box. That box is bolted within a larger box. The power and I2C control lines are choked within the outer box with a FT37-43 toroid. A 49.9 ohm (essentially 50 ohms) resistor (R3) is soldered from the CLK1 output pad to ground and a 8.2 Kohm leaded resistor also solders from the CLK1 pad and through a small hole in the shield to the next section as part of a 50 dB pi network resistive attenuator.
The two PE4302 boards are connected (output of the first to the input of the second) with a short piece of RG-178 type coaxial cable, allowing the two boards to be stacked. Pin headers mounted on the control pins facilitate plugging them together. Ribbon cable from the controller attaches to those pins atop the upper board. The stacked boards are then mounted on two bolts fed up from below. The 8.2 Kohm resistor (R2) from the synthesizer is soldered to the input pad of the lower attenuator board and a 49.9 ohm resistor (R1) is also attached from there to ground to complete the 50 dB interconnecting pad. Likewise a 52 ohm resistor (R4) is mounted between ground and the output pin of the upper attenuator with a 1.2 Kohm resistor (R5) exiting the outer shield box to the output BNC connector. Another 52 ohm resistor from the output BNC to ground completes the final 34 dB attenuator.
The fixed attenuator networks ( 50 and 34 dB ) are for isolation and to set the output range to the values that I wanted. I now have an output level range from -88 dBm to -141 dBm.
You can download the simple Arduino sketch file (EZGen4.ino) by clicking here and then selecting “save to file”, placing it in a folder with the name “EZGen4”, and running it on the Arduino IDE. Or just read it on the screen. You can also view the .pdf file by clicking here. I have also rewritten it for the RP2040 controller (Raspberry Pi Pico, zero, and others) just to see if it works. Since I didn’t figure out how to use that interrupt system I just used polling for the rotary encoder. The clocking is so fast that I didn’t see a difference. If you need that firmware, just contact me.
Don’t forget – UNPLUG THE PE4302 CONTROL LINES BEFORE CONNECTING YOUR COMPUTER TO THE NANO’S USB PORT!!
As in previous generator projects, the controller does little but adjust the level, frequency, and display. I included a level indication in microvolts along with the dBm indication. Not much going on there so it is quite reliable. Frequency calibration is done like the other synthesizer projects that I have done: Initialize the Si5351 with a frequency of 25000000L , dial in 25.000 000 MHz, and measure the actual output. Use that result as the entry for the final reference crystal frequency. You can see that my crystal was actually 25000830 on my generator and listed in the source code. RF level calibration is a bit trickier since it requires expensive lab equipment. With the values shown, you should be within a dB or so, no worries. I used a spectrum analyzer, compared not only to its internal calibration, but also comparing the EZGen4 output to a known level RF and reliable attenuators that I keep as standards.
Like my other projects that use a rotary step encoder for frequency control, the EZGen4 uses “Agile Tuning”. The tuning increment is changed by turning the control knob while pressing it in. The underline cursor indicates the tuning step position. Release and tune. For example, if it is beneath the last digit then you tune in 1 Hz steps. If it is beneath the 8th digit from the right then it tunes in 10 MHz steps.
Although this signal generator will function to 150 MHz, the shielding limits level accuracy at low levels above 30 MHz. “Blow by” is the problem: Signal that sneaks past the attenuator circuitry so that a point is reached where the level control doesn’t seem to lower the output. This effect becomes more pronounced at higher frequencies. It is largely caused by inefficient grounding, especially at the transitions from synthesizer module to the attenuator modules and then to the output connector. Be sure to scrape paint from cabinet connections like the BNC connector and the bolts fastening the copper clad shield boxes. Use star washers to further dig into the metal for low resistance connections. Drill through the double-sided PCB boxes in several locations to permit a wire jumper through to connect both sides of the cladding, solder, and clip flush. In other words, anything that you can think of to improve the shielding. Experiment.
EZGen4 is an inexpensive precision adjustable low level IF and RF signal generator. Suggested applications:
de ND6T