Hand-marked cards for applications like voting machines and meter readers often have dark marks, light marks, erasures, or dirt. Digital systems can't distinguish between an intended mark, dirt, or erasure because they have a single preset threshold. But a linear system can separate marks from errors by using multiple background-dependent thresholds. Still, optimum operation requires linear and drift-free optics (see the reference).
The optical coupler for this application includes Q1 and D1. R1 sets the current in D1 at the optimum value specified by the coupler manufacturer (see the figure). Variations in coupler gain (9:1), ambient temperature (2:1), and ambient light (3:1) cause the initial value of Q1's emitter current to vary over a 4:1 range.
Although a resistor is a linear current sensor, it can't function as an emitter load in this application because of the variation in the dc portion of the emitter current. The wide range of emitter-current variation causes the voltage dropped across an emitter resistor to exceed the power-supply range.
Implementing a diode as an emitter load solves the emitter-voltage variation problem because of the diode's nonlinear V/I curve. One diode from a matched pair is used for the emitter load (D2), and D3 is a reference diode employed to enable differential measurements. The diodes are 1N4148-type devices. Yet because they must be matched, they're often part of a transistor array (short the collector-base junction and use the emitter-base junction as the diode).
The small-signal I/V transfer function for a 1N4148 diode (IS ≈ 3 × 1014) is derived from:
ID = ISe(V/0.026)
Ln(ID) = Ln(IS) + (V/0.026)
Taking the derivative of this equation, and remembering that the derivative of a constant (IS) is zero, we get the following equation:
dV = 0.026(dID/ID)
Every 10% change in diode current yields a 2.6-mV signal change. This is very low, so differential measurements must be made. Calibration is obtained by setting the signal to zero, and adjusting R3 for VOUT = 0 V. This ensures that the diodes both operate at the same point and null out the small amplifier offset. The INA155 was selected for its very small input-offset and drift voltages, high input impedance, and low input current. Plus, it operates from one 5-V supply.
The amplifier is configured at a gain of 50, so the output signal swing is 130 mV per 10% current change. Ambient temperature changes have little effect on the circuit due to the matched diode pair tracks and the INA155's small input-offset voltage drift (±5 mV/°C). This circuit yields a linear transfer function over approximately 50% of its range, which is adequate for mark-sensing applications.