The blog of a dedicated radio amateur and electronics enthusiast

"Having fun on the air and in the workshop - communicating and creating"

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 ). 
 

No comments: