Gas station without pumps

2012 July 7

Building a function generator kit

Filed under: Circuits course — gasstationwithoutpumps @ 22:35
Tags: , , , , ,

My Elenco FG-500 function generator kit that I mentioned in Speakers and function generator arrived yesterday, so I spent some time this afternoon putting it together.

Because I wanted to run it off of wall warts, rather than a 9v battery, I made one mod to the kit:  I replaced the mini-phone-plug power input with a standard 2.1/5.5mm power barrel jack, so that I could use the 9v or 10v wall warts that I have.  This mod required two changes:

  1. I drilled out the power jack hole to 5/16″ to accommodate the larger barrel jack.  I was a bit surprised that the front panel was metal, rather than plastic.  but drilling it was easy.  I did end up using my wife’s Dremel motor to deburr the drilled hole—that’s the first time I’ve used the tool.
  2. Both the phone jack and the power barrel jack have switches so that the 9v battery can be used when the power is not plugged in, but the phone jack switched the +5v and the power barrel switched the ground lead, so I had to do a little rewiring to make the negative battery connection switched instead of the positive battery connection.

I was a little disappointed with the poor connections of the power barrels in the jack—wobbling them caused loss of power.  On reading the specs for the jack, I see that the center pin is a 2.0mm pin, not a 2.1mm pin, as Digikey had it listed, so I may need to buy another jack, perhaps the Switchcraft 722A, which has a tapered center pin.  (I’d not gotten that originally, because it costs $3.52 rather than $2.43 for the CUI PJ005A, and I didn’t see a significant difference.  Now I think I know what the difference is, and I would have saved money by buying the more expensive part the first time.

The instruction manual that comes with the kit is quite good, reminiscent of the old Heathkit manuals.  It was from reading this manual that I realized that I would need to get a power barrel jack to use the kit the way I wanted. It starts with a checklist for the parts list, but some of the parts are had to check.  For example, there are three nuts for the binding posts and two for the potentiometers. They look the same, but have different threads. As it turns out, they sent me 5 that match the binding posts (5/16″-18) and only 1 that matched the potentiometer (which they say is 7mm, but is probably 5/16″-24), and I did not have a spare nut of the right size. If it really is an M7 nut that is needed, I’m going to have a hard time finding one—just about everyone skips that size, and uses M6 or M8, so I hope it is a 5/16″-24, as those are readily available.  (I’ll even check the hardware store tomorrow, though they are unlikely to have the skinnier jam nuts—I’ll probably have to order from Amazon.)

[Update 2012 July 10: the hardware store had both M7 and 5/16″-24 jam nuts.  The M7 nut did not fit, but the 5/16″-24 did.]

I got everything assembled without mishap, and it worked right away with either the 9v or the 10v wall wart.  I suspect it would work best at 12v, since that is what the  XR2206 chip is spec’ed at.

I tried using my old Fluke 8060A multimeter to measure the frequency (using the 10v wall wart):

  • Range 10: ?–15.35Hz (meter cuts out at 11.3Hz)
  • Range 100: ?–161.96Hz (meter cuts out at 11.3Hz)
  • Range 1K:  97.0Hz–1640.9Hz
  • Range 10K: 970.4Hz–15533Hz
  • Range 100K: 9.738kHz–142kHz
  • Range 1M: 107.8kHz–? (meter cuts out at 200kHz)

I would guess that the Range 100 setting goes down to about 9.7Hz and the Range 10 setting from about 0.97Hz to 16.2Hz.  Using the oscilloscope to estimate the time for the square wave pulse, I get

  • Range 10: ?—61msec (?–16.4Hz)
  • Range 100:  95msec–5.8msc (10.5Hz–172Hz)
  • Range 1K:  9.6msec—570µsec (104Hz–1750Hz)
  • Range 10K: 960µsec–62µsec (1.04kHz–16.1kHz)
  • Range 100K: 97µsec–6.65µsec (10.3kHz–150kHz)
  • Range 1M: 8.8µsec–0.905µsec (114kHz–1.1Mz)

I’m getting rather different readings from the Fluke multimeter and the oscilloscope, and I suspect that the problem is an uncalibrated scope. The top range starts about 11 or 12 times higher than range below it, because the capacitor used for the top range is 820pF rather than 1000pF.  I’ve still not figured out why they did that in the design, and I’m considering unsoldering it and replacing it with the expected 1000pF.

I tried using the Arduino (with a slight modification of the Superpulley code my son wrote) to time the lower frequencies:

  • Range 10: 1.0878s—65.05msec (0.919Hz–15.373Hz)
  • Range 100:  102.77msec–6168µsec(9.731Hz–162.127Hz)
  • Range 1K:  10.28msec—? (97.2Hz–?) starts missing ticks around 600Hz

The Arduino timing confirms that the Fluke multimeter is roughly correct, and that the timebase in the oscilloscope is a bit off. I don’t know what the Fluke timebase uses, but the Arduino crystal should be better than 0.3%, which is the discrepancy between the Arduino and the Fluke.  I checked around 20Hz and 200Hz, and the two agreed to 0.1%, which is the limit of reporting on the Fluke.

The Arduino program also gets good measurements for the very low frequency end, which was not feasible for the multimeter or the scope (a digital storage scope would have worked well, but the analog scope I’m using faded too fast).

No one would mistake the Elenco function generator for a professional function generator, as the output “sine wave” is awful. Perhaps the worst feature is a strong –5mV pulse at every rising edge of the square wave (the minimum of the sine wave) and a 10mV pulse at every falling edge (the maximum of the sine wave).  These pulses last about 60nsec, much less than the rise time of 220nsec, but comparable to the fall time of 60nsec for the square wave.  The amplitude of the noise is roughly constant, independent of the amplitude of the sine wave, but is slightly less if using the triangular wave form, rather than the sine-shaped one.  I don’t know whether this noise is introduced in the XR2206 chip, in the wiring to the outputs, or coupled through the power supply. Any of these are possible, as no bypass capacitors were used (other than electrolytics).  I wonder if adding a 47µF ceramic capacitor across the power leads (between pins 4 and 12) would help any.


  1. I put in the 1nF capacitor for the top range, so that the top range is now (on the scope) about 11.2–1.6 µsec (89.3kHz–625kHz), which is a bit slower than desired. I guess the parasitic capacitances are large, though not quite as big as the 820pF design would imply. I’m a little afraid to unsolder and resolder the capacitor again, as the trace on the board is delaminating.

    Adding a 4.7µF bypass capacitor to Vdd next to the chip did not reduce the glitches from the square wave transitions—I’m afraid they may be intrinsic to the chip,

    Comment by gasstationwithoutpumps — 2012 July 13 @ 16:03 | Reply

  2. […] rather than my separate function generator.  It produces somewhat cleaner signals than the Elenco FG-500, but there is a nasty click between frames, when the BitScope is dumping data to the host computer […]

    Pingback by Disappointing power-amp lab « Gas station without pumps — 2012 December 22 @ 22:36 | Reply

  3. […] makes this a much more useful function generator than the one built into the Bitscope or the analog Elenco FG500 that I’ve talked about […]

    Pingback by FG085 function generator | Gas station without pumps — 2015 June 30 @ 11:20 | Reply

  4. […] function generators, I’ve looked at several choices, including the Elenco FG-500 kit and the JYETech FG085 kit. Although none of them are really satisfying, the FG085 kit is probably […]

    Pingback by Reworking electronics class for cheap equipment | Gas station without pumps — 2015 July 17 @ 23:09 | Reply

  5. […] previously reviewed a couple of cheap function generators: the Elenco FG-500 and the JYEtech FG085 (also here and here). But I can’t remember whether I’ve reviewed […]

    Pingback by Bitscope function generator review | Gas station without pumps — 2015 August 17 @ 23:11 | Reply

  6. […] this year, but one of the function generators from the Analog Discovery 2.  I still used the Elenco FG500, despite the very low quality of its waveforms, because it has a knob that is easy for kids to […]

    Pingback by Santa Cruz Mini Maker Faire 2017 | Gas station without pumps — 2017 April 29 @ 23:37 | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: