If you have an Arduino UNO this project is practically free!

It also makes a great Arduino Nano project.

What you need (only passive components):

  1. Just 10 Resistors
  2. One filter capacitor

What you get:

  1. A Direct Digital Synthesis (DDS) Waveform Generator
  2. True 50 kHz Sin-Wave capability
  3. Sin, Triangle, Ramp Up ,Ramp Down outputs
  4. And Arbitrary Waveform Generation (AWG)


  1. 50 kHz seen on an Analog Oscilloscope
  2. Arbitrary waveform created using a sum of f and 2f
  3. The arbitrary waveform spectrum
  4. An a compact version implemented using an Arduino Nano

Step 1: Breadboard and Circuit Schematic

The circuit implements a 6-Bit Digital to Analog Converter (DAC) using a 8-4-2-1 Resistor combination.

Arduino Uno Output pins 13 to 9 form the 6-Bits PB5 to PB0.

The Ideal resistors for the 8-4-2-1 network should have been:

1.1 K, 2.2 K, 4.4 K, 8.8 K, 17.6 K and 35. 2 K

However this has been simplified to

1.0 K, 2.2 K, 2.2 K + 2.2 K, 8.2 K + 560, 15 K + 2.7 K and 33 K + 2.2 K

The first 1.0 K instead of 1.1 K has been used to take care of the loading on the PB5 output.

A 0.01 uF filter capacitor is added to the resistor DAC output for smoothing the waveforms.

<p>what is i dont want to use the GUI software and i want make its function executed by hardware?</p>
<p>Good idea ! Rig up a PC1602 16X2 LCD display and increment/decrement the frequency to be set using two switches. Another switch could select the waveform type. The calculation for phase step corresponding to the frequency is currently done in the VB program this needs to be done on the Arduino. Everything should be good except the arbitrary function may not be possible. Could you work on this and share?</p>
Im not much of a programmer, but i love the simplicity of the hardware. I might be able to add a display and controls. I'd want to use I2C and a rotary encoder. I cant make any promises i cant keep, except if i do come up with anything, I'll post it here.
<p>Also consider an option using thumb-wheel switches. </p>
I do like that idea. I'll have to look around to see whats available these days. That would add a nostalgic look to it, and make it easy to change frequency. Electricaly, I think it will require one output per digit and 5 inputs if i multiplex. Ill have to do an I/O count to see if an Arduino has enough.
<p>Check out this link: http://www.edn.com/design/analog/4439796/Read-multiple-switches-using-ADC . If you use a BCD switch then only 10 combinations need to be decoded. As we use ADCs the number of pins should be sufficient. Plan for frequencies up-to 19999 Hz. 4 BCD switches and the other digital pins can be used for selection 0/1 for the 10 Thousands, Sin/Triangle and to initiate the setup frequency.</p>
<p>works great :)</p>
<p>Hi, I'm having a problem with the signal generating software. Every time I go to select a COM port it keeps timing out. I was wondering has anyone else encountered this problem and if so what do I do</p>
Pl check through device manager that the driver is installed correctly and what com port the Arduino is connected to. Try to connect to this port. Sometimes I find it connects only on the second attempt. Which version of windows are you on? Do normal sketch uploads work with your setup?
<p>I'm running on windows 10 and this is the first sketch I've tried as I'm new to Arduino. I made sure the drivers were up to date and that the arduino is connected to the right port and it still isn't working is there anything else I can try to fix it? Thanks</p>
<p>Sorry, I have checked the GUI only on Win 7 and Xp. However if the GUI opens it should work. I suggest you check the Arduino system by confirming that the 'Blinking-LED' sketch works. Then load the file I have provide or the alternative compiled by ThomasK19 and confirm the loading is OK. Close the Arduino IDE as it may still hold on to the com port. Then try the GUI I have provided. Meanwhile, I will try to check on Win 8.1 and Win 10 if possible. Feedback on Win 10 usage from other members is welcome. </p>
<p>great sound quality!</p>
<p>I guess you can convert it for the Arduino IDE by renaming <em>main</em> to setup and drawing the <em>while(1)</em> loop out into the <em>loop</em> routine.</p><p>Very nice write-up. Thanks for sharing!</p>
<p>As I am comfortable working with 'c' and have only written simple sketches. I did not write the program as a sketch. It would wonderful if somebody converts it to a sketch which would then be useful to a larger Arduino community. I can provide any technical inputs required.</p>
<p>I have modified the c source into an Arduino sketch with almost no issue (see attachment). Though I could not test it due to the lack of the hardware I'm sure it will work as expected.</p>
<p>Great work! I checked it out the Sketch runs fine.</p>
Hi.only have One question.You Check the wave Outside,wear you have a lot Electromagnetic fields.You even Check<br>If the wave you mini arduino Make can be use directional ground post.If you can do This<br>Please posted.We working in That and Any Help Count.
<p>Your 'One question' is tricky.</p><p>The noise seen on the output waveforms is partly because of the limitation of 200 points on my DIY scope. The Analog scope display is better. Next the 6-Bit resolution adds to the quantization noise. The D/A converter would have a noise floor of typically 36 db. Working with the PC usb port has limitations on ground coupling between circuits. I have run the Arduino from a desktop, if one uses a laptop and goes to battery mode then the generator is effectively floating and the ground is isolated from other circuits. Your requirement is for an isolation amplifier which would make things more complex.</p>
<p>Have you though about adding an op-amp to the output as a follower to offset the loading effects when you use this circuit to inject a signal into another circuit? It's been too many years since I've used an op-amp but it sounds right to me. It would be like adding a nice frosting to the perfect cake! :-)</p>
<p>Yes an external op-amp would be useful but I did not add it for two reasons. Firstly, I wanted to use only the minimum of components and that to only passive. And secondly, the I chose 1K as the msb resistor so that the network would have an output resistance of 1K or less (most audio signal generators are 600 Ohm). Audio circuits are coupled through a capacitor and so no level shifting is required. This met my design goal of minimum component count with maximum utility.</p>

About This Instructable




Bio: I am a retired Electronic Systems Engineer now pursuing my hobbies full time. I share what I do especially with the world wide student community.
More by ajoyraman:COMMUTATOR BASED DIRECTION INDICATOR Z Fold Display Board Standee Current Pulsing Keeps Power Bank Active 
Add instructable to: