$Id: knowles-mic-calib,v 1.1 1999/01/27 00:39:26 cmalek Exp $

Notes on calibration of the Knowles microphones.

CALIBRATION FILES:

	xdbspl2 uses files called <hostname>.kleft.ocs and <hostname>.kright.ocs,
	when it calibrates the headphones.  So, if you run xdbspl2 on asterix,
	then xdbspl2 looks for files called asterix.kleft.ocs and 
	asterix.kright.ocs.  xdbspl2 looks in whatever directory the 
	environment variable DOWLDIR has been set to.  The correct files (most
	current) are in /usr/projects/dowl/lib/data.  So, make sure DOWLDIR
	is set to this before running xdbspl2.

	xbk looks for a calibration file called <hostname>.proprort.data, again
	in whatever DOWLDIR has been set to.  If you get a message from xbk
	saying something like "can't find pp calibration file," your DOWLDIR
	environment variable is not set and xbk can't find this file. These files 
	are in /usr/projects/dowl/lib/data.  They that describe characteristics 
	of the ProPorts internal amplifiers.  I don't know how to make these 
	files: they must be done by hand.   The values in the one in 
	/usr/projects/dowl/lib/data when this was written were measured for
	when the Input Gain knobs on the ProPort were set to 0dB.

CALIBRATION PROGRAM:

The program to use for microphone calibration is xbk: it is in 
/usr/projects/dowl/bin.  See the readme file xbk.README in 
/usr/projects/doc for hints on using xbk.

If you can't find xbk, the source (xbk.c) is in the apps directory
of the dowl distribution.

The 1st and 8th columns of the file produced by xbk must be put into 
the 1st and 2nd columns, respectively, of a new file to be used by
xdbspl2.

The Sx (ocs) column (column 8) of the output from xbk is fully compatible
with xdbspl2.  The units of Sx are mv/Pa or mv/(N^2).

THE EQUIPMENT:

You will need:

	1 B&K microphone:

		We have two: a 1 inch and a 1/2 inch; choose one,
		it doesn't matter which.  Mark Konishi has them in
		his office.

	1 B&K microphone extension cable:

		The cord on the both B&K's is too short, so you must use
		an extension.  Mark Konishi probably knows where it is.

	1 B&K microphone preamp: 

		We have two, an old one and a new one; both work well, 
		so, again, it doesn't matter which one you use.  Mark
		Konishi also has this, or knows where it is.

	1 Speaker: 

		The frequency response of the speaker should be fairly flat 
		the range 1-9k.

	1 Speaker Amplifier:

		There's one called a "McIntosh Audio Autoformer Type 043-606/607"
		that I used that seemed pretty good.  It has "McIntosh" in big
		raised letters on its right side.  It was in the room that
		tyto is in.

	1 Attenuator:

		I used a Hewlett Packard 350C Attenuator.

	The 2 Knowles microphones

	The Knowles preamp:

		You won't get too far without this, as it's the only thing that
		has a socket to fit the Knowles mic plug.  It is in the dichotic
		room.

	1 Good Amplifier:

		The BES amp at the top of the right rack in the dichotic room is
		the best amp we have: this one is the one you should use.

	1 Oscilloscope:

		Use it to examine the signals coming out of the mics, to
		make sure things are working correctly.

	A computer with a ProPort near an anechoic chamber:

		The anechoic chamber used for songbirds (the one near 
		tyto.etho.caltech.edu) is the most anechoic chamber we have:
		use that one, and tyto.

	Lots of coax and the necessary plugs.

SETTING UP THE EQUIPMENT: 

	SPEAKER:

	There should be one already in the chamber, but if there's not, this
	is what you do.  Put the speaker in the far right corner of the chamber, 
	and run the speaker wire through the hole in the wall, 

	Connect the wire from the speaker to the output of the McIntosh Amp 
	(the screw terminals on the front marked C (common) and 8).  Connect 
	the input of the Amp to the output of the attenuator.  Connect the 
	input of the attenuator to one of the output channels on the back
	of the ProPort.

	B&K MIC:
	
	Suspend the B&K mic about 1 meter above the ground, about 1.5 meters 
	away from the speaker.  It doesn't matter if it's pointing down.  If
	it has not already been done, connect the B&K mic extension cord to the 
	cord from the B&K mic, and plug the end of that into the appropriate
	socket on the front of the B&K microphone preamp.  

	If you can fit the cable through the hole in the wall, great; if you 
	can't, just run it through the door: it is less perfect, but still
	adequate.

	Connect the coax output of the B&K microphone preamp to one of the inputs
	of the "Good Amplifier:" If you are using the BES amp from the dichotic
	room, connect to the input marked 600 ohms.  

	Connect the coax output of the amp (for the BES amp, it may not matter 
	which one you use, but I used the left one) to a tee splitter.  Connect 
	the base of the tee to one channel of the oscilloscope, and the other end 
	of the tee to one of the inputs on the back of the ProPort.

	KNOWLES MICS:

	Suspend the two Knowles mics about 1 meter above the ground, near 
	the B&K, so that they are about as far from the speaker as the 
	B&K is.  

	Run the mic cable through the hole in the wall, if possible, or through
	the door if not.

	Connect the Knowles mic cable to the Knowles mic preamp.  Connect 
	the "Step Gain" output of the Knowles mic preamp to the unused
	input of the "Good Amplifer:" again, use the 600 ohm input for the
	BES amp.

	Connect coax output of the amp (on the BES amp, for consistancy, use the 
	one on the same side as you used for the B&K amplified output) to a
	tee splitter.  Connect the base of the tee to another channel of the
	oscilliscope, and the other end of the tee to the remaining input on 
	the back of the ProPort.

ON SETTING THE GAINS AT START:

	SPEAKER AMP:

	Set the gain knob on the McIntosh amp to about 1/3 of its full 
	range: it's a powerful amp, so more could blow out the speaker.

	ATTENUATOR:

	To be safe, start off at 30dB.

	KNOWLES MIC PREAMP:

	Set the gains on the Knowles mic preamp to what would normally be used
	during an experiment.  This is probably 40dB.

	B&K MIC PREAMP:

	The B&K mic preamp has a gain of 1.  It is used for impedence matching
	and to supply power to the heater inside the microphone (the heater
	is used to evaporate moisture from the mic.  Moisture affects the mic's
	sensitivity).

	THE "GOOD AMP":

	Start off with no gain, if possible, or lowest gain, if not.

	THE PROPORT:

	Turn the gain knobs for both input channels down to zero.

DOING THE CALIBRATION:

	Ok, so you've got all the equipment set up.  Now, close the door
	(as much as possible if you've got wires coming through it), 
	remembering	first, if you are using the 1 inch B&K mic,  
	to REMOVE THE CAP FROM THE B&K MIC. 

	The idea now is to maximize the signals going into the computer from
	the microphones.  Start up xbk, and have it play a tone (choose one 
	between 2000 - 6000Hz) a few hundred times.

	Watch the signals on the oscilloscope, and adjust the gain on 
	the "Good Amp" until the amplitude of the signals is between 1 and 2
	Volts peak-to-peak.  If you can't get enough gain out of the "Good Amp,"
	increase the gain on the ProPort (but if you increase it above 15-20dB,
	the ProPort calibration files used by xbk will have to be redone (see
	CALIBRATION FILES, above)).	 

	The idea is to use as many bits of the AD converter as possible -
	maximizing the information obtained from the AD converter.

	With both the "Good Amp" and the ProPort, you should have more than 
	enough gain.

	You can also decrease the attenuation for the speaker, but don't
	decrease it too much, or else the sound from the speaker will be 
	distorted.

	When you are ready to do the acutal calibration, make sure that 
	the gains in the "ref-gain" and "tst-gain" entries are correct, and
	that the BK-So and Bk-Pre entries are set correctly  for the 
	microphone you are using.  

ADDITIONAL NOTES:

	There is a B&K sound pressure meter that can possibly be used to 
	diagnose problems.  It was in room 319B last time I checked.
