AD9833 DDS Signal Generator Module

https://newbrand.botshop.co.za/web/image/product.template/496/image_1920?unique=d116716
(0 review)

288.47 288.47 ZAR 288.47 VAT Included

295.10 VAT Included

Not Available For Sale

This combination does not exist.

Sensors Module

Internal Reference: MOD-045

The AD9833 is a Direct Digital Synthesizer that can generate sine, square or triangle waves and is controlled using the SPI protocol. Since the device is in an MSOP package the easiest way to use it is by getting yourself a breakout board. You can buy two types, one comes with an opamp buffer chip and digital attenuator for adjusting the output level. The reason that the opamp is needed is that the output of the AD9833 is about 600mV. The opamp amplifies the signal by 5 to give a 3V output. Using the digital pot allows you to reduce this output to a level you need.

Libraries:

  • Library for the AD9833 Chip - MD_AD9833
  • Library for the Digital Pot(MCP41010) - MCP41xxx

 

AD9833 Basic:
For help type '?' into the send box in the Arduino Serial Monitor.
Typing the following commands outputs a 1kHz waveform to Vout

#include <MD_AD9833.h>
#include <SPI.h>

// Pins for SPI comm with the AD9833 IC
#define DATA  11    ///< SPI Data pin number
#define CLK   13    ///< SPI Clock pin number
#define FSYNC 10    ///< SPI Load pin number (FSYNC in AD9833 usage)

MD_AD9833    AD(FSYNC);  // Hardware SPI
// MD_AD9833    AD(DATA, CLK, FSYNC); // Arbitrary SPI pins

void setup(void)
{
    AD.begin();
}

void loop(void)
{
    static uint16_t lastv = 0;
    uint16_t v = analogRead(A0);

    if (abs(v-lastv) > 20)
    {
        AD.setFrequency(MD_AD9833::CHAN_0, 1000 + v);
        lastv = v;
    }
}