Add, substract, multiply, divide, logic operations ...
Magnus Danielson
magda at it.kth.se
Wed Dec 11 23:14:24 CET 1996
> Hello...
>
> just a question ...
>
> anyone knows how to ADD (literally, no mixing) two signals ?
> (same question for substract, multiply, divide)
As for addition and subtraction:
This is really what a mixer does. An addition can easilly be created with an
op-amp and a few resistors. If you take and resistor R0 and put it between the
negative input of the op-amp and the output, wire the positive input to ground
(preferably via a resistor of suitable value) and the hook up a number of
input voltages that should be added via resistors R1 ... Rn they will all be
truely added.
This circuit works such that the op-amp will let it's output become such a
value that the current of the feedback resistor R0 will (almost) exactly cancel
the currents derived from all the input resistors. Now, since the positive
input is held at ground will the negative input be forced to ground as well.
Therefore will all the currents of the input resistors depend only on the
input voltage and the complete input resistor. The currents are added acording
to Kirchov's current law...
Recall that the output impedance of an voltage source will add to the resistor
selected, but if forcing the resistors large enougth you can normally disregard
such things.
The gain for a certain input to the output will be
R0
Gn = - --
Rn
And for a three input stage this will result in an formula off
R0 R0 R0 V1 V2 V3
VO = - -- V1 - -- V2 - -- = - R0 (-- + -- + --)
R1 R2 R3 R1 R2 R3
If all the input resistors is selected to be equal (R1=R2=R3.. =Rn) we get in
this case:
R0
VO = - -- ( V1 + V2 + V3 )
R1
And now can R0 and R1 be selected for appropriate overall gain. It can be
quite usefull to adjust the level statically in such summing stages.
If you want to subtract two voltages you can run one of them throug an inverter
(which you will get with a 1 input summerstage as above) or by using an
differential input stage.
As for multiplying and dividing signals you have to use nonlinear circuits that
is built up around the exponential behaiviour of an PN junction (ie an diod or
transistor) and what you can do with real number exponential functions.
Among the configurations available is the Gilbert cell (the guy who invented it
is now design boss at one of Analog Devices big plants... they do a lot of
nonlinear stuff their... oh, his last name is Gilbert :). One can build such
things with op-amps, transistors and resistors, but you will need to look
carefully into subjects like difference of junction temperature, errors, and
transistormatching... trimming is almost unavoidable.
To get a good result it migth be good thing to start with a working chip.
And now we are getting close to a similar subject, the multipliers can be of
1, 2 or 4 quadrant type. For the 1 quadrant type must both values be positive.
For a 2 quadrant type can 1 value be both positive and negative while the other
must allways be positive. The 4 quadrant type can both values be both positive
and negative.
VCAs are usually built around the 2 quadrant multiplier letting the signal
be both positive and negative and the scalefactor be only positive.
The Ringmodulator are built around the 4 quadrant multiplier.
The inner details of these devices I will be happy to disclose in another mail.
> anyone knows how to XOR two signals ?
> (same for NOT, AND, OR, and all other logic operations)
Since logic comes from only two levels you will have to convert the input
signal into only two levels, this is done with a comparator or schmitt-trigger
per signal. Then is that signal converted to propper level for the logic gates
and then will the output of the gate just need an leveladjustment to audio
signal.
> does anyone have the schematics for this?
Look at Synth Fool and DIY/Juergen Haible you will find a schematic for the
logic stuff.
Cheers,
Magnus
More information about the Synth-diy
mailing list