Author Topic: Function Generator  (Read 10512 times)

0 Members and 1 Guest are viewing this topic.

Offline aryasridharTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: in
Function Generator
« on: April 27, 2015, 07:47:04 am »
Hi Guys,

I checked various options for a function generator, but then I do not see anything that I can get without overly spending. I decided to go with building one for myself, I test frequency response of my guitar effects pedals so all I need is a good generator that can give me about 100Hz to 10Khz, that's my range requirement, however anything more is always good :)

Could someone advice a schematic, which is not overly complicated, since I need a simple build for the generator and I also need a Square/Sine/Triangle wave outs.

Would highly appreciate if I could get some information on this please...also if the transistor/IC used is generic enough would be great, since availability of components is a pain in the arse here locally, and for one part I do not want to look up and get something imported.

Some parts that I have at hand are, 2n2222, 3904, TL072, 2n5088 etc...
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 508
  • Country: no
  • tinker - tinker, little noob.....
Re: Function Generator
« Reply #1 on: April 27, 2015, 08:07:49 am »
Something like this perhaps ?
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: Function Generator
« Reply #2 on: April 27, 2015, 08:08:20 am »
Does your PC have a sound card?

Offline smjcuk

  • Frequent Contributor
  • **
  • Posts: 464
  • Country: gb
Re: Function Generator
« Reply #3 on: April 27, 2015, 08:37:50 am »
Don't use a sound card - they're horrid.

Something like this perhaps ?

Never managed to get a decently shaped wave out of the old three op amp circuits. Mathematically speaking, they work but the output leaves a lot to be desired.

If you want an AF sine only generator, I've been using this for a number of years successfully powered off 2x 9v batteries or 24v DC linear wall wart and another 741 used as a virtual ground. Don't worry too much about the precisely specified bulb - it's pretty damn stable with any typical 12v bulb too. Does 7Hz to 70kHz and can be knocked up from junk box parts - TL072 should work fine:
  ... distortion ~1%. I can't cite the source for this as I have no idea where it came from so if it's copyright, please let me know and I'll remove it and/or redraw it. If you need impedance conversion you can use any complimentary pair of transistors to buffer the output, else stick a pot as a voltage divider on the output to get it down to 1v p-p for audio and pump it straight into your pedal.

I tend to just use a 555 RC timer or logic with a crystal and divider circuit for square wave, build a new oscillator for anything higher that kicks out sine waves from scratch (takes 5 mins with some practice) and never needed a triangle wave.

Another great source of cheap/DIY function generator circuits is service manuals. The LG scope here has one on page 68. You can probably leave a lot of parts out and get away with it: http://freepdfhosting.com/f9744ba778.pdf

« Last Edit: April 27, 2015, 09:02:17 am by smjcuk »
 

Offline HKJ

  • Super Contributor
  • ***
  • Posts: 3157
  • Country: dk
    • Tests
Re: Function Generator
« Reply #4 on: April 27, 2015, 08:53:27 am »
On Ebay you can find some function generators for less than $30
 

Offline JBaughb

  • Regular Contributor
  • *
  • Posts: 85
  • Country: us
Re: Function Generator
« Reply #5 on: April 27, 2015, 08:58:01 am »
http://www.ebay.com/itm/1PC-DDS-Function-Signal-Generator-Module-Sine-Square-Sawtooth-Triangle-Wave-Kit-/251768575779?pt=LH_DefaultDomain_0&hash=item3a9e939723


ECG = electrocardiogram wave (in the OFF state, the "left "and "right" keys to set the output frequency. Middle button start, all of the following waveform set)
Rev Sawtooth = reverse sawtooth
SawTooth = sawtooth
Triangle = triangle wave
Square = square wave

Specification:
Operating voltage: DC7-9V
DDS frequency range: 1HZ-65534Hz
High-speed frequency (HS) output up to 8MHz
DDS signal amplitude of the offset amount can be adjusted separately by two potentiometers
DDS signals: sine wave, square wave, sawtooth, reverse sawtooth, triangle wave, the ECG wave and noise wave
1602 LCD menu
Intuitive keyboard
Section into the value: 1,10,100,1000,10000 Hz
The power automatically restore the last used configuration
Offset: 0.5pp-5Vpp
Amplitude amount: 0.5Vpp-14Vpp
Weight: 120g
Color: White
« Last Edit: April 27, 2015, 08:59:34 am by JBaughb »
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1484
  • Country: 00
Re: Function Generator
« Reply #6 on: April 27, 2015, 09:07:53 am »
- Filter based sine oscillator (i.e. wien bridge, twin-T, state variable, ...)
- You probably want electronic gain control instead of a light bulb, at least if you want good amplitude flatness down to lower frequencies
- Switch ranges by switching filter caps
- Tune with pot. Select one out of several with good matching
- Square wave with fast comparator (easily done with a discrete differential amplifier)
- For audio use a step attenuator and 0 ? output impedance is probably most useful

Just use NE5532/NE5534 for all op amps ; they're excellent. TL0xx are not overly good op amps for general purpose use, but will suffice, too.


If you search thoroughly you'll probably find a used generator on eBay for less than you'd have to pay for a bunch of switches and a case alone, so I'd recommend going with that approach. If the performance isn't up to what you expect you can replace the oscillator core with something better...
« Last Edit: April 27, 2015, 09:09:43 am by dom0 »
,
 

Offline smjcuk

  • Frequent Contributor
  • **
  • Posts: 464
  • Country: gb
Re: Function Generator
« Reply #7 on: April 27, 2015, 09:32:24 am »
Good recommendations.

Amplitude is rather unstable across the frequency range on the design I provided. 1970s state of the art for you :)

The incandescent bulb works far better than any other circuit I tried including tempco resistors for frequency stability versus temperature and supply voltage though - was rather surprised. Can leave it a couple of hours in the sun and it'll hardly drift at all.
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Function Generator
« Reply #8 on: April 27, 2015, 12:10:27 pm »
So far suggestions are probably more expensive and complicated than necessary. The circuit below works very well from 10hz-100khz and with addition of a couple diodes produces excellent sine. Personally since there is virtually no perceptible difference between the two, I find no need for sine and find triangle adequate for audio work.

If true sine is required then a simpler version of that light bulb phase shift circuit will do but IMO only for the purist.
 

Offline aryasridharTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: in
Re: Function Generator
« Reply #9 on: April 27, 2015, 03:41:25 pm »
http://www.ebay.com/itm/1PC-DDS-Function-Signal-Generator-Module-Sine-Square-Sawtooth-Triangle-Wave-Kit-/251768575779?pt=LH_DefaultDomain_0&hash=item3a9e939723


ECG = electrocardiogram wave (in the OFF state, the "left "and "right" keys to set the output frequency. Middle button start, all of the following waveform set)
Rev Sawtooth = reverse sawtooth
SawTooth = sawtooth
Triangle = triangle wave
Square = square wave

Specification:
Operating voltage: DC7-9V
DDS frequency range: 1HZ-65534Hz
High-speed frequency (HS) output up to 8MHz
DDS signal amplitude of the offset amount can be adjusted separately by two potentiometers
DDS signals: sine wave, square wave, sawtooth, reverse sawtooth, triangle wave, the ECG wave and noise wave
1602 LCD menu
Intuitive keyboard
Section into the value: 1,10,100,1000,10000 Hz
The power automatically restore the last used configuration
Offset: 0.5pp-5Vpp
Amplitude amount: 0.5Vpp-14Vpp
Weight: 120g
Color: White

WOW, i just placed an order for this, this particularly for the price suits me just well enough...I was in the local electronics market today trying to find one and found some cheapass ones, which were not at all good, just got back home and saw the replies...

Thank You So Much all you guys.....
 

Offline aryasridharTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: in
Re: Function Generator
« Reply #10 on: April 27, 2015, 03:42:58 pm »
Also, I sure am going to work on the circuits mentioned out here, especially the 2n3904 based one and the LG scope document one....just to try my hands at it....Infact I am working on one right now, i shall post more details here once I get it up and running, it is on the breadboard at the moment....
 

Offline Lightages

  • Supporter
  • ****
  • Posts: 4316
  • Country: ca
  • Canadian po
Re: Function Generator
« Reply #11 on: April 27, 2015, 06:04:41 pm »
I don't know why you wouldn't just use the sound output of your computer. You get so much more flexibility and it costs you nothing.

Visual analyzer is a good program:
http://www.sillanumsoft.org/ and it is free
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1484
  • Country: 00
Re: Function Generator
« Reply #12 on: April 27, 2015, 06:40:17 pm »
Some on-board sound cards are surprisingly bad in many aspects (mainly noise and jitter, THD seems to be a non-issue for nearly all devices).
,
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2821
  • Country: us
Re: Function Generator
« Reply #13 on: April 27, 2015, 07:16:18 pm »
There are a surprising number of MCUs available these days with one or more onboard 12-bit 1MSps DACs, and plenty of flash to store lookup tables.  For audio frequency purposes, that'd be a very tempting way to go for a small standalone device.  In fact, I'd be surprised if there isn't already something out there for the Arduino Due.
 

