The blog of a dedicated radio amateur and electronics enthusiast

"Having fun on the air and in the workshop - communicating and creating"
Showing posts with label AD9851. Show all posts
Showing posts with label AD9851. Show all posts

27 March 2025

More features for DdsModTerm software

๐Ÿ”˜I have added some important new functionality to my DDS programming software, "DdsModTerm", ( see ๐Ÿ“…31 December 2024 ); updated to version 1.0.0.rev16. It is now possible to generate audio ๐Ÿ‘‚frequencies, as well as program the AD9850 and AD9851 DDS chips, using one application. For example, the 'Phasing Exciter' ( see 'featured post' in side-bar, ๐Ÿ“… 02.11.2017 & 23.12.2024 ) requires both audio frequencies (๐Ÿ‘‚AF) and radio frequencies (๐Ÿ“ปRF). So having the same software able to generate both is very convenient while carrying out testing, alignment, and repair tasks. This has required some changes to the lower half of the program window, (see image below, click to enlarge, compare with ๐Ÿ“… 31.12.2024).

Audio tones can be generated from the lower-right panel 
The audio ๐Ÿ‘‚ tones are produced entirely independently of the DDS. Free downloads of audio .wav files are available online. I chose files of single frequency sine-waves ∿; 1200Hz, 1400Hz, 1500Hz & 1600Hz being best suited to the data transmission modes I use on the 472-479KHz amateur band. I imported these files  as resources into the DdsModTerm software, and wrote some code so that the tones are played back through the ๐Ÿ’ป pc sound-card ๐Ÿ”Šby clicking the appropriate button. The individual .wav files are quite small ( about 1.3Mb ) and playback duration ⏳is only 15 seconds. I added a second progress bar to track the playback, and a button to play back in a continuous loop, if preferred.
While the software was being revised, this opportunity was also used to calculate another pair of alias frequencies  ( for 2 x ๐Ÿ•’clock ), and make some minor cosmetic changes to the window's appearance.๐Ÿ”˜

Free .wav files downloaded from ๐Ÿ”— OnLineSound  with thanks.
DDS = Direct Digital Synthesiser
AD9850 & AD9851 are Analog Devices Inc. parts.

31 December 2024

Programming AD9850 & AD9851 DDS

๐Ÿ”˜I previously posted about using the AD9850 & AD9851 DDS chip evaluation modules in 2018 and again in 2023. To recap, before these devices can be used as a signal source they require programming with 5 bytes of data related to frequency and phase, which form a 'tuning word'.
A ยต-controller and a smart phone๐Ÿ– App could be used to upload ๐Ÿ  the tuning word ( see 16 July 2023 ), or a USB dongle and pc๐Ÿ’ป interface software, ( see 4 January 2018 ).  As I have recently updated that software it would now be a good time to give a description.

My dedicated pc ๐Ÿ’ป software, called "DdsModTerm", is the user interface which I started developing in about 2015. Since then I have updated it 15 times; the latest revision appearing this month.

DdsModTerm user window
The clock ๐Ÿ•ฐ frequency and the required output frequency ∿ & phase are entered either manually or by recall from memory. By clicking 'Confirm' the software generates the 5 configuration bytes required from the user input data. In the example in the image above the output frequency is 137700Hz* & bytes hex 00C88AC604. The pc ๐Ÿ’ป is connected to the serial data interface of the DDS module via a COM port and a USB-SPI protocol converter dongle.
(L) USB-SPI dongle (R) AD9851 DDS module on adaptor
Clicking 'Update DDS' then uploads the bytes to the registers of the DDS chip using SPI and a voltage having an amplitude 1V peak to peak at the programmed frequency ∿ is then present on the output.
DDS output signal, 1Vp-p, 137.7KHz
Other features of the software include up/down step ๐Ÿชœtuning, slider tuning control, view of 255 byte eeprom addresses E0-FF, 3 memories for storing frequency, saving custom clock๐Ÿ•“, alias frequencies calculated, and general purpose output ( GPO ) toggling on/off.
The dongle and software are available from me. Post a comment to receive more information. Note that both AD9850 & AD9851 DDS devices are supported.๐Ÿ”˜
( Click on images to enlarge detail. )
* 137.7KHz is a calling frequency on the radio amateur 2190m long-wave band, 135.7-137.8KHz.
SPI = Serial Peripheral Interface, 3-wire bus.
AD9850, AD9851 : ๐Ÿ”—Analog Devices Inc. parts, 32-bit CMOS Direct Digital Synthesiser (DDS) chips.

16 July 2023

Mobile App User Interface for a DDS Module ๐Ÿ“ถ

I previously featured a DDS module based on the Analog Devices AD9850 32bit device on 4.1.2018. The method I used then to generate an output frequency from the DDS board involved an SPI-USB protocol converter dongle with pc terminal software.
Another method I recently devised uses a micro-controller and my custom "DDSTerm" App installed on a mobile phone๐Ÿ“ฑ. As before SPI protocol is still needed to upload the tuning word, phase and power control bytes to the DDS configuration register and this operation is now performed by the micro-controller. But instead of software running on a pc, the App is now used to generate the bytes required, which are then sent using BluetoothⓇ Low Energy ( BLE ) to the micro-controller. An ESP32 micro-controller has SPI peripherals and built-in BluetoothⓇ, and so was used.
App 'DDSTerm_v1.06' opened
The micro-controller functions as a BLE server 'AD9850_DDS'. The App on the client device scans for this server and connects to it. The desired frequency, phase and power mode are entered. Clicking "Generate" produces the required 5 bytes ( hex 004831C8C4 in the image example ), and clicking "Send to DDS" sends the bytes using BluetoothⓇ to the ESP32, which then uploads them to the DDS board on the SPI.  An output is generated on the selected frequency, e.g., 137.7KHz. Clicking 'PWR DWN' puts the DDS in 'sleep' mode. The two yellow LEDS ( see image below ) are toggled on/off with GPO1 & GPO2. The last uploaded frequency is saved and automatically recalled whenever the App connects.
The hardware setup during development & testing
The hardware ( image above ) consists of an AD9850 DDS module board bought very cheaply on-line and mounted on my test jig from 4.1.2018. Inside the 3D-printed blue and yellow enclosure is the ESP32 micro-controller development board which is a typical one having the ESP32-WROOM-32 processor. Both the DDS and ESP32 are 3.3v supply and logical level compatible. No level shifting is therefore required when interconnecting.
I also use DDS modules fitted with the AD9851 chip; see 2.11.2017. The only changes to the App, ( other than selecting the correct device ), would be a 'x6 Reference Clock Multiplier' checkbox, and extending the frequency range of the 'slider control'; both optional.

DDS = Direct Digital Synthesis.
GPO = General Purpose Output
SPI = Serial Peripheral Interface ( 3-wire bus ). 
 

04 January 2018

Test jig for DDS module and Dongle

AD9850 DDS module on breakout board with interface dongle
CH1 sine wave output, CH2 comparator output +DUT 25%
This post is about using those cheap DDS, ( Direct Digital Synthesizer ), modules based on the AD9850 or AD9851 DDS chips, and found on auction sites for only a few dollars. I have been programming and using them for several years, going back as far as August 2013 ( see post 27/08/2013 ). I am now using the interface dongle, ( USB-SPI v1.00 ), and software from www.spectecs.com which makes the modules extremely quick and easy to use; the tuning word is created and uploaded to the DDS over USB with just a few mouse clicks.
The modules are ideal as a signal source for testing amplifiers etc or embedded in projects which is what I have done recently with the phasing exciter ( 02/11/2017 ) using an AD9851 DDS module on that occasion.
I made a simple jig, ( break-out board ), for speed and convenience when connecting the module for use as a stand-alone signal source. The SPI and output connectors are extended out to pin-strip headers. I also provided LEDs for testing the two GPOs from the dongle.
The module has two sine wave outputs, ( OUT1 & OUT2 ), two square wave outputs ( VO_P & VO_N ). Sine output OUT2 is present on the disconnected black jumper. Referring to the top picture, I've set the jumpers as follows:
J1 green, connected = serial data upload, ( disconnected = parallel data upload ).
J2 blue, connected = enable square wave output, ( disconnected = no square wave output ).
J3 yellow, connected = digital to analogue converter ( DAC ) full scale current set internally, ( disconnected = DAC current set externally ).
I uploaded a tuning word ( hex 010624DD ) for the DDS to generate an output signal at 500KHz. The duty cycle of the square wave is adjusted using the trim-pot next to J2. I found the range of adjustment to be about 12%-87%. The lower picture shows the signal on OUT1 ( 1V peak to peak ), and VO_P ( 5V peak to peak ), which I adjusted for 25% duty cycle.
Although the top picture features the AD9850 DDS module, the AD9851 module is identical in appearance apart from the chip type of course.  

02 November 2017

Phasing exciter for the MF 630m band

DDS interface dongle left, antenna c/o top, main board below
antenna change-over circuit removed to reveal main circuit board
So that I can join in the fun of using weak signal data modes such as JT9, JT65, FT8 and WSPR on the 475KHz 630m band I have built a phasing exciter for a low power single-sideband transmitter. Audio input signal is generated by pc data mode software and sound card. The rf signal source is a cheap AD9851 DDS module bought at an online auction site. Its frequency of operation is changed using the usb dongle and interface software obtained from www.spectecs.com. The rf phase shifter is a dual J-K flip-flop chip, af phase shifter comprises two quad opamps, and the mixer is a dual 1to4 mux/demux fet bus switch.
To give the project a smart appearance I chose a Hammond type 1455N1201BK box for it. Even before the prototype was finished, I couldn't resist the temptation of connecting it to my inverted 'L' antenna and trying it out. The exciter on its own produces only 1mW ( 1 milli watt, 0dBm ); but this was sufficient for my WSPR beacon signal on 474.2KHz to be received with SNR -23dB at a distance of 11kms by a monitoring station.
The prototype was completed with the addition of a class A rf driver amplifier to increase the output power to 100mW, and an automatic rf sensed antenna change-over switching circuit. Since then my signal has been received in Norway, distance 1071kms, Estonia, distance 816kms and Germany, distance 700kms, which surprised me as the antenna's directionality favours the east. Sadly there don't seem to be any foreign receiving stations in the east at the moment.