Arduino Nano and AD-9850 Signal Generator
The ability to generate a clean sine wave is incredibly useful to the electronic home-brewer. In testing a an audio or RF circuit you often need a tune-able, stable frequency source. Commercial ones range from very expensive, with the ability to generate arbitrary waves at very precise signal levels. For my purposes a simple sine wave generator with a variable attenuation meets most of my needs.
This Signal Generator is built using an AD-9850 Direct Digital Synthesizer and an Arduino Nano. It generates a clean sine wave from 0 to 62.5 MHz (very clean up to about 50 MHz, but still use-able up to 62.5. There are various versions of this floating around the internet, including prebuilt ones from a variety of sellers. The display is 16x2 I2C LCD. The control is a Rotary Digital Encoder with push button. Turn the encoder to change frequency. Push the button to select the tuning increment.
There are various versions of this floating around the internet. This is my implementation.
The code and build instructions are available on Github at:
To control the AD-9850 I chose to use a DDS library written by Paul Darlington, M0XPD. You'll need to download it from his Github repository and install it using the Arduino IDE Library Manager. You can read Paul's original blog for details on the library.
- DDS Signal Generator Module - any one of the AD9850 boards should work. I used each of these at different times:
- https://www.amazon.com/HiLetgo-AD9850-Generator-0-40MHz-Equipment/dp/B01J7XPWNU/
- https://www.amazon.com/gp/product/B082143FD9
- https://www.analog.com/media/en/technical-documentation/data-sheets/AD9850.pdf
- 16x2 I2C LCD display
- Rotary Encoder with switch
- 10K linear taper potentiometer
Here is the wiring:
Signal Generator Wiring |
Fit and finish details:
- Enclosure - 4"x3" plastic enclosure
- Panel mount BNC Connector
- PCBs = two Adafruit 1/4 sized breadboard PCBs, one for the Arduino and one for the AD-9850 module
- Mini toggle switch for power
- Panel mount 2.1mm DC barrel jack
- Mounting hardware - 4-40 standoffs and spacers, machine screws, washers and nuts
- 0.1" female headers on the breadboard make it easy to wire the components up in the case
Signal Generator Construction |
And here is what the finished product looks like:
KK4DAS Signal Generator |
73 from Great Falls
Dean
KK4DAS