Introduction: Signal Generator Using AD9833 and Arduino Nano
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
Step 1: Circuit
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.
Step 2: 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.
Attachments
Step 3: Case
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.
Step 4: Wiring Everything Up in the Case
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.
Step 5: Labeling Buttons
It's nice to have labels on everything. Also add your signature and date of creation.
Step 6: 3D Modelling of the Generator
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.