EASY SIGNAL GENERATOR

With prices of Arduino Uno single board computers so very low and the cost of the AD9850 Direct Digital Synthesizer board just as ridiculously cheap (HiLetgo on Amazon.com,$14) it is now possible to build a stable and accurate signal generator for well under $20. This generator will provide a nice output from 1 Hz to over 30 MHz continuously in single Hz steps. It can be powered by 7 to 12 volts DC as a stand-alone unit or can be powered from the USB cable from a computer or any USB charger capable of supplying 1/4 amp.

I keep it handy as a quick check to see if a receiver is on frequency or if it's actually working! A quick and extremely stable signal when you are away from the test bench or when you need a second generator. Output levels are fairly constant at 350 mV into 50 ohms to 15 MHz, dropping to 240 mV at 30 MHz. Audio frequencies from 1 Hz (!) to 100 Khz into 600 ohms are flat at 1 VPP. So connect a step attenuator for alignment and performance tests. Harmonics are better than 45 dB down. A very clean sine wave. 300uW QRPpp?

I decided to install it in an Altoids tin. Dropped an old plastic promotional “credit card” into the bottom of the tin to insulate the Arduino board from the metal. Three bolts and nuts fastened it in. Some piercing, reaming, and filing allowed mounting the Arduino Uno R3 and the BNC jack that I wanted for the signal output. I also cut and filed the tin to allow access by the USB cord and a coaxial power plug. I had to file the end edges of the lid a bit to allow closing fully with the jacks in place.

In order to fit the AD9850 sandwich into the case I chose to remove all the pins on the AD9850 board except for pins 2 through 6.

The little potentiometer is only used to make a square wave. It sticks up too high for the lid. . If you move it under the board then it makes a nice guide stop for properly positioning the pins when you plug it in and you can still use it if you wish. Or simply remove it.

I used a 3 inch piece of RG-174 coax to connect the BNC jack to the hole where pin 10 on P2 used to reside.

Jack pin #10 on the Arduino goes to the DDS board plug 2 pin #2 (CLK)

Jack pin #11 on the Arduino goes to the DDS board plug 2 pin #3 (FQ-UD)

Jack pin #12 on the Arduino goes to the DDS board plug 2 pin #4 (DATA)

Jack pin #13 on the Arduino goes to the DDS board plug 2 pin #5 (RESET)

Jack pin #14 on the Arduino goes to the DDS board plug 2 pin #6 (GND)

Jumper the 5V power on the Arduino to the DDS plug 1, pin #1 (VCC)

As you can see, all but the VCC are lined up in a row. That way you can remove all but those five pins on the AD9850 board allowing direct plug-in to the Arduino! That leaves just the power and output to be wired separately.

That completes physical construction. Now you can connect it with the USB cable and upload the software. Here are three super simple programs that you can play with:

AD9850_easiest.ino" has no control. You just program in the frequency that you want to generate. Each time you want to change it, you need to re-program it. But this gets it working and you have a nice generator just by powering it up. Remember to state the input in Hz.

AD9850_USB.ino" provides USB control. Use the serial monitor function in the Arduino IDE for simple control or use any communication terminal (VT102 mode) or emulation to control the circuit through the USB port on the Arduino. Use only numeric characters (i.e. 3855000 for 3.855 MHz) as any non-numeric input (like a decimal point)is considered an "enter" by this simple program. Enter the desired frequency , it will generate it and respond on the screen as well. Nothing fancy so don't expect error correction.

AD9850_USB+.ino is a combination of the two features provided by the above sketches: It will generate a single frequency when powered up but will allow USB control when you plug into it. That way you can just power it up and have a nice little generator without hassle. Consider using 1 KHz or 10 MHz as defaults, whether you want an audio or HF generator. 10 MHz is a good choice to calibrate your generator to WWV. Just change that 125000000 number in the output() subroutine to make it match WWV. After that you are good on all frequencies.

de ND6T


Return to Home