Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use AD9835: Examples, Pinouts, and Specs

Image of AD9835
Cirkit Designer LogoDesign with AD9835 in Cirkit Designer

Introduction

The AD9835 is a low-power, programmable waveform generator manufactured by Analog Devices. It is capable of producing sine, triangle, and square waveforms with a frequency resolution of up to 28 bits. The device is controlled via a serial interface, making it highly versatile and suitable for a wide range of applications.

Explore Projects Built with AD9835

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32 and ADXL343-Based Battery-Powered Accelerometer with SPI Communication
Image of vibration module: A project utilizing AD9835 in a practical application
This circuit features an ESP32 microcontroller interfaced with an ADXL343 accelerometer via SPI communication, powered by a 12V battery regulated down to 5V and 8V using 7805 and 7808 voltage regulators. The ESP32 reads accelerometer data and outputs it via serial communication, with additional components including a pushbutton and a rocker switch for user input.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-C3 Mini and MCP4725 DAC Controlled Analog Output Circuit
Image of pp: A project utilizing AD9835 in a practical application
This circuit features an ESP32-C3 Mini microcontroller that interfaces with an Adafruit MCP4725 DAC via I2C for analog output, which is then fed into an OPA2333 operational amplifier. Power management is handled by a 5V step-down voltage regulator that receives power from a 2000mAh battery and supplies the ESP32-C3 and a 3.3V AMS1117 voltage regulator. Additionally, the circuit includes user input through buttons and electro pads, with debouncing provided by resistors.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Multi-Sensor Monitoring System with Battery Power
Image of Wind turbine 2.0: A project utilizing AD9835 in a practical application
This circuit is a sensor monitoring system powered by a 7.4V battery, regulated to 5V using a 7805 voltage regulator. It uses an ESP32 microcontroller to interface with an ADXL345 accelerometer, INA219 current sensor, BMP280 pressure sensor, and an IR sensor, all connected via I2C and GPIO for data acquisition and processing.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Voice-Controlled Speaker
Image of Main Design: A project utilizing AD9835 in a practical application
This circuit is a digital voice playback and recording system powered by a 3.7V battery. It features an ESP32 microcontroller for processing, an Adafruit MAX98357A amplifier to drive a loudspeaker for audio output, and an Adafruit MAX9814 microphone amplifier for audio input. A pushbutton provides user interaction, and a 3.3V regulator ensures stable power supply to the components.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with AD9835

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of vibration module: A project utilizing AD9835 in a practical application
ESP32 and ADXL343-Based Battery-Powered Accelerometer with SPI Communication
This circuit features an ESP32 microcontroller interfaced with an ADXL343 accelerometer via SPI communication, powered by a 12V battery regulated down to 5V and 8V using 7805 and 7808 voltage regulators. The ESP32 reads accelerometer data and outputs it via serial communication, with additional components including a pushbutton and a rocker switch for user input.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of pp: A project utilizing AD9835 in a practical application
ESP32-C3 Mini and MCP4725 DAC Controlled Analog Output Circuit
This circuit features an ESP32-C3 Mini microcontroller that interfaces with an Adafruit MCP4725 DAC via I2C for analog output, which is then fed into an OPA2333 operational amplifier. Power management is handled by a 5V step-down voltage regulator that receives power from a 2000mAh battery and supplies the ESP32-C3 and a 3.3V AMS1117 voltage regulator. Additionally, the circuit includes user input through buttons and electro pads, with debouncing provided by resistors.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Wind turbine 2.0: A project utilizing AD9835 in a practical application
ESP32-Based Multi-Sensor Monitoring System with Battery Power
This circuit is a sensor monitoring system powered by a 7.4V battery, regulated to 5V using a 7805 voltage regulator. It uses an ESP32 microcontroller to interface with an ADXL345 accelerometer, INA219 current sensor, BMP280 pressure sensor, and an IR sensor, all connected via I2C and GPIO for data acquisition and processing.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Main Design: A project utilizing AD9835 in a practical application
ESP32-Based Voice-Controlled Speaker
This circuit is a digital voice playback and recording system powered by a 3.7V battery. It features an ESP32 microcontroller for processing, an Adafruit MAX98357A amplifier to drive a loudspeaker for audio output, and an Adafruit MAX9814 microphone amplifier for audio input. A pushbutton provides user interaction, and a 3.3V regulator ensures stable power supply to the components.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Signal generation for testing and measurement equipment
  • Frequency modulation (FM) and phase modulation (PM) systems
  • Function generators
  • Audio signal synthesis
  • Communications systems

Technical Specifications

Below are the key technical details of the AD9835:

Parameter Value
Supply Voltage (VDD) 2.3 V to 5.5 V
Power Consumption 20 mW (typical at 3 V)
Frequency Resolution 28 bits
Maximum Output Frequency 25 MHz
Output Waveforms Sine, Triangle, Square
Serial Interface SPI-compatible, 3-wire
Operating Temperature Range -40°C to +85°C
Package Type TSSOP-20 (AD9835BRUZ)

