Function Generator - Page 1
Forum section: electronics / beginners

author: Unknown
author_rank: Unknown
timestamp: June 03, 2010, 03:37:57 am
content: I have several questions:1. What am I looking for in terms of purchasing a function generator?2. What is a typical maximum voltage + frequency when looking for a good one?3. Does it need a counter, what kind of isolation, are digital better or analog?4. Is a portable function generator better than a LAB one?

author: Unknown
author_rank: Unknown
timestamp: June 03, 2010, 04:21:02 am
content: A function generators is the jack of all trades of signal sources. It can do sines, square waves and triangular waves (and often variants like ramps and pulses) from audio frequencies up to 1MHz or so. They're not the best at any single aspect, but they are the most versatile. If you only need pulses, pulse generators offer more features and bandwidth. If you want very pure sine waves, an audio oscillator will have lower distortion. If you want a really stable frequency for RF work (eg. as CW), a signal generator has more bandwidth and a more stable output. But if you don't have any special requirements, a function generator will do (some of) all that for less money.Sines are useful for sweeping, bandwidth and gain tests. Square waves let you see both the low and 'high' frequency response of a circuit at the same time. Triangle waves are useful for testing cross-over distortion and clipping.5: If you don't need a function generator, great, you just saved yourself some money. I've used them as clock source, testing counter IC's, testing amplifier bandwidth, testing dynamic range (clipping), measuring capacitance/inductance, injecting signals in circuits and much more.1,2:It does depend on your intended use. There are basic function generators that barely exceed the audio frequencies, and really expensive function generators that do arbitrary waves and sines up to 80MHz or so (Agilent 33250A). Both have their uses. As basic, I would probably look at something that does at least sines up to 1-5MHz or so, and also square and triangular waves (these often have a lower max frequency, read the specs carefully). Maximum voltage is usually something like 20V in open circuit, I more often bump against the lower limit than the upper limit, so I value something like a built-in attenuator. The output impedance is usually either 600 ohm (audio standard) or 50 ohm (rest of the world). If you're not into audio, 50 ohm is most useful, although this probably doesn't matter much at these frequencies.3: I don't consider a built-in counter important, but it depends on your other equipment. If you have another counter or digital scope, you can use that. Plus the frequency dial should have a pretty good resolution, and a function generator isn't designed as stable, accurate frequency source. If it does have a counter and you don't have anything else to measure frequency, it might be nice if you can feed an external signal into the counter. Not sure what you mean with the kind of isolation? Some function generators float up to 50V or so, this can help against ground loops, but I don't consider this very important for my work. Not sure what digital vs. analog means I haven't seen many analog counters. There are digital function generators, these use DDS (direct digital synthesis). This creates more stable signals with less distortion, but is more expensive and more recent (you're less likely to find a used DDS function generator).4: Depends on how you define better. I haven't seen many good portable function generators, but I haven't searched either. Most are bench style, so unless you have a specific need for portable, you should probably get a bench one. I'm not a fan of portable instruments for lab use. With bench instruments, I don't have to change batteries, I can just stack them, they often have better controls and displays, and they just stay in their place (unlike the DMM stand issue that Dave just published).Dave did a review of a (GW-Instek?) function generator in one of his early blogs, I think his opinion was somewhat mixed (very poor phase noise?), but there's probably some useful info in there even if you plan to buy something else.You might consider a used function generator from something like ebay, not sure how it would compare to price/performance to current items. Wavetek was a well-known brand for function generators.

author: allanw
author_rank: Frequent Contributor
timestamp: June 03, 2010, 05:45:27 am
content: I bought a BK 3010 off ebay for $20 shipped. It's pretty old but it can output up to 1MHz. So cheap

author: Unknown
author_rank: Unknown
timestamp: June 03, 2010, 07:39:14 am
content: One useful feature that many function generators have that I forgot to mention is sweeping. Sweeping will sweep across a part of the frequency spectrum (usually the start and stop frequency can be different by a factor of 100 or so) in a linear or logarithmic fashion. Coupled with a scope or spectrum analyzer, this lets you visualize the frequency response (depending on the amplitude flatness of the function generator). Some function generators I've seen are really bad in this regard (amplitude will decrease more than 50% when you approach the top end), others are almost as good as a leveled signal generator. Sweeping is usually a premium feature. Some function generators have a VCF (voltage-controlled frequency) input, that lets you sweep with an external ramp (but you have to generate that ramp somehow).

author: saturation
author_rank: Super Contributor
timestamp: June 03, 2010, 01:31:10 pm
content: I agree completely with alm's perfect summary, just my 2 bits. See also :https://www.eevblog.com/forum/index.php?topic=197.0I'd look at specs and prices of top brand function and arbitrary waveform generators from Agilent to know the price scales, so you know how good a 'bargain' the eBay one's are [ particularly old HP FG] or the value of low end ones like Instek, BKPrecision etc.,I do agree with Dave & alm, about DDS FGs over analog. Instek's low end, offers a bang for buck if you compare its functions, frequency response and price against similarly spec'd analogs or even eBay seconds:http://www.tequipment.net/InstekSFG-1003.htmlJust be aware many old analog FG are RLC based, so older one's risk being much off spec. They could also be subtly damaged if, in its lifetime, its outputs were subjected to high inputs during prototyping.FG with counters often have other added functions, the counter being just one of them. You can get a basic FC to 1Hz -3 GHz that will corroborate your scope and DDS output, often under $100, and many are portable as they are used to detect types of radio emissions in a room these days. Any digital FC is superior, smaller, more reliable than old analog counters you can find on eBay.

author: Unknown
author_rank: Unknown
timestamp: June 03, 2010, 01:36:08 pm
content: Thank You, now I know what to look for now.... 1MHz - 20MHz @ 20Vpp w/ BK, ect.Which EEVblog Video was the Function Generator reviewed on.

author: tecman
author_rank: Frequent Contributor
timestamp: June 03, 2010, 03:37:21 pm
content: I have a TEK FG504 and AFG5101. Both are TM500 modules. The FG is an analog unit that gores up to 40 MHz and 30 volts and the AFG is programmable and all digital, but only hits 12 MHZ. You can fine these on ebay, sometimes for reasonable prices.As stated, for distortion or higher frequencies you will need something other than a function generator. The digital products generally have excellent frequency and amplitude stability. Square waves are generally limited in rise time, so be aware. Triangle is cute, but rarely used for most testing.I would advise looking on ebay, and stick with known, big name brands. You can get a lot of instrument very cheap.I have dealt with:http://www.users.uswest.net/~jbau/tstequip.htmHe has very nice stuff at reasonable prices.Paul

author: A-sic Enginerd
author_rank: Regular Contributor
timestamp: June 03, 2010, 03:51:19 pm
content: Quote from: allanw on June 03, 2010, 05:45:27 amSimilar here. BK 3011B. Something like 35 bucks (US). Sine, square, triangle, amplitude adjustable, DC offset adjustable. etc.Actually starting up to build my own. Basing it on an AD DDS chip. May wind up a little lacking in some areas, but figured it'll be a nice little project to gear up some of my skills for this sort of thing that I don't get doing chip design. In the end could probably buy a used one for cheaper than what it'll cost me to build, but for this my primary objective is to get some experience.

author: saturation
author_rank: Super Contributor
timestamp: June 03, 2010, 03:56:57 pm
content: Ah, these are FG that put others to shame!Quote from: tecman on June 03, 2010, 03:37:21 pm

author: Unknown
author_rank: Unknown
timestamp: June 03, 2010, 05:01:30 pm
content: Alright thank you for your feedback, I am more thinking about the model: Elenco GF-8046 or similar for around $80.00. It will go nice with a Analog O'scope for $100.00 I purchased.Thank You. Dave should do a blog on some of his other equipment. Does anyone have the EEVBlog # video from above?

author: dengorius
author_rank: Regular Contributor
timestamp: June 03, 2010, 05:39:13 pm
content: The blog is #5http://www.eevblog.com/2009/04/24/eevblog-5-instek-function-generator-review/

author: Unknown
author_rank: Unknown
timestamp: June 03, 2010, 06:45:25 pm
content: Quote from: saturation on June 03, 2010, 01:31:10 pmThose appears to be really good specs for the price, I don't think a new analog function generator in that range is much cheaper. It would be nice to find someone with real-world experiences to see if there are any issues that are not apparent from the datasheet (as some Chinese products tend to be: good specs, but bad for real-world use, like the Rigol AFG).Given the choice between old high quality equipment or new cheap stuff, I would usually choose the former. But a new technique like DDS might just be enough to make me swing to the other side (not that I need another FG).Quote from: saturation on June 03, 2010, 01:31:10 pmOn the other hands, those specs are usually pretty broad to begin with, a function generator, especially an analog one, isn't exactly a precision instrument, so I normally wouldn't worry much about calibration (easy to test with a scope). But it might not be a good idea to buy one as-is, try to make sure it outputs at least some signal. The low-spec analog ones are probably not too hard to repair.Quote from: saturation on June 03, 2010, 01:31:10 pmI consider a counter to be an inherently digital instrument, apart from the analog signal conditioning and triggering. How would you design an analog counter, charging a capacitor with pulses and measuring the voltage after the gate time, like a reverse integrating ADC? I don't think I've ever seen one of those. Even those really old counters with nixie tubes are digital, although the gates might be designed with tubes.Some useful features in counters are selectable trigger levels, multiple channels (and features like A/B and A->B) and a stable internal reference.Quote from: avrfreaks on June 03, 2010, 01:36:08 pm1MHz is a bit high as lower limit. 1mHz might be nice but rarely needed, 1Hz sounds about right.

author: Unknown
author_rank: Unknown
timestamp: June 03, 2010, 07:08:39 pm
content: I meant the upper range of frequency, 1Hz - 10MHz or 20MHz.When you mean it's easier to fix analog generators; what does a analog not have vs. a good digital generator? Also is it better to purchase rather than a DIY kit like Dave always talks about in his oscilloscope forum.

author: saturation
author_rank: Super Contributor
timestamp: June 04, 2010, 12:00:12 am
content: Hello Alm,You raised some interesting points that I'll break up to reply. It made me dig into the annals of real analog, and ancient electronics.An all analog and simple approach to frequency counting or estimating, was using a dip meter.Alas, when I replied I was thinking more of discrete transistors made into logic modules and later logic chips used in counters found in old gear sold on eBay.http://www.electricstuff.co.uk/venner.htmlI'm impressed your general idea on how counting could be done in analog is close to the way it was done prior to 1950s, when digital counters came to be, pioneered by HP.http://www.hpmemory.org/wa_pages/wall_a_page_11.htmFor more information on the analog approach, search for frequency "meter" rather than "counter."Quote from: alm on June 03, 2010, 06:45:25 pm

author: EEVblog
author_rank: Unknown
timestamp: June 04, 2010, 07:46:20 am
content: Quote from: avrfreaks on June 03, 2010, 07:08:39 pmDIY ones are fine. I've published two designs myself, and sold kits.Don't do that any more though.Dave.

author: Unknown
author_rank: Unknown
timestamp: June 04, 2010, 02:20:11 pm
content: Quote from: avrfreaks on June 03, 2010, 07:08:39 pmSine waves from a DDS generator have much less distortion (the sine wave from most analog function generators are usually just square waves with a bunch of shaping to vaguely resemble a sine) and a much more stable signal (which is why amateur radio people like them), since the basic time base is usually a crystal oscillator instead of an RC oscillator. The frequencies involved are much higher (as with all digital stuff, you have to oversample) and the circuit is significantly more complex (there are various descriptions on the basics of DDS available on the internet). For example, you need a pretty sharp filter (lots of poles) if you want to generate sines close to the Nyquist frequency without lots of distortion. Plus DDS function generators are a more recent development, so there is usually less service documentation available and the use of custom and very integrated parts is much higher.Same with analog and digital scopes: except for the power supply, most digital scopes are essentially unrepairable, and there's rarely a schematic available. Analog scopes often have full schematics available, and in some cases (eg. Tektronix) excellent service manuals, and repair is much easier. That doesn't mean you shouldn't buy anything made in the last twenty years or so, but I would be more hesitant to buy one with known defects or in unknown condition. But even modern highly-integrated stuff can have simple defects like electrolytic capacitors or tantalum capacitors (usually not that modern). I recently had a DDS function generator with a dead bridge rectifier (€0.25 part).The gap between DIY/kit function generators and commercial function generators is much less than the gap between a DIY and commercial scope, so I wouldn't dismiss DIY/kit designs. As usual, they are weaker in aspects like controls (often just a few pots instead of a multiturn dial with accurate scale), case (none or standard project box) and robustness (but they're easy to repair anyway), so the price/performance ratio has to me significantly better for me to consider them over used equipment from brand name manufacturers. I do have one kit that I bought because it did DDS to 30MHz (65MS/s or so) for cheap, but the output amplitude is max 5.5V or so, which is sometimes limiting. I also have to build proper controls and a case for it.@saturation:Thanks for the info! I never really considered how they measured frequency before they could build digital circuits (from whatever components) fast enough, although I did know about the grid dip meter.

author: saturation
author_rank: Super Contributor
timestamp: June 04, 2010, 05:54:24 pm
content: I have one. A new analog, or even another brand DDS, didn't come cheaper during my search ... the linked item was $153 delivered, in the USA. I ordered it from there and it was shipped from CA, I recall likely from Instek directly.Dave's eevblog review helped but that was in regard to an analog Instek model.I chose to consider Instek [ also known as Good Will] because of their reputation; Taiwan based and in operation since the 1970s. They have a more established reputation compared to any PRC founded company like Rigol , or Owon [ 2006 ].I have an old analog Trio signal generator [made in Japan by Kenwood] and by comparison, the Instek is rock stable in frequency, distortion free [ qualitatively], stable rise time, and p-p amplitude all throughout its operational range, no perceptible roll off at the ends, no perceptible drift from 0 to > 30min warm up [which the Trio recommends] ; triangle waves ramp up uniformly up to 1 MHz; unlike the Trio which jitters, drifts ever so slightly and has slow square wave rise times even after warmup; ringings here and there, its maybe just old too. The Instek will not accept any programmed input for frequencies above 3 MHz.The electronics occupy 1/3 of a traditional analog FG housing, so its mostly an empty box and very light.I haven't had time to actually quantitatively check the published specs over what I can measure, given my purpose solid stability isn't necessary, but DDS based FGs do raise the bar on price-performance. DDS is a key reason to consider a new FG over a good used analog FG, if one is in the market for an FG.Quote from: alm on June 03, 2010, 06:45:25 pm

author: DJPhil
author_rank: Frequent Contributor
timestamp: June 04, 2010, 09:02:07 pm
content: I was going to ask a question, but I found the answer, so I'll post it in case someone finds it useful.Looking at the specs of theGW Instek SFG-1003:Edit: As Saturation pointed out, the numbers are wrong below. I went with the numbers on the table at the above link at first, but they're obviously wrong as the generator doesn't go to 10MHz! New numbers were taken from the 'datasheet' link pdf on the same page.From the webpage on tequipment.netSine Harmonic Distortion =-55dBc, 0.1Hz~200kHz-40dBc, 0.2MHz~4MHz-30dBc, 4MHz~10MHz(Specification applied from MAX. to 1/10 level)From the pdf datasheet link on the same pageFrom Amplitude control at maximum position without any attenuation toits 1/10 of any combination setting, TTL OFF-55dBc, 0.1Hz ~ 200kHz-40dBc, 0.2MHz ~ 2MHz-35dBc, 2MHz ~ 3MHzMuch of the audio world measures harmonic distortion as %THD. It's a straightforward logarithmic conversion, but I'm big time mathtarded.This is where the 'in your head' calculation Dave talks about with dB comes in handy, if I could ever master it.There's awebsite herewhich has a calculator that does exactly this.Therefore the results for this machine =0.18% 0.1Hz~200kHz1.00% 0.2MHz~4MHz3.17% 4MHz~10MHzRevised numbers from Datasheet.0.18% 0.1Hz ~ 200kHz1.00% 0.2MHz ~ 2MHz1.78% 2MHz ~ 3MHzHope that helps someone.

author: saturation
author_rank: Super Contributor
timestamp: June 04, 2010, 09:10:31 pm
content: Sorry, what I meant was more on it being generally stable, than being precise and accurate. Also, as it ages, or if subtly damaged, distortion, frequency response, output voltage all could be off from its original design. Although the FG can appear to be working on receipt, the used equipment buyer needs to be aware it may not be anywhere near what it would have been new. As an analog device, there are many degrees of 'not working', its just to what level it can be tolerated for its intended use.Agree fully with you DDS assessment, and the digital vs analog equipment conundrum. Generally, digital is trending towards 'disposable' while the pure analog world had more repair options.On 'analog' frequency meters and more, my pleasure! I like exploring old devices. Getting an accurate frequency meter design was a big thing, because it help put HP on the map. On that link is a link to a free pdf of the history of HP, and if interested, HP's company history is very close to the history of modern electronics instrumentation.Quote from: alm on June 03, 2010, 06:45:25 pmQuote from: alm on June 04, 2010, 02:20:11 pm

author: saturation
author_rank: Super Contributor
timestamp: June 04, 2010, 09:32:08 pm
content: Thanks DJPhil, and for the website link.Its useful for general purpose audio amp testing if the overall THD within audible frequencies [and then some] were < 1%, so having it 0.18% makes the 1003 useful for general tests.http://en.wikipedia.org/wiki/Total_harmonic_distortionhttp://en.wikipedia.org/wiki/Audio_system_measurementsI'm not sure which spec sheet you read the other ranges from but the 1003 harmonics distortion was written as:55dBc, 0.1Hz ~ 200kHz-40dBc, 0.2MHz ~ 2MHz-35dBc, 2MHz ~ 3MHzThe maximum frequency output of the 1003 is 3 MHz. Now if your listing is a revised one, I wish it so! But the DDS can't be tricked into doing 10 MHz, I've tried! Type a number past 3.00000 and hit MHz and "err" is all you get.Now the next question, does this FG really live up to those specs? When I've time I'll check those published specs against what equipment I have that can resolve those measures.Quote from: DJPhil on June 04, 2010, 09:02:07 pm

author: DJPhil
author_rank: Frequent Contributor
timestamp: June 04, 2010, 11:19:34 pm
content: Quote from: saturation on June 04, 2010, 09:32:08 pmI wasn't paying close enough attention. I copied the numbers straight off of tequipment's site, and I guess the specs in the table were from another model in the family.I updated the numbers in the original post with data from the pdf datasheet on tequipment's servers, which agrees with the specs onInstek's site.I'm glad someone caught it, there's egg on my face this time.

author: saturation
author_rank: Super Contributor
timestamp: June 05, 2010, 11:53:10 am
content: Hi DJPhil,I just noticed that now on tequipment.net's site, so I'm just as guilty at not paying attention! Its their website that errs. Thanks for the time to help.I preferably go to a manufacturer's website for manuals and spec sheets. They are least likely to err when specifying their own products and have more data. I can also compare their product range. I was unfamiliar with them as a company, and their site gives a good chance to find out.http://www.gwinstek.com/en/download/downloadfilelist.aspx?id=94Some added tidbits on the 1003 versus the Rigol 1052E on receipt, both purchase from tequipment.net:Instek 1003Shipped from Instek USADetailed calibration certificate, traceable to CNAL, China's ~ NIST, with a strong emphasis on ISO 9001 compliancePaperwork in card stock, colored, clearly designedThe unit was double boxed with stiffer cardboardSealed cleanly with packing tapeThe outer box had some scarring, but was in almost as good shape as the inner boxPaperwork sealed in heat fused plastic bagsRigol 1052EShipped from tequipment.net in NJCalibration certificate traceable to a Fluke 9500B, wepresumeis NIST traceablePaperwork in laserprint paperDouble boxed with softer cardboardHaphazardly sealed with Rigol labeled packing tape, many bubbles and folds, it wasn't aligned straightThe outer box had much scarring, had streaks of black paint, and small holespaperwork sealed in ziplock bagsAlthough these are trivial elements, it suggest Instek pays far more attention to detail, has a more mature and refined system, and this may show in its entire product line. Rigol is getting there, and where it at times falls short reflects on some comments on this forum on damaged units, from either Rigols' shipping or packaging practice, or failure to control outlets for its products, and while the 1052E shines, its AWG seems poorly thought out.https://www.eevblog.com/forum/index.php?topic=197.0Quote from: DJPhil on June 04, 2010, 11:19:34 pm

author: Unknown
author_rank: Unknown
timestamp: June 05, 2010, 01:21:53 pm
content: Quote from: saturation on June 04, 2010, 05:54:24 pmI wasn't really talking about not meeting specs (Instek is a fairly reputable brand, so they probably got that one right), but other issues that can kill usability. Eg. loud fans, annoying user interface quirks, stupid control layout, unreadable display, bad documentation, that kind of stuff. The stuff Dave usually spends 90% of a review on. The software issue with the Rigol AFG is such an issue, although a function generator without arbitrary waveform capability doesn't really need software.About testing audio amplifiers, if you really focus on that, a dedicated audio sine wave oscillator (eg. Tek SG502 or SG505) will probably have an even lower distortion and should be available for about the same price. Of course there's nothing wrong with using the equipment you have for multiple purposes, but I probably wouldn't buy a function generator specifically for distortion testing.

author: tecman
author_rank: Frequent Contributor
timestamp: June 05, 2010, 04:44:02 pm
content: I agree with Alm. If you will be doing mostly audio work, an SG505 (0.008% distortion) or an SG502 (0.1% distortion) is a very good choice.. FGs are nice, but usually can not meet a 0.1% number over the frequency range.Paul

author: saturation
author_rank: Super Contributor
timestamp: June 06, 2010, 03:41:46 pm
content: Thanks for the tips on better equipment; like a DMM's general capabilities, my treatment of FG's are as a general purpose signal source. It can't hurt it to have better specs!Thanks for the opine on Instek, not really heard of them until recently, it helps reinforces my viewpoint of them for future needs.Quote from: alm on June 05, 2010, 01:21:53 pmQuote from: tecman on June 05, 2010, 04:44:02 pm