Design a Differential Amplifier the Easy Way with Mathcad

For those of you who have Mathcad, designing a differential amplifier is really easy.

Let’s say you need to design a unipolar to bipolar converter and you decide to use a differential amplifier for this task. You know the input and output voltage range and you need to calculate the resistors based on a voltage reference you have in the system. All you have to do is to create a Mathcad file for a quick response. Then store it some place for future designs.

If you would like to know why the unipolar to bipolar converter can be designed with a differential amplifier, read this article, Design a Unipolar to Bipolar Converter for a Unipolar Voltage Output DAC .

Let’s take an example.

If you have a DAC that outputs 0 to +2.5V, with a reference of 2.5V, and you need a bipolar output of –1V to +1V, write down the differential amplifier transfer function as follows:

image001

where the resistors are those in Figure 1.   For the proof of this transfer function read How to Derive the Differential Amplifier Transfer Function.

differential_amplifier_1Figure 1

Let’s rewrite the transfer function as a mathematical relation that depends on the resistor ratios R1/R2 and R4/R3.

image003

This is the equation form we will use in Mathcad.  I use it for clarity and to show the resistor ratios.

Open Mathcad and type the voltage reference and a choice for R2 and R3, say 10 kOhm.  On the next line type some guess values for R1 and R4, say 10 kOhm also.  These two resistors are the unknowns.

Next comes a solving block for two equations with two unknowns.  The solving block is delimited by the keywords Given and Find.

Inside the solving block lets write the differential amplifier transfer function in two instances, one when the output voltage is –1V and one for +1V.  I also replaced V2 with Vref and V1 with the input signal.  The Mathcad code should look like this:

image0041The “Find” function gives the answer in the form of a matrix of one column and two rows.  For this example, R1 = 7.5 kOhm and R4 = 4 kOhm.  Choose the standard values of 7.5 kOhm 1% and 4.02 kOhm 1% respectively. During the Mathcad calculations I prefer to attach the units as well.  If there is a mistake, Mathcad will flag that the units do not match.  This is a great way to verify your equations and assumptions on fly.

Figure 2 shows the final schematic.

unipolar_to_bipolar_converterFigure 2

11 thoughts on “Design a Differential Amplifier the Easy Way with Mathcad”

  1. A negative resistance is theoretical. The system of equations has a solution, but the solution is negative. It means that your design needs an extra source of energy in order to output the voltage range you need for the given input range. In practice, you have two choices: change the reference voltage, or change the amplifier topology. A lot of times it is easier to change the reference value than to change the op amp configuration. This method is great because it lets you find the correct resistor values by trying different voltage references.

    Reply
  2. Hi ,

    In my difference amplifier configuration the DAC ouput(120mv to 3.4v) is feed
    to inverting terminal of opamp and 2.5Vref is applied to non-inverting terminal. The opamp output should be +10V for 120mv input along with 2.5vref and -10V for 3.4 input along with 2.5 Vref.
    can i use same transfer function. please advice me.

    Thanks
    Ayyappan

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Show Buttons
Hide Buttons
'