DDS Signal Generator

I had a need for a simple signal generator. One that could generate both sine and square waves at frequencies of DC up to a few MHz – let’s say 10 MHz or so. The square waves only needed to be 3.3V level, and no fancy modulation methods or triangle waves were needed. One thing that was important however was reasonably accurate frequency control – if I dialed up 1 MHz that’s what I wanted, or very very close to it.

You can buy decent signal generators off eBay, but digging through my collection of stuff I found I had most of the parts I needed to build a suitable unit. Hence this little project was born, and the details are provided here in the hope they might be useful to someone else. It uses an Atmel Xmega (Atmel AVR) processor to control an Analog Devices DDS (direct digital synthesis) chip, which is what actually generates the signal. A keypad is used to enter the frequency, and an LCD displays it. Simple, but it works pretty well.

DDS signal generator

DDS Signal Generator

In practice I’ve found this signal generator works well for frequencies up to around 20 MHz. At 25 MHz the sine wave starts to look a little rough (although still quite usable). This was a pleasant surprise – the unit performs significantly better than what I’d originally expected.

Use the menu links to navigate through the pages.