Sunday, November 30, 2014

Inequality

This circuit detects X < Y - it is what in the old days was called a differential relay (a single pole double throw switch driven by the output of an operational amplifier) - in this circuit the relay of old is realised via a CMOS analog switch (DG403). In my circuit, the output of a INA128 instrumentation amplifier drives a couple of transistors to get the gain up enough so that the output switches for about a 5 mV difference in inputs. An LED on the computer's front panel will indicate X < Y; there is a 10 V output also for this condition.




Next board is X = Y (which is proving surprisingly complicated!)

Saturday, November 22, 2014

Off On a Tangent

Have finally completed the special function circuitry...in the end I moved (temporarily) to the dark side...buying a few AT28C64B EEPROMs and a MiniPro TL866 programmer.

The EEPROM is sandwiched between a AD7820 8 bit ADC and a AD7224 DAC. The ADC drives eight of the (64K) EEPROM's addresses; one is driven by the output of a sign detection op amp; the remaining four address bits are connected to a Lorlin binary-coded (16-position) rotary switch. Each switch position gives a separate function. The ADC / DAC are clocked at about 360 kHz.

The absolute value of the input voltage (scaled so that 0 - 10.2 V input voltage maps to 0 to 5.000 V at the input to the ADC), drives the ADC; the sign of the input voltage drives an address bit of the EEPROM. Hence negative and positive halves of the function's domain occupy separate parts of the memory.

Here's the circuit. The MC14495 display drivers and displays (included in anticipation of the thing not working!) were omitted in the final design.



The contents of the EEPROM was cooked up using a MATLAB program - it's easy enough to have any functions (single-valued!) I like - I've opted for the usual suspects - sine, cosine, tangent; their inverses; their hyperbolic cousins; logarithm, exponentiation...plus some slightly more esoteric things (Bessel, error, gamma...)

sine


tanh

cosh
tangent
Negative and positive overflow are determined by all zeros or all ones from the EEPROM output - using a NOR gate and NAND gate respectively; since the pin-outs of a 4068 and 4078 are the same I got away with piggy-backing the chips:


(Reminds me of when I had a TI-59 calculator - needless to say I dismantled the thing to have a look...I think I am correct in saying that at least one of the chips (TMC 0583?) was soldered (presumably by hand!) directly onto another chip...that was an amazing bit of circuitry - it even had a LM324 quad op amp in there...)