Pin Configuration and Descriptions

The AD9835 comes in a 20-pin TSSOP package. Below is the pin configuration and description:

Pin Number Pin Name Description
1 VDD Positive power supply (2.3 V to 5.5 V).
2 DGND Digital ground.
3 MCLK Master clock input. Determines the frequency of the output waveform.
4 FSELECT Frequency select pin. Chooses between two frequency registers.
5 PSELECT Phase select pin. Chooses between two phase registers.
6 RESET Active high reset pin. Resets internal registers.
7 SCLK Serial clock input for SPI communication.
8 SDATA Serial data input for SPI communication.
9 FSYNC Frame synchronization signal for SPI communication.
10 AGND Analog ground.
11 IOUT Current output. Connect to a load resistor to generate voltage output.
12 COMP Compensation pin. Connect to a capacitor for stability.
13-20 NC No connection. Leave these pins unconnected.

Usage Instructions

How to Use the AD9835 in a Circuit

  1. Power Supply: Connect the VDD pin to a stable power supply (2.3 V to 5.5 V) and connect DGND and AGND to ground.
  2. Clock Input: Provide a stable clock signal to the MCLK pin. The clock frequency determines the maximum output frequency.
  3. SPI Communication:
    • Use the SCLK, SDATA, and FSYNC pins to configure the device via an SPI-compatible interface.
    • Write to the frequency and phase registers to set the desired waveform parameters.
  4. Output: Connect a load resistor to the IOUT pin to generate a voltage output. Optionally, use a low-pass filter to smooth the output waveform.

Important Considerations

  • Clock Stability: Ensure the master clock (MCLK) is stable to avoid jitter in the output waveform.
  • Output Filtering: Use an external low-pass filter to remove high-frequency components from the output signal.
  • Reset: Use the RESET pin to initialize the device before programming it.
  • SPI Timing: Follow the SPI timing requirements specified in the datasheet to ensure reliable communication.

Example: Interfacing AD9835 with Arduino UNO

Below is an example of how to interface the AD9835 with an Arduino UNO to generate a sine wave:

#include <SPI.h>

// Pin definitions for AD9835
#define FSYNC 10  // Connect to FSYNC pin of AD9835
#define SCLK  13  // Connect to SCLK pin of AD9835
#define SDATA 11  // Connect to SDATA pin of AD9835

void setup() {
  // Initialize SPI
  SPI.begin();
  pinMode(FSYNC, OUTPUT);
  digitalWrite(FSYNC, HIGH); // Set FSYNC high initially

  // Reset AD9835
  writeRegister(0x2100); // Reset command
  delay(10);

  // Set frequency to 1 kHz (example value)
  setFrequency(1000);

  // Exit reset mode
  writeRegister(0x2000); // Clear reset bit
}

void loop() {
  // The waveform will continue to generate without further code
}

// Function to write a 16-bit value to the AD9835
void writeRegister(uint16_t data) {
  digitalWrite(FSYNC, LOW); // Enable communication
  SPI.transfer(highByte(data)); // Send high byte
  SPI.transfer(lowByte(data));  // Send low byte
  digitalWrite(FSYNC, HIGH); // Disable communication
}

// Function to set frequency (example: 1 kHz)
void setFrequency(uint32_t frequency) {
  uint32_t freqWord = (frequency * 268435456UL) / 25000000UL; // Calculate frequency word
  writeRegister(0x4000 | (freqWord & 0x3FFF)); // Write lower 14 bits
  writeRegister(0x4000 | ((freqWord >> 14) & 0x3FFF)); // Write upper 14 bits
}

Notes:

  • Replace 25000000UL with the actual clock frequency (MCLK) in Hz.
  • Use appropriate resistors and capacitors for the output stage to match your application requirements.

Troubleshooting and FAQs

Common Issues

  1. No Output Signal:

    • Ensure the power supply is within the specified range (2.3 V to 5.5 V).
    • Verify that the SPI communication is functioning correctly.
    • Check that the RESET pin is properly initialized.
  2. Distorted Waveform:

    • Use a low-pass filter to remove high-frequency noise.
    • Ensure the load resistor on the IOUT pin is correctly chosen.
  3. Incorrect Frequency Output:

    • Verify the master clock (MCLK) frequency.
    • Double-check the frequency word calculation in your code.

FAQs

Q: Can the AD9835 generate arbitrary waveforms?
A: No, the AD9835 is limited to sine, triangle, and square waveforms. For arbitrary waveforms, consider using a DAC with waveform memory.

Q: What is the maximum output frequency?
A: The maximum output frequency is 25 MHz, but the actual usable frequency depends on the master clock and application requirements.

Q: How do I improve waveform accuracy?
A: Use a stable clock source, minimize noise in the power supply, and apply proper filtering to the output signal.

Q: Can I use the AD9835 with a 3.3 V microcontroller?
A: Yes, the AD9835 operates with a supply voltage as low as 2.3 V, making it compatible with 3.3 V systems. Ensure proper logic level matching for SPI communication.