Author Topic: Function generator for audio?  (Read 9767 times)

0 Members and 1 Guest are viewing this topic.

Offline stev.dkTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: dk
Function generator for audio?
« on: April 16, 2013, 07:02:47 pm »
In addition to my Beginners oscilloscope for audio https://www.eevblog.com/forum/testgear/beginners-oscilloscope-for-audio/msg218804/#msg218804 i open a question about a function generator. My goal is to send sine waves into amplifiers (hifi and guitar amps) and measure the signal at different stages in the amp.

I guess i wont really need a function generator, but only the sinewave function. Could i use my pro usb soundcard, i use for recording and mastering, for this purpose? I dont foresee using the dc offset for anything, any thoughts of why i should not use my sound card, and why i would need dc offset?

Im completely new and retarded on this field (function generators... i know my way around scopes), any specs i should hunt down for this?

Thx for your time :-)
Crank it up till' everybody's ears are bleeding, then back off just a notch.
 

Offline smashedProton

  • Frequent Contributor
  • **
  • Posts: 641
  • Country: us
Re: Function generator for audio?
« Reply #1 on: April 16, 2013, 07:18:20 pm »
I have one of these.   Mine is called a stereo.  XD
http://www.garrettbaldwin.com/

Invention, my dear friends, is 93% perspiration, 6% electricity, 4% evaporation, and 2% butterscotch ripple.
 

Offline stev.dkTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: dk
Re: Function generator for audio?
« Reply #2 on: April 16, 2013, 07:56:55 pm »
I dont think a stereo is a really good idea, cause i dont think the potential for difference in the wave forms is bigger, and the waveforms will have to go through a lot of circuitry before even hitting the input of the test object.

I think the pc / usb soundcard has less potential for difference in waveforms cause the cpu generated waveforms wont differ, as they might on a cd. It alsa has less circuitry to travel, before hitting the input of the test object.

I could be wrong, and that the pc / usb method is also a bad idea, but i dont think using a stereo is the path for me.
Crank it up till' everybody's ears are bleeding, then back off just a notch.
 

Offline Lightages

  • Supporter
  • ****
  • Posts: 4314
  • Country: ca
  • Canadian po
Re: Function generator for audio?
« Reply #3 on: April 16, 2013, 07:59:22 pm »
Yes you can use your sound card. Just be careful about that both the computer and the audio device under test both have their signal grounds at the same level and put a high value capacitor on the output of the sound card. On either side of the capacitor I would also put a 1 to 10 meg resistor to ground so that capacitor does not hold any charge that could hurt either the sound card nor the equipment being probed. It would also not hurt to put a resistor in series with the output of the sound card, say on the order of 100 ohms.

The dangers you are trying to avoid is blowing the output of your sound card with a connection to a bias voltage, or a very high voltage source on the device under test you did not expect. The capacitor will block offset voltages and the low value resistor will prevent too much current from flowing. But it is imperative that both the device under test and the sound card do not have different grounds.

The last piece of advice. Make sure you use an isolation transformer on the device under test so you won't accidentally connect live mains to ground through the connections you are making.
« Last Edit: April 16, 2013, 08:01:25 pm by Lightages »
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2045
  • Country: us
Re: Function generator for audio?
« Reply #4 on: April 16, 2013, 08:44:22 pm »
What about building one?
There are literally dozens of kits available online, to name a couple:
http://www.technobotsonline.com/200khz-function-generator-kit.html
https://www.sparkfun.com/products/11394

Also, you can search for projects using the XR-2206. It is an IC specialized in waveform generation. Many kits use this, but if you search for a project and design your own board you have more flexibility. You can pick your case style and things like that.

Or you can buy some used ones on eBay. Almost any function generator you get on eBay will work on audio. HP made some sweet sine wave oscillator back in the 60's (I think it was 60's). They go up to 1MHz, only sine wave, but the wave has very little distortion. That's something you want if you want to test distortion on amplifiers.

Quick search on US eBay:
http://www.ebay.com/itm/Hewlett-Packard-HP-Agilent-3311A-3311-Function-Generator-/151023969587?pt=LH_DefaultDomain_0&hash=item2329bae533
http://www.ebay.com/itm/HP-3311A-1HZ-to-1MHZ-function-generator-Fully-Functioning-with-Manual-on-CD-/281091140729?pt=LH_DefaultDomain_0&hash=item4172566c79
http://www.ebay.com/itm/HP-3300a-Function-Generator-w-3304a-Sweep-Offset-PlugIn-Tested-/271188534948?pt=LH_DefaultDomain_0&hash=item3f2418a6a4
http://www.ebay.com/itm/Wavetek-130-Function-Generator-0-2-Hz-to-2-MHz-/140947468556?pt=LH_DefaultDomain_0&hash=item20d11fb10c
http://www.ebay.com/itm/HEWLETT-PACKARD-3310A-FUNCTION-GENERATOR-GREAT-CONDITION-/190791621762?pt=LH_DefaultDomain_0&hash=item2c6c111c82

On UK eBay:

Very nice scope, function generator and freq. counter combo:
http://www.ebay.co.uk/itm/Oscilloscope-Function-Generator-and-Frequency-counter-/181123883614?pt=UK_BOI_Electrical_Test_Measurement_Equipment_ET&hash=item2a2bd3225e


http://www.ebay.co.uk/itm/MATRIX-MFG-8216A-FUNCTION-GENERATOR-/151000098351?pt=LH_DefaultDomain_0&hash=item23284ea62f
http://www.ebay.co.uk/itm/GW-INSTEK-GFG-8020H-FUNCTION-GENERATOR-/170929740194?pt=LH_DefaultDomain_0&hash=item27cc34d9a2
 

Offline ttp

  • Regular Contributor
  • *
  • Posts: 151
  • Country: au
Re: Function generator for audio?
« Reply #5 on: April 17, 2013, 01:07:06 am »
What about building one?
There are literally dozens of kits available online, to name a couple:
http://www.technobotsonline.com/200khz-function-generator-kit.html
....

This kit is based on XR2206, I would stay away from it. I've built two different XR2206 based generators over the years and never could get a nice, clean sine wave out of this chip. Now prefer DDS.
 

Offline ben_r_

  • Frequent Contributor
  • **
  • Posts: 419
  • Country: us
  • A Real Nowhere Man
Re: Function generator for audio?
« Reply #6 on: April 17, 2013, 01:29:20 am »
Plenty of cheap options here: LINK
If at first you don't succeed, redefine success!
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Function generator for audio?
« Reply #7 on: April 17, 2013, 02:47:05 am »
or even an arduino and a AD9850 module, i myself just finished writing the code for my one, (still needs some testing and improvements) though the main difference being i built in an lcd, an encoder and counter functions (specific tool)

however getting the AD9850 to work took me all of 3 minutes, then all you need is a basic transistor or op amp amplifier to get it up to the signal level you want,
 

Offline cloudscapes

  • Regular Contributor
  • *
  • Posts: 198
Re: Function generator for audio?
« Reply #8 on: April 17, 2013, 03:17:24 am »
I just made myself one with an xr2206, it's a vco on a chip, really easy to operate. a lot of the cheap box-less function gens on ebay use the same chip!

a noise source with variable frequency might also be a good idea if you're doing audio and filters.
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2591
  • Country: us
  • Not An Expert
Re: Function generator for audio?
« Reply #9 on: April 17, 2013, 05:33:23 am »
The quality of sine wave generator you need at any given point is directly related to the quality of your measurement equipment.  If you can only measure distortion down to 0.1% then having a 0.0001% pure sine wave as input won't really help you much.  Without having a distortion target figure for the generator in mind before hand, figure out what you are capable of measuring then get something in line with that.  If you determine you can't measure down as far as you want, you need to get two new pieces of equipment.
 

Offline stev.dkTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: dk
Re: Function generator for audio?
« Reply #10 on: April 17, 2013, 08:00:27 pm »
Even really cheap ones from USA, will cost me 2/3 times it's initial value in shipping and taxes/toll.

I like the idea of building one by myself... but im not sure if i have the time for it. I think i just want to get my hands dirty with a function generator a scope and an amp :-)

I would like one that has turn pot's and not only buttons... I want to be able to easily set the waveform type, value and so forth... I dont want to mess around with a keypad of small buttons.
Crank it up till' everybody's ears are bleeding, then back off just a notch.
 

Offline commongrounder

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: us
Re: Function generator for audio?
« Reply #11 on: April 17, 2013, 08:40:30 pm »
One possible device you could use is a decent mp3 player.  In particular one that will play .WAV files.  You could use your audio editing software to generate the waveforms you are looking for in the audio range.  They could be as long as you want them and could be repeated.  Things like square waves will have their limits, depending on how good the analog circuitry is, but the player should have the output capability through the headphone jack to drive most amplifiers to full output power.  You could add an isolation network with a couple of caps and resistors to prevent DC fault voltages from reversing into the player, and blowing the headphone amp circuit.  I used to use a CD player for this purpose, with test tones and other signals burned on a disc, to take on service calls and installations.  Now I use a Tascam flash recorder with SD cards that have the test audio files I need for the job.  The distortion from these players would be very much lower than any function generator chip based device.

Just a thought...
 

Offline ciccio

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: it
  • Designing analog audio since 1977
    • Oberon Electrophysics
Re: Function generator for audio?
« Reply #12 on: April 17, 2013, 09:54:01 pm »
My humble opinion: do not use a function generator for audio, at least do not use a function generator that was not designed for audio use.
What you will need are:
1) an output attenuator calibrated in dB, with 10 dB steps, and 60 dB of maximum attenuation.
2) a continuous output level adjustment
3) a maximum output level of at least +10 dBv, more is better, for testing unity gain op-amp circuits.
4) sine (low distortion) and square wave output.
these specs are usually not present in function generators (or  they are not all present at the same time),
The DC offset control has no use, and most of the time it will be a source of problems...

You can search on EBay for an used Audio Generator (old HP, or Kenwood/Trio, or clones of the above such the GW-Instek units are very good), or a new Chinese clone that will cost about 100 US$... http://www.ebay.com/itm/RAG101-Audio-Generator-Function-Signal-10-to-1Mhz-/320684595149?pt=LH_DefaultDomain_0&hash=item4aaa4a97cd

Sometimes a balanced output, or pink/white noise signal could be useful.
The first necessity can be solved with  an external  balancing transformer (an high quality one will cost about 100 US$).
You can even add a balanced output stage inside the generator, if has a suitable power supply and panel space for a male 3-pin XLR.
The second one requires a special device: a good idea could be a NTI minirator http://www.nti-audio.com/en/products/minirator-mr-pro-mr2.aspx, that can do a lot of useful things.

The PC audio solution is a good one, but it requires a very good audio card, or an external USB box (M-AUDIO or similar).
The problem is that these are more expensive than the above Minirator, and you must add a PC...
Personally I do not feel comfortable with a PC on the workbench,  clicking with my mouse to change level or frequency requires a lot more attention than reaching a knob. Maybe an additional arm and hand can be useful..
If you feel comfortable whit a mouse (or if you had already a third arm/leg implanted) , then a good (and free) software for audio testing can be found here: http://www.sillanumsoft.org/index.htm

Best regards




 
Strenua Nos Exercet Inertia
I'm old enough, I don't repeat mistakes.
I always invent new ones
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf