i built the µENA for a job. it worked but lacked political backing (perhaps for good reason), and was ultimately abandoned. i feel bad for it, as i feel for all neglected projects. so here i am, telling its tale beyond the grave.
what if you were trying to take a measurement which needed all this equipment?
- an electrical network analyzer (for which the µENA is named)
- two digital multimeters
- an adjustable voltage source
- a rubidium frequency reference
- a computer controlling everything over GPIB
the network analyzer would cost you $20,000, and everything else would cost another $10,000. maybe you have thirty stacks to burn, no biggie.
but what if you wanted to do this measurement really, really fast? maybe 100 times faster, at the same cost of equipment? how would you do that?
maybe you could perform 100 measurements in parallel, using 100 sets of equipment. but that would cost 100x more money. that's $3,000,000 dollars tied down in equipment, which makes my head hurt.
but what if we treat this as a cost-reduction exercise? could you make the same measurement using equipment which costs 99% less money? then you could have 100 sets of equipment for the same price of $300 x 100 = $30,000. there'd be some complicated wrangling to collect all the data, but it's a start.
there's a deadline too, so i have to work fast.
step 1: what do we really need?
with a $300 budget, we'll be cutting some corners. what does all this equipment do, and what can we replace it with?
A. the network analyzer
the 'fancy' system used a 4-port Agilent network analyzer, which cost more than a fleet of cars. that really wasn't necessary. a simple phase/gain analyzer would do, and i only needed 100MHz of bandwidth.
there are two things which make up a phase/gain analyzer:
- the RF transmitter which produces two RF signals - the DUT signal (which goes through the Device Under Test) and the reference signal.
- the RF receiver which compares the two signals to measure how much phase & gain was added by the DUT at each frequency.
it's as simple as RF systems get. conveniently, there's even two IC's on the market which do the job for me:
- the AD9958 is a direct-digital-synthesis chip which will produce two RF sine waves at any frequency up to 100MHz. you can even set an arbitrary phase shift between the two signals, which is awesome for calibration!
- the AD8302 compares two RF inputs and displays the relative gain & phase as two analog signals. it doesn't get easier than that.
the AD8302's phase output only works over a ±90° range, but for what i'm doing, that's enough.
the AD8302 outputs a 1.8V reference voltage, which it uses internally to scale its Phase and Gain outputs. this reference voltage wanders slightly with temperature, but by referencing the two ADC's to it, i reduce the effects of temperature drift on my ADC readings.
as the measurement speed of the whole system is bottlenecked by the speed of the SPI bus, i chose an ATxmega32E5 for the microcontroller. it has a speedy 16MHz SPI bus and is quite easy to work with.
the ADC is an ADS7951, because i like its 8-input mux and 1MHz sample rate.
B. the two digital multimeters
each multimeter is measuring a resistor. in fact, each multimeter is measuring a resistor of known (approximate) size, with one side referenced to ground. there are some fancy resistor-measurement IC's on the market (such as TI's ADS1248) but this project needs speed more than precision, so i'm trying something more homely.
a resistance measurement is basically this:
- a current source which biases the resistor with a known current.
- a voltage measurement which measures how much voltage is produced across the resistor by that current.
the rest is just V=IR, or more like R=V/I.
these voltage measurements are also done by the ADS7951, using two more of its eight inputs. the ADS7951's reference voltage is already set by the AD8302, so the current sources must also be ratiometric with that reference voltage. each current source is hacked together with op-amps and resistors.
each 3-wire resistance measurement ends up looking like this:
the weird op-amp circuit on the left uses a reference resistor (Rref) to make a reference current from the reference voltage. the BFC's are just big friggin' caps. Cstab capacitors maintain the stability of the current-source feedback loop, and were crudely sized with LTspice simulations. each resistance measurement uses 4 op-amps, implemented with a quad-package OPA4727.
C. an adjustable voltage source
you know what's really cheap on microcontrollers? PWM!
i mean, sure - PWM can be noisy as heck and ruin a 'precision' system. but let's say you make a PWM output stage with an LC output filter. what happens right after you shut off the PWM?
yeah.. the output filter capacitor holds the voltage steady for just a little while.
so hypothetically, you could use PWM to settle into the desired voltage bias conditions. then you could shut off the PWM (to reduce noise) and measure everything before the output filter's voltage changed too much.. yeah it's scrappy as hell. if i did it all again i would probably replace this with a SPI-controlled DAC.
D. a rubidium frequency reference
haha!
i just used an OCXO.
E. a computer controlling everything over GPIB
well, everyone has computers. but you definitely won't find GPIB on an 8-bit microcontroller.
so i did the FTDI thing, lashing the ATxmega32E5's UART to my computer's USB port with a 'high-speed' FT232H. the ATxmega does everything anyways - the UART is just for commands and uploading data.
step 2: so much PCB design.
when i'm trying to go fast, i carve up the system into modular blocks. this lets me pipeline the whole PCB design/fabrication/assembly/test process. i can assemble and test the first PCB while the next few are still being fabbed, and so on.
i ended up splitting the system into six separate boards:
- RF transmitter board containing the AD9958.
- RF amplifier board using a pair of AD8009 high-speed op-amps.
- RF receiver board containing the AD8302, the ATxmega32E5, and all the resistance-measurement and voltage-source circuitry.
- Frequency reference board containing the OCXO and a superfluous & counterproductive heat-sink.
- DUT board (containing a socketed MEMS resonator)
- FT232H evaluation board (off-the-shelf from Digikey)
and now i can finally label that diagram:
step 3 - does it work?
what do you mean by 'work'?
does the hardware work? yes it does!
is it a fully-implemented bug-free system? no, we didn't have the time or resources for that.
with another board revision and a lot of programming, would this thing have accomplished its goals? i'd like to think so.
µENA, it was fun while it lasted.
(many thanks to J for tasking me with this crazy project, and writing most of the firmware.)
Tshen2 2014