Simple function generator USB

Thread Starter

drkblog

Joined Oct 4, 2012
109
I bought a DDS (AD9850) module for Arduino. I plan to build a simple (and cheap) USB function generator. The module outputs square and sine wave forms. And works up to 40MHz for sine, and 1MHz for square. At 20MHz sine waveform goes down to 165mVpp (at lower frequencies, and up to 1MHz it's 1Vpp). Square waveform is Vcc..GND and to 20MHz it's like a sine of 1.3Vpp

Anyway, I don't plan to build a professional function generator. In Buenos Aires, buying a professional one would take 300 USD at least. But I want to make the best I can with this little toy.

Let's get to the point

I have a couple of ideas for adding some functionality. But not sure how to implement them, or if they are going to work (at least in theory).

  1. Increasing/decreasing output frequency as fast as I can (according to datasheet changing frequency would take 500ns) but it doesn't specifies a maximum frequency changing rate.
  2. Amplifying the output signal.
  3. Transforming the output signal into another waveform.
Which amplifier should I work with? I have been reading about high bandwith op amps? I can buy LF357N here (at 2.2 USD)


Should I protect the output? How?
 

Thread Starter

drkblog

Joined Oct 4, 2012
109
But LF357N has 20MHz bandwidth and there are others with even more bandwidth. Is there something I am missing? (contesto en inglés para mantener la legibilidad a todos los usuarios)
 

Thread Starter

drkblog

Joined Oct 4, 2012
109
Yes, I know, that will leave us with less than 20MHz if gain is two or three. But we could get an op amp with 40MHz I guess (for amplifying). What happens if we find one with 60MHz at a reasonable price? I have nothing against the differential amplifier proposed by atferrari, of course. I'm asking because I would like to keep the circuit small and simple (if possible).
 

Thread Starter

drkblog

Joined Oct 4, 2012
109
Then, assuming I can get one of those at a reasonable price. Is there any other reason for not using then instead of the stage proposed?
 

bertus

Joined Apr 5, 2008
22,270
Hello,

The output current capability of the circuit by atferarri will probably be higher as with an opamp.
The driving of a lower impedance load will probably be better with the discrete version.

Bertus
 

Thread Starter

drkblog

Joined Oct 4, 2012
109
So, is there any way of improving bandwidth of the discrete stage proposed? Without redesigning the whole circuit.
 

Thread Starter

drkblog

Joined Oct 4, 2012
109
Let's say I build that output stage. Now, I have sine and square waveform. What else can I do for adding options to the output? Can I transform these signals into another one (for example: triangular)?
 

Thread Starter

drkblog

Joined Oct 4, 2012
109
Using transistors with higher fT.
I've bought the components for the stage. Now, is it possible to use it with a single supply circuit. Let's suppose I use +5V and GND, and pass the signal AC coupled to a voltage divisor, and from the divisor to the input? (I think that could ruing the DC configuration of the amplifier)
USB has a single 5V power supply. I would like to keep this as simple as possible.
 
Last edited:

Thread Starter

drkblog

Joined Oct 4, 2012
109
The design works with the voltages as shown. I even tried with higher values but meant a major redesign which I abandoned.
That's what I though. What I have to decide is whether I add a power supply to the device. Using USB only is great, it keeps the device small and cheap. But I will be limited to 5 volts. Adding a dual power supply would let me use the stage proposed and, of course, reach signal amplitude above 5V. But it will require an extra connection to a power adapter.

Another option would be discarding USB and building it stand-alone. That will require a couple of controls and a display. In order to be able to set the frequency and phase.

Is there any all-in-one control which allows to setup a binary value by hand. And outputs a 16 bit number (just like a counter)? I don't know if I am explaining myself.
 

djsfantasi

Joined Apr 11, 2010
9,156
drkblog said:
Is there any all-in-one control which allows to setup a binary value by hand. And outputs a 16 bit number (just like a counter)? I don't know if I am explaining myself.
I know I am confused. How do you see the difference from a binary value and a 16 bit number?
Or have I strayed off-topic?
 

Thread Starter

drkblog

Joined Oct 4, 2012
109
I know I am confused. How do you see the difference from a binary value and a 16 bit number?
Or have I strayed off-topic?
What I am looking for is a control (like a wheel or a couple of buttons) which changes a number and outputs it like a binary-decimal CMOS counter. In this case, for selecting the frequency of the DDS without using a microcontroller.

Something like this circuit, but integrated in one unit:

 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Try searching for a BCD thumbwheel switch.
This is one type:
http://www.digikey.com/product-detail/en/322100000/CKN9647-ND/2054925
They have four binary coded decimal outputs, and one or two inputs for the logic level(s). Obviously, if there is only one input, you'll need to use pull-up or pull-down resistors on the outputs.

Beware that your bandwidth requirements will go up tenfold for other waveforms. An ideal square wave consists of the fundamental frequency (sine wave), plus ALL of the odd harmonics. An ideal triangle wave consists of the fundamental frequency (sine wave) plus ALL of the EVEN harmonics. To get perfect square or triangle waves requires unlimited bandwidth, which of course is impossible.

You might consider the OPA355; it has a GBW of 450MHz and is about $2 in the USA:
http://www.digikey.com/product-detail/en/OPA355NA/3K/296-14628-1-ND/555626

You might also consider current-feedback amplifiers instead of the usual voltage feedback operational amplifiers. One very common type of current feedback amplifier is the video amplifier. These are available with bandwidths exceeding 1GHz.

I don't know offhand what suppliers you might have available in Argentina.
 

DickCappels

Joined Aug 21, 2008
10,152
The discrete amplifier was designed because there was no easy way (read that as quick and inexpensive) to obtain a suitable integrated version, such as the Zetex amplifier it replaced. The use of an OPA355 or similar chip, if obtainable in your area is possible, would be the preferred solution.
 
Top