Thursday, 20 October 2016

Chip Chat No.2 - A low cost function generator


I recently stumbled across a function generator kit on Amazon. On the basis that an electronics ‘den’ can never have too many frequency sources, I ordered one. 

For around $10 you get a pre-drilled PCB, a bag of components and a basic enclosure. Photo 1 shows the end result once I’d soldered it together.

The kit instructions are pretty basic and it helps to have a ohm-meter to check resistor values etc. as you go along. Overall however, things are clear enough.

You need to supply the board with between 9V and 12V (the datasheet warns of instability above 12V). The first thing I did was to plug in a supply of the wrong polarity, “popping” one of electrolytic cap’s and frying the IC. Grrrrr! Fortunately both were cheap to replace.

The board is based around an Exar Corporation XR2206 Monolithic Function Generator IC. The chip datasheet describes applications of this chip as function generators (it’s role here) and communication instrumentation (in particular FSK applications; more about this another time). The XR2206 comprises a voltage controlled oscillator (VCO) oscillating at a frequency set by an external resistor + capacitor. On the board, this resistor is a couple of pots. A row of jumpers allows you to change the capacitor range. On-chip wave-shaping allows you to output a square, triangle or sine wave.

As you’d expect for the price, there are limits to the quality of the output waveforms: On the up-side, you can generate waves from a few Hz to 1MHz. Adjusting frequency and amplitude is as easy as twiddling the knobs. Using these I was able to adjust frequencies to within a few 10th's of a %.

On the downside, the datasheet advises you’re limited to 0.5% sine wave distortion with a maximum amplitude variation of  4800 ppm/degC, set partly by external resistors. The DC value of the output waveforms is centred around 50% of your power rails and I found the sine- and triangle waves began to clip around 4Vp-p. The square wave amplitude isn't adjustable. Finally, I noticed some peak-to-peak amplitude asymmetry (especially at low frequency). 

As every electronics designer knows, there are times when you need precision. Other times however, you just need some waveform and desperately don’t want to have to wait a week for your £5000 function-generator software to boot! You’re not going to be running your atomic-clock off this baby, but overall I’m happy with what I got for my $10.

Finally, for those interested, here're some of the output waveforms: 

1kHz sine 







From here on I switched the oscilloscope to AC coupling.
1kHz triangle...








1kHz square...







1kHz sine starting to clip above 4Vp-p...







600kHz Sine...









10Hz sine...

No comments:

Post a Comment