Sunday, September 21, 2014

Arduino DDS Signal Generator

An attempt to create a Signal generator for my BitX MK2 testing..

I had considered the following requirements

   1) Tuning based on an Encoder;
   2) 20x4 LCD
   3) Memory for specific channels
   4) Arduino based
   5) Keyboard for frequency entry
   6) DDS chip as frequency generator.


I prefer to use the optical encoder instead of a mechanical one. Mechanical encoder fails to work after continuous operation. Sometimes I need to open the mechanical encoder and clean it for a better control. 

Regarding the LCD, initially I thought of using an I2C/Serial LCD, but I could not find one in the local market. So I decided to use the 20x4 LCD which was lying in the junk for a while. Today I saw one convertor for LCD in KO7M's blog ( I am not sure whether it is I2C or RS232 version).

My plan was to use a Atmega328(with preloaded arduino boot loader) , but this needs a PCB and supporting components :). Finally I decided to go ahead with an Arduino Mega 2560R3. This is a nice board with 256KB of flash well enough for my application.

A flexible 3x4 keyboard is used in the build, in future it will be replaced with a 4x4 keyboard ( depending on the pin availability in Mega 2560)

Sometime back I had procured a DDS board from Digibay.in. It uses the AD9850 DDS chip and a 125 MHz crystal oscillator. The DDS board needs a 3.3 volt power supply, which I realized at a later point :). I didn't had a 3.3 v regulator ( through hole type) , so I used 2 1N4147 diodes in series and connected to the DDS power pin. For time being this can solve the heating issue of DDS board.

For testing the Radio I need to generate an LSB /USB signals ( to be frank this is also not needed, but it will be good as the frequency display in the Radio and the Signal generator will match).In the Firmware I have considered an option to switch the LSB/USB frequencies too.

Once this is completed then I can extend the features of this signal generator by adding the RIT, additional input for Tx/Rx indication, Tx Power lever in LCD etc.





It looks like a wire mesh :), but the build is working fine...
May be it is worth to show some LCD Screen shots











I have written a calibration routine for the DDS and the values are stored in the EPROM of Mega 2560.

I have used the Encoder Library from http://www.pjrc.com/teensy/td_libs_Encoder.html. I have made couple of modifications in the original library based on my requirements.

Another custom library used in the project is to drive the DDS Chip.

I don't use a Git repository , so f anybody interested to try this build or expand it for your requirements please drop me a mail to vinodes "at" aol "dot"com ( don't forget to replace the "at" and "dot" :) ) I will be happy to give the source code and the libraries.


Problems observed :

1) When the DDS chip is operational for some time (say for one hour) the frequency is shifting for a couple of Hz. This may not be a problem if it is used in a radio. But for a signal generator point of view, it should be rock solid. I doubt the DDS board, it is a made in China borard , it costs only INR 500. If I have to buy a DDS chip from Farnell then I have to pay almost double money :)

One solution for this problem is to use the SiLabs Si570 which works from 10MHz to 160 MHz ( needs 3.3 v Power + an I2C level shifter) .
Trigger for another project :).........



 

No comments:

Post a Comment