Offline Sigmoid

  • Frequent Contributor
  • **
  • Posts: 488
  • Country: us
Re: Function Generator
« Reply #14 on: April 27, 2015, 07:37:57 pm »
While it's a cool project, you can in fact get a pretty usable Goldstar analog sweep function generator off of eBay for about $50. It's nothing to write home about, but at this price it's virtually free. There are lots of these things floating around, I got mine for $40.
 

Offline aryasridharTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: in
Re: Function Generator
« Reply #15 on: April 28, 2015, 05:14:49 am »
While it's a cool project, you can in fact get a pretty usable Goldstar analog sweep function generator off of eBay for about $50. It's nothing to write home about, but at this price it's virtually free. There are lots of these things floating around, I got mine for $40.

Living in US has its advantages I guess, I can not find one at that price shipped to me :)
 

Offline aryasridharTopic starter

  • Regular Contributor
  • *
  • Posts: 86
  • Country: in
Re: Function Generator
« Reply #16 on: April 28, 2015, 05:41:12 am »
I don't know why you wouldn't just use the sound output of your computer. You get so much more flexibility and it costs you nothing.

Visual analyzer is a good program:
http://www.sillanumsoft.org/ and it is free

Well, I have been using my android phone as a function generator so far, and it gets tough when I have to capture a reading or do a clip while taking measurements, also attending calls is an issue, my laptop is a company provided one and I cannot install any softwares on it other than what is needed by me at work..and now I am left with my iMac, which I can install stuff on, but having an iMac near my workbench is another issue...It is always good to have a dedicated device doing the thing for me...if it is cheap, that makes it much better..
 


Offline Maximus

  • Contributor
  • Posts: 21
  • Country: ca
Re: Function Generator
« Reply #18 on: May 03, 2015, 10:04:50 pm »
Im surprised no one has mentioned EXAR's 2206 IC.  They are pretty easy to set up and use and cost about $2.
http://www.uni-kl.de/elektronik-lager/416623
My field of study has become so complex that I can no longer just Wikipedia the answer
 

Offline smjcuk

  • Frequent Contributor
  • **
  • Posts: 464
  • Country: gb
Re: Function Generator
« Reply #19 on: May 03, 2015, 10:39:45 pm »
Im surprised no one has mentioned EXAR's 2206 IC.  They are pretty easy to set up and use and cost about $2.
http://www.uni-kl.de/elektronik-lager/416623

They were pretty hard to get hold of a while back. Supply might have loosened up a bit now.
 

Offline ez24

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
Re: Function Generator
« Reply #20 on: May 03, 2015, 10:45:32 pm »
I also have been looking at the XR-2206  but no cheap kits or pcbs

but I am going to order parts to build one on a 170 socket breadboard using small components (the pots and switches)

FYI

[url=https://www.jameco.com/Jameco/Products/ProdDS/20685%20Manual.pdf]https://www.jameco.com/Jameco/Products/ProdDS/20685%20Manual.pdf
[/url]


[url=https://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_20685_-1]https://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_20685_-1
[/url]

YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: Function Generator
« Reply #21 on: May 04, 2015, 12:45:49 am »
I thought the XR-2206 was discontinued years ago. I wonder where they're coming from.

edit: I just checked and they EOLed it in 2011.


http://www.exar.com/files/changenotifications/pdn_11-0112-01-xr2206d-1033.pdf
« Last Edit: May 04, 2015, 12:48:55 am by rdl »
 

Offline yramgu

  • Contributor
  • Posts: 44
  • Country: fr
Re: Function Generator
« Reply #22 on: May 05, 2015, 07:29:21 pm »
The Wien-bridge oscillator is perfect for that. I built one as a school project back when I was a student, with a double-pot to tune the frequency. Works like a charm at audio frequencies! It produces a very clean sinewave (I was quite amazed by the result back then^^). Use a double op-amp and you can add a gain (or attenuator) stage to set the gain. Very educative project!

The classic square/triangle generator suggested by paulie would also work: the spectrum of a triangle is very close to that of a sinewave. You wouldn't hear a difference, especially in guitar gear
 

Offline Maximus

  • Contributor
  • Posts: 21
  • Country: ca
Re: Function Generator
« Reply #23 on: May 12, 2015, 06:07:34 am »
I thought the XR-2206 was discontinued years ago. I wonder where they're coming from.

edit: I just checked and they EOLed it in 2011.


http://www.exar.com/files/changenotifications/pdn_11-0112-01-xr2206d-1033.pdf
Now Im sad, I liked that IC.
My field of study has become so complex that I can no longer just Wikipedia the answer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf