DIY Audio Home
Software for the HP 8903 Audio Analyzer
NEW 2/5/15 - Uploaded fixed programs, thanks to Shawn Gibson!
before the audio precision box became the de facto standard for audio testing, there was the hp 8903...
the 8903 was available in three versions that i've seen: the 8903a, 8903b, and 8903e . the a and b versions include a low-distortion oscillator (source), whereas the e version does not. the a or b versions are certainly more useful for audio testing, and are required to run the software i've written. the b version included a few enhancements (like programmable generator source impedance), but for the most part the a and b can be considered equals.
hp 8903a and 8903b analyzers are plentiful and relatively inexpensive on the used market. i bought an 8903a freshly calibrated from a rental company for about $900. a recent look on ebay showed 13 of them, selling for buy-it-now prices of between $549 and $1699, depending on condition, calibration, guarantee, etc. compare this to an boxes selling for $3000-$5000 in the used market, and the old hp 8903 is a bargain.
OK, the HP 8903 does not do everything that an AP box does. The most important thing it won't do for you, at least for me, is an FFT. But since an FFT is a relative measurement - no precise absolute voltage measurement is needed - a good sound card can perform at about the same level as an AP box. I use an Audiophile 192 card and software to do FFTs, and the 8903 as the source. I get a noise floor of around -140dB. The AP boxes at work have about the same noise floor. And Audiotester is a lot easier to use than the brain-damaged application that runs the AP box. Sorry双色球模拟选号器, Audio Precision...
双色球模拟选号器but my biggest issue with the 8903 was that you cannot easily get plots - swept measurements - from it. to measure frequency response, i had to manually enter the frequency and write down the measurement (or enter it into a spreadsheet) to get a graph. that is painful.
双色球模拟选号器however, the 8903 can be fully operated remotely through the gpib port. for you youngsters, gpib (also called hpib) is a 8-bit parallel bus interface designed back in the 1970's to connect computers together with test equipment. it's a primitive interface by today's standards, but it still works. it's all a simple matter of software.
双色球模拟选号器i really do not like writing software.
Luckily there are shortcuts for the "C++ challenged" like me. I bough a back-rev but brand new copy of a software program called VEE from Agilent (actually Hewlett-Packard - it was really双色球模拟选号器 back-rev). VEE is a sort of visual programming language that lets you design test programs without really writing any code. It's still a pain and I curse at the computer every time I use it, but at least it enabled me to make some programs that are useful to generate plots from the 8903.
vee programs can be compiled into an executable form that, when coupled with a run-time package that is freely re-distributable (and also downloadable form the agilent web site). so, i can distribute my programs, and you can run them for free!
双色球模拟选号器here are the four programs i have completed:
Frequency Response: FR_v2.vxe
As you might guess this plots frequency response.
The "Filters" radio buttons lets you select any of the 8903's built-in measurements filters. Usually you don't want to use these if you're measuring frequency response.
"Gen Level" sets the output voltage of the generator for the test.
"Start Freq" and "Stop Freq" set the beginning and ending frequencies of the sweep.
"Pts/Dec" is the number of points you want to measure per decade. Many points makes a more accurate graph but takes more time.
To begin the measurement, hit the "Start" button. If you've enter illegal inputs for any of these you get a dialog box that pops up and tells you - hit OK and go back and fix them, then hit "Start" again. If you have filters enabled, you'll get a popup that warns you that the filters will affect the frequency response (duh!), and you may continue, or cancel and change the filter setting.
After hitting "Start", a dialog pops open and asks "Ref level OK?" Note the "Ref Level" box - this is the amplitude being measured at the reference frequency of 1kHz. This is used to make sure you have the "Gen Level" set correctly. For example, if you're testing a power amp and you want to run the FR test at 1 watt output, you set the "Gen Level" so you get and output of 1 watt, or 2.82V into 8 ohms. So "Ref Level" wants to be about 2.82V. Click "OK" and the test proceeds - "Cancel" if you want to go back and change the "Gen Level".
As the sweep progresses, you will see the numbers in the "Freq" and "dB" boxes change. These are the individual measurement points that are getting plotted.
After the first sweep is complete, you can perform one, two, or three more sweeps with the same conditions. This is useful, for example, to put left and right channels on the same plot, or if you're tweaking something and want to see how things are changing. The first sweep, after hitting "Start", will be in yellow. If you want a second sweep, hit "TR 2" (trace 2), and that data will be in cyan. Same for "TR 3" (magenta) and "TR 4" (green). The "Trace" box shows which trace is currently running (1-4).
You can change the scales on the graphs by hitting the axis titles ("Level (dB)" or "Frequency", in this case). You can also click the sliders or arrows on the plots to move.
If you want to send the plot to the printer hit the "print" button. This will print on the default system printer. Sorry, no easy way for the programmatically challenged like me to bring up a print dialog box.
When you're done, hit "Exit" to end the program.
THD+N vs. Frequency: THD_v2.vxe
The program plots the THD+N at a fixed level vs. frequency. This is useful for looking at amplifiers and especially transformers. High THD at high frequency is a result of slew rate limiting, among other things.
All of the instructions for the FR plot apply here as well.
The outputs are the same except instead of level ("dB") being measured we have "THD+N".
THD+N vs. Output Power: power_v2.vxe
双色球模拟选号器this program plots thd+n at increasing power levels. this is useful to measure a power amplifier, to see how it's distortion rises with increasing power.
双色球模拟选号器instead of start and end frequency as above, here we have "start level" and "end level" inputs. the "start level" is the minimum generator output - where the plot starts. if you set it very low, there may not be enough output from the amp to get a distortion reading. for normal power amps try somewhere between 10mv and 100mv. the "end level" is the maximum generator output, where the sweep will end. usually you want to set this above where you think your amplifier will clip.
双色球模拟选号器again we have "point/dec", which sets how many individual measurements are made.
in addition there is another parameter. "max thd". a sweep will terminate if the thd measurement exceeds this number. normally i set it at between 3 and 10 percent. this keeps you from driving your amplifier well past the clipping point.
since the measurement is in watts, and you are really reading voltage, the analyzer needs to know into what load impedance you are running to correctly calculate power. the "z load" pulldown box lets you choose 1, 2, 4, 8, 16, 32, 150, or 600 ohms. that pretty much covers power amps, headphone amps, and even line level outputs.
THD+N vs. Output Voltage: voltage_v2.vxe
Very similar to the program above, the THD+N vs. Voltage plot measures the output voltage of a device instead of power. This is useful for headphone amps and line amps, where you may be more interested in voltage.
Since we are measuring voltage, there is no "Z load" pulldown. Instead there is a "Graph Units" selection of Volts, dBV, or dBU. dBV is dB relative to 1V, and dBU is relative to 0.7746V (the voltage that is 1mW into 600 ohms). Note that this selection only applies to the graph and the "Input" box - everything else stays in volts. Sorry, too much work to make everything speak three different levels...
Other than that this program functions similarly to the Power program above.
双色球模拟选号器to run these programs, you need a system that meets the following requirements:
双色球模拟选号器1. a pc running win98 or later
2. A GPIB card. I know this works with National Instruments双色球模拟选号器 and HP/Agilent branded cards, both PCI and ISA. No guarantee on any others.
3. the driver for the gpib card - supplied with the card, or can normally can be downloaded from ni or agilent
4. hp vee runtime package (free - see below)
双色球模拟选号器5. my programs
Here's the easy part... a ZIP file with my four .vxe " VEE redistributable" program files, as well as the .VEE source files (if you want to modify things): ZIP archive
my programs should run under hp vee 5.01 runtime or later. download "hp vee pro 5.01 runtime bundle" from the agilent web site here:
...or from my site (6MB self-extracting .EXE file) (I hope Agilent doesn't mind) - and install it.
双色球模拟选号器my code looks for the 8903 at address 1428 - 14 is the address of the gpib card (i'm using a national instruments pci-gpib card) and 28 is the default gpib address of the 8903.
双色球模拟选号器one thing i'm not sure of is if any arbitrary installation of a gpib card will come up at this address (14), or if you have to tweak something. or maybe it doesn't matter.
双色球模拟选号器when you install vee runtime, you will get an application called "instrument manager" which allows you to configure the attached instruments. it looks like this:
i think you can just hit "find instruments" and (assuming the gpib card and driver are installed, and the 8903 is connected) the 8903 should show up. again, one thing i'm unsure of is if the address of the gpib card come out the same as in my system, or if it even matters. i vaguely remember having to change something to get things to play well together, but i don't remember if it was the gpib card (or driver) or my sound card. i expect you also have to "save configuration".
双色球模拟选号器after vee runtime is installed you should be able to just double-click one of the .vxe files (fr, thd, power, or voltage) and it should run.
my chief beta tester julian put together a note showing what he had to do to get all this running on his pc:
NEW 7/3/2011 - Got some additional tips on making this run under Windows 7 from Dorin Bodea in Rpmania!:
so there it is. please try it out and let me know how it goes. i'm sure there are oddities and bugs in there - no guarantee i'll have the time to fix them as i've already sunk a lot of time into this, but i would like to know about it.
????????????? ??????????? ??12?????? ????????? ???600??????