Signal Generator Using AD9833 and Arduino Nano

by SorinSalam in Circuits > Arduino

3394 Views, 7 Favorites, 0 Comments

Signal Generator Using AD9833 and Arduino Nano

index4.jpg
Signal Generator.png

As I was watching EEVBlogs at teardown tuesdays, I felt the urge to build myself a signal generator. Searching the web, I stumbled upon a cheap board, the AD9833 which we will use in tandem with the Arduino Nano to get square, sine and triangle waves.

Supplies

AD9833

Arduino Nano

LCD Display

Rotary Encoder

2 x Push Buttons

Connectors

Prototype Board

Circuit

breadboard.jpg
Circuit.png
Schematic.png

First step is to wire everything up on a breadboard to make sure everything works before soldering everything on a PCB.

The power is taken from a 9V or 12V power supply (regulated by the Arduino's regulator, so don't go crazy) or by the Arduino's USB interface.

Make sure to wire everything up correctly and let's now upload the code.

Code

The code has bits inspired by other people's work, but otherwise is tailored to this circuit.

The code allows for the frequency to go up to 12.5Mhz. You can increment the frequency faster by pushing the rotary encoder button. If you have your own modifications, use the arduino uno's USB port for updates.

Case

front panel.png
front panel.jpg

The case is 3d printed, but you can make it from any case and afterwards design the front & back panels. Front , back panels and buttons have been made by myself, but the case is taken from thingiverse: https://www.thingiverse.com/thing:1264391. Also, the rotary encoder knob is from thingiverse: https://www.thingiverse.com/thing:4708988. You can skip this knob, but i wanted a semi-professional looking tool.

The printed button covers are inserted into the panel's opening and then "sealed" between the panel and the front panel's PCB, right after the coresponding push button.

For better adhesion to the desk, I added some rubber feet.

Wiring Everything Up in the Case

wire2.jpg
wire1.jpg

I chose to use a BNC female to the front and very poorly designed binding posts to the back. Also secure the panels, PCBs and connectors in place with silicon glue or screws.

Labeling Buttons

index2.jpg
index.jpg
index3.jpg

It's nice to have labels on everything. Also add your signature and date of creation.

3D Modelling of the Generator

Signal Generator.png
Signal Generator.png

This step is made as an update for viewing the final product. Be aware! The 3D model is neither an accurate, nor a complete model, it's meant to be just as a quick preview, since the photos aren't that great.