EDN published an article years back for a PC-driven curve tracer. You'd need a PC with a parallel port and Microsoft Excel to use it: http://www.edn.com/article/CA170223.html
Elektor did a USB-linked curve tracer in early 2009. But, based on the few comments on their forum, it may have some issues. Posters report no firmware in the 'tested' unit, and a possible design fault in the reverse-bias network. Also, the description of the 'assembled & tested' unit may refer to daughter-board with PIC module.
I've sent a query into Elektor to try to clarify this, as I need a curve tracer to check out a tubeful of 6n139 optos.
OT: I've now found a source (c)1977 which states that LED=> photodiode CTR is ~0.0015 (~0.15%) across range of devices. Checking the related but accessible- base 6n136's datasheet shows 0.16%, supporting this figure...
You need to be able to sweep through controllable ranges and polarities of voltage, possibly with current limiting but at least with sufficient available current, across two terminals of a DUT (Device Under Test). And you need to be able to sense the current into and out of each of the terminals (convert it to a voltage). Typically, you'd want to be able to have a calibrated display of the current versus the voltage, with options to invert the displayed polarity and possibly also to change the display axes' assignments.
You would probably want to also have a third DUT terminal, for transistor base/gate connection. For that terminal, you would want to be able to apply "staircase" voltage or current (stepped waveform), synchronized to go to the next step each time you sweep the voltage across the other two terminals, with selectable polarity and range and number of steps for the staircase waveform.
In the end, you want to be able to display the current into any of the three terminals versus the voltage between any two of the three terminals, with selectable polarity/inversion for each displayed axis.
I have designed and built a mostly-analog one that did all of that. (It also had sweep rates selectable from 30 Hz to 22 kHz, and several different selectable sweep waveforms (and peak voltages etc), one of which was an extremely-linear ramp.) But nowadays you would probably want to take advantage of the fact that computers are everywhere, and offload a lot of the work into the computer. But to have a decent general-purpose curve tracer, you'd still need some fairly high power and fairly high voltage analog stuff, outside of the computer.
You can build a very simple "quick and dirty curve tracer" for two terminal devices (or any two terminals of a three terminal device), using only a small transformer and a couple of resistors, if you have an oscilloscope, using the circuit at http://www.repairfaq.org/REPAIR/F_semitest.html#stqdc .
I actually started with that circuit. But I eventually ended up with about a thousand parts in the final design. One easy thing you could add would be voltage steps to drive the bases of BJTs (Bipolar Junction Transistors). You could use a simple 4-bit counter, with its outputs going into a resistor network to perform the D-to-A conversion, then an opamp buffer or amplifier, and then probably a switched attenuator (a rotary switch and some resistors). You'd just need to be able to create a trigger pulse from the sweep voltage, to drive the counter's clock input. That's easier if you're using a sawtooth ramp as the sweep. It's really cool to be able to see the whole family of curves on the display, just like in the datasheets and textbooks. However, with most oscilloscope displays, that will look better at a few kHz than at 50/60 Hz.
I'd like to collect enough data on some 6n139 split darlington optocouplers to allow me to hand-roll a modest Spice model.
Although there's no published model for the 6n139, there is an Avago model for the related, but single-stage 6n136. All I have to do is add a Q2 and set appropriate parameters...
I'm planning to use an LM334 current device, a rotary switch and a chain of resistors (33r, 6r8, 4r7, 6r8, 3r9, 5r6, 6r8, 27r, 39r, 91r, 110r & 330r) to feed the input LED 0.1--2.0 mA. Measuring the darlington's collector current and given that the generic LED-> photodiode CTR is approx 0.15%, I can use my DVM for a one-spot hFE on the accessible-base Q2 to calculate the approximate gain of Q1.
But, I'd like enough 'curves' for Q2 to tweak its default spice model a bit further.
I'm limited to 3, 4.5, 6, 7.5, 9 & 12 for VCE, and 10 uA -- 100 uA Ib for Collector current up to a dozen mA, again thanks to an LM334 and resistor chain (680r, 300r, 360r, 910r, 1k1 & 3k3).
(As LM334 gives ± 3% plus temperature offset and my E12 1% chain values introduce +0.1~~+2.6% errors, I'll measure 'actual' currents before and after use while hoping my uncalibrated DVMs stay consistent )
Would these data points give enough data to tweak more than the two BJT BF parameters ?
If you measure the actual values of your 1% resistors, you should be able to cut their error contributions down to around the accuracy of your meter. The 1% is just the manufacturing tolerance. If you measure them and their temperature doesn't change much, then the value could be known to much better than +/- 1%, depending on your meter.
Also, I recommend that you join the LT_Spice discussion group, at yahoogroups.com . They might even have a 6n136 model in their library. But if not there is also a whole lot of information about making spice models, and many modeling experts available.
And here are some links to tens of thousands of spice models. Some of them have a lot of embedded comments about how the models were made.
Uh, I have those links and the Avago 6n136 model, thanks, and I'm a very junior member of the LTSpice forum...
IMHO, the 1% resistor chain's values are probably 'better' than my uncalibrated DVMs. My original plan was to select individual LM334 'programming' values. I could series/parallel resistors to get their nominal total within ~0.2% of target. Unfortunately, a given LM334 is only good to +/- 3%. So, I now plan to select from along a simple series chain and measure the resulting current. To complicate matters, the low-value resistors I can get are 1%, but only in E12 values. This meant juggling available resistors to minimise the overall errors...
Another slight glitch in my plans: Apparently, my usual high-street catalogue store has just discontinued a heap of devices, including the '334. Not to worry ! I've found an affordable supplier for more 6n139 chips, so I can tack a couple of LM334 onto that order...
The 6n139 supplier doesn't stock LM334 micro-current regulators, but I found one (1) in a city store. Beat paying £ 15 minimum order for a $ 1 part...
;-)