Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Project help design an op-amp

Status
Not open for further replies.

Wjs

New Member
Design op amp circuit?
I had a school assignment to submit i understand the two rule of an ideal and practical use of op-am. The properties of non-inverting, inverting and summing amplifier. but i am struggling with my assignment, which require your help.

Given that the pressure sensor produces an output voltage (Vs :sensor output voltage) according to the equation Vs = (Px0.131)+1.683. This equation can be expressed in terms of pressure (P) versus sensor voltage (vs)i.e
P=(vs – 1.683)/0.131

You are to design the amplifier circuit for this sensor using any combination of inverting amplifier, non inverting amplifier, summing amplifier together with a 1V reference voltage source.

The two input signals of this circuit are sensor voltage (Vs) and an 1V reference source (Vref) and the circuit should produce an output voltage (Vo) indicating the pressure (PSI) according to the equation
Vo = P(PSI)

i.e When P=0PSI, Vo=OV
When P=10PSI, Vo=10V
When P= -10PSI, Vo= -1OV
 
The easiest way is to break the problem into parts and use an op amp to solve each part.
The circuit requires both offset and gain of the signal level to get the output level you want.
Use one opamp to compensate for the offset and another to provide the required gain.
You may find after you do this, that one op amp can perform both functions (bonus points).
 
At most, this is a "solve two simultaneous equations in two unknowns" type of problem...

It can be done with a single opamp, two resistors, and a reference voltage.
 
Last edited:
In the first place I have to rewrite the equation first before I can start.

But I do can rewrite the equation.
I abit confused.
 
5b.gif
 
Are this the way to do it. Please advise.
Thank you
 

Attachments

  • Screenshot_2016-05-07-15-08-29.png
    Screenshot_2016-05-07-15-08-29.png
    167 KB · Views: 381
Did that produce the required output?

Here it is again. As the pressure P goes from -10psi to +10psi, the output V(out) of the network you are building needs to swing from -10V to +10V, as V(s) swings from -1.127V to 1.493V (a delta of 2.62V) .

This is implied by the transposed equation V(out)=7.63*V(s) - 1.40.

It is obvious that you need to apply a non-inverting gain of 7.63 to a delta of 2.62V to produce a 20V delta at V(out).

Remember that a non-inverting opamp has a gain of 1+R2/R1, so if you need a gain of 7.63, then R2/R1 must be (7.63 -1) = 6.63.
If you select R1=10K, then R2 must be 66.3K.

I have added a non-inverting amplifier with R1 and R2 set as above, and sure enough, the gain looks right, but V(out2) needs to be offset by -1.40V.

I will let you figure what to do with V1 to accomplish the required offset. To get an offset of -1.40V at the output of U1, what voltage would V1 have to be set to? Ask yourself: what is the gain of the opamp from V(ref) to V(out2)?
 

Attachments

  • Draft370a.asc
    1.2 KB · Views: 325
Sorry I don't have the application to open up your file.
Since the circuit you posted was from LTSpice, I figured you could open it.

Here are the graphics...

370.gif
 
SEE POST #13 FOR CORRECTED SCHEMATIC

2016_05_11_Iss1_PRESSURE_TRANSDUCER_CONDITIONER_VER1.png
 
Last edited:
spec would get a zero grade...
His circuit produces an inverted output, doesn't have the correct gain, or the correct offset. Besides, I would never use such high value resistors around an opamp...

I took the liberty of fixing his circuit, using more reasonable resistor values, but the output is still inverted with respect to the stated goal.

Note that the sensor is terminated with only 10K, while in the circuit I posted earlier, it is loaded only by the bias current of the opamp.

370s.gif
 

Attachments

  • Draft370s.asc
    2.2 KB · Views: 249
would get a zero grade...

One of us would

His circuit produces an inverted output

That is true but it is not an error. It is intentional because I misunderstood the OP's post. That should be painfully clear to anybody.

doesn't have the correct gain,

Incorrect UPDATE: you are right but the value was a typo and the feedback resistor should read 1M284 not 12M84

or the correct offset.

Incorrect

Besides, I would never use such high value resistors around an opamp...

You haven't looked at the OPA192 characteristics- The resistor values are fine. It is not relevant what you would use or wouldn't use unless you can support your statements with calculations/supporting data. Even a reason would help.

The whole rational for using high value resistors is to keep the loading on both the pressure transducer and the voltage reference down without using two more opamps. It is actually impossible to do a design without knowing the output impedances of both these voltage sources. But to minimize loading a unity gain OPA192 buffer could be used which is what I was going to discuss with the OP.

I am pleased that you pointed out the error about inversion but if you are going to make other claims please support them with calculations- not SPICE simulations either.

spec
 
Last edited:
Here is the circuit of post #10 with the misunderstanding and typo corrected. Note that the basic architecture stands.

spec

2016_05_11_Iss2_PRESSURE_TRANSDUCER_CONDITIONER_VER1.png

ERRATA
(1) Title along the bottom of the schematic should read 'Issue 2' not 'Issue 1'.
 
Last edited:
One of us would
I know who it would be...

That is true but it is not an error. It is intentional because I misunderstood the OP's post. That should be painfully clear to anybody.
Well it wasn't clear to me. You seem to have inverted the voltage from the sensor (by connecting it upside down?) between version 0 and version 1. It is not clear to me that you could do that in real life, especially if the pressure sensor is a "powered" sensor with built-in signal conditioning. It might be possible if it is a passive four-arm bridge?

Incorrect UPDATE: you are right but the value was a typo and the feedback resistor should read 1M284 not 12M84
Good reason to use the (after simulation) LTSpice schematic from which to wire up the circuit on the whiteboard. I always do. I dont bother drafting a schematic until I simulate, and then breadboard.

Incorrect
No, your offset is still wrong in version 1. I had to fix it in both of your circuits.

You haven't looked at the OPA192 characteristics- The resistor values are fine. It is not relevant what you would use or wouldn't use unless you can support your statements with calculations/supporting data. Even a reason would help.
I dont like to see an opamp with any resistors around it (feedback, especially) that are > ~1meg. The reason is leakage resistance (moisture and flux residue), and shunt capacitance.

The whole rational for using high value resistors is to keep the loading on both the pressure transducer and the voltage reference down without using two more opamps. It is actually impossible to do a design without knowing the output impedances of both these voltage sources. But to minimize loading a unity gain OPA192 buffer could be used which is what I was going to discuss with the OP.

I showed how to do it without loading the sensor back in post #9

I am pleased that you pointed out the error about inversion but if you are going to make other claims please support them with calculations- not SPICE simulations either.

spec
And why the hell not! LTSpice sure points out the errors in both of your circuits. Maybe you should present the calculations where you came up with the resistor values...

btw, you might not have noticed that the TS's goal here was to turn in a homework problem; not to build a circuit. I never just handed him a complete circuit, but I was trying to get him to think through the problem...

370s1.gif

The LTSpice simulation above shows the desired output V(out1) as a green trace. It is just a plot of the transposed Volts vs Pressure equation of the Sensor.

The blue trace V(out2) is Spec's Ver1 showing the correct slope, but wrong offset.

The red trace V(out3) is after I fixed the offset problem. Note that it falls on top of V(out1) as it should...
 

Attachments

  • Draft370s1.asc
    2.6 KB · Views: 249
Last edited:
Hi Spec, How do u calculate the resistor and capacitor value

Hy Wjs,

Capacitors like that are confusing because they play no part in the fundamental functioning of the circuit. Their purpose is to ensure that the supply lines that the operational amplifier sees are at a low impedance at high frequencies. This helps to ensure that the opamp will generally behave and especially not oscillate. Some circuits simply will not work without decoupling capacitors. There are design guides provided in text books and also by the manufacturers describing general rules for layout, decoupling etc which will ensure that you minimize any problems. Bear in mind that a schematic does not show the real word situation: there are stray capacitors, wires/traces have inductance, capacitance and resistance and so on.

You do not normally calculate the value of decoupling capacitors. Instead you follow the advice of the integrated circuit manufacturers. But in general 100nF ceramic capacitors are good for decoupling high frequencies and 22uF electrolytic capacitors are good for decoupling low frequencies. Why use two capacitors? because no one capacitor will decouple efficiently over the whole frequency spectrum. In the circuit shown I judged that just 100nF capacitors would be sufficient.

I will go through the complete design of my corrected circuit of post #13 to explain how it was derived: circuit architecture, circuit function, selection of operational amplifier and calculations for each resistor value.

By the way, I posted that circuit to illustrate a possible design for discussion- that is the way I find easiest to learn, especially when I am completely lost. It was the minimum number of components that I could use to achieve the objective but I had miss read your original post and got the sense of the output inverted. I will have a look to see if I can find a different design that takes advantage of that fact.

Don't worry about the exchanges between Mike and I.

spec
 
Last edited:
This post describes the design and function of the circuit represented by the schematic in post #13. Supporting information is also included.

(1) Requirements
The first thing to do in any design is to establish the requirements as definitively and completely as possible.

In industry this is normally documented in a Requirement Specification.

Your professor has obviously given you the basic requirements to design a circuit as an academic exercise to help you understand the techniques involved, but he has not given a full specification. For example, what is the output impedance of the pressure transducer and the voltage reference. What is the rate of change of pressure that is required. What is the accuracy required. What type of pressure transducer and voltage reference. What are the environmental conditions. What are the size and weight limits. What is the power consumption limit. What voltage rails are available. What is the maximum cost. You could go on for ever.

Having said this, it is impossible to define on paper the whole requirement for any item when you take into consideration all the variables. I certainly have never seen a full specification, even in the the thickest military requirement specifications. It is bit like trying to write a requirement specification for your girlfriend or wife.

Often the customer simply does not know the full requirement or states it incorrectly. He also makes mistakes of all kinds (just like me).

So you have three choices. Either say the design cant be done. Alternatively you can or go on asking endless questions. On the other hand, you can take a positive approach and make educated guesses. Also you can make the performance of the design the best that you can as a balance between cost, complexity and performance. That is what I have done in this case, hopefully.

Here is a list of the requirements you have been given.

(1.1) Pressure Transducer: Offset: 1.683V. Transfer function: 131mV per pound pressure

(1.2) Voltage reference: 1V

(1.3) Circuit output: 1V per pound of pressure

This is a classic situation where the circuit has to deal with a sensor offset and produce an amplified output of the parameter of interest, in this case a voltage proportional to pressure in pounds.

(2) Concepts and Laws
In order to follow the circuit description a few fundamental concepts and laws need to be understood.

(2.1) Ohm's law: I=V/R

(2.2) Kirchhoff's first law: The current flowing into a circuit junction is equal to the current flowing out of the junction

(2.3) Voltage versus Current
Many electronics newbees are comfortable following a circuit using a voltage analysis, but they find a current analysis alien, which is a shame because often the latter is simpler, as is the case with the schematic of post 13.

(2.4) Operational amplifier
Because an operational amplifier (opamp) is the central component in the design of post#13 and is liable to be the central component in any other pressure transducer conditioning design, it is important to understand their primary function and parameters.

Put quite simply, an opamp does not care what you want it to do. Instead it is single minded and hates its two inputs to be at different voltages, even slightly. As a result it will do everything it can to make its two inputs the same. But the only thing it can do is to change its output voltage and it will do this very fast.

So a designers task is to place a circuit around an opamp so that when it balances its inputs it carries out the function that he wants.

What I have described is a perfect opamp, but real opamps have shortcomings that complicate the issue. But the OPA192, in practical terms, is perfect and has no shortcomings. That means it is ideal for a very wide range of applications. But more importantly in this case, it makes the circuit simpler to explain (note that all opamps have limitations, including the OPA192, it is a matter of application and degree though). If you are interested in taking a closer look at the OPA192 see this ETO article: https://www.electro-tech-online.com/articles/game-changer-opamp-opax192.768/

(2.5) Shunt Feedback Amplifier (Virtual Earth Amplifier, Summing Amplifier)
In the schematic of post 13, the opamp is configured as a shunt negative feedback amplifier, where R1 provides the negative feedback. Because the non inverting input of the opamp is connected to 0V, the opamp will keep its inverting input at 0V too. It does this by altering its output voltage to meet this condition. Thus the inverting input is a virtual earth (0V), hence one of the names for this amplifier configuration.

(3) Circuit Description
The schematic of post 13 uses a single operational amplifier instead of three and only three resistors. The loading of the transducer and voltage reference is as light as possible, by using high value resistors, without going too high, which may compromise the operation of a practical circuit.

After further analysis though, it turns out that all resistor values in the schematic of post 13 could be multiplied by ten to reduce the loading on the transducer and voltage reference by a further factor of ten. This is possible because of the superior performance of the OPA192: vanishingly low input current and input offset voltage. There are dangers with high resistance circuits which need to be catered for, but it would over complicate the picture to describe these here.

(3.1) Offset Cancelling
The first task of the circuit is to cancel the transducer output offset.

The offset cancelling is simplicity itself. N1 maintains the junction of R2/R3 at 0V. Thus the current flowing through R2 is, - 1V683/168K3 =-10uA) . Similarly the current flowing through R3 = 1V/100K =10uA. From this it follows from Kirchoffs first law that the currents at the junction of R2/R3 sum to zero; even without the opamp, the voltage at the junction of R2/R3 will be 0V anyway.

(3.2) Gain
The second task is to amplify the transducer signal (in the correct sense) to produce an output to meet the given requirement.

The pressure transducer has an output voltage of 131mV per pound pressure. This causes a current of -131mV/168K3= -778.37 nA to flow through R2. This in turn causes the voltage at the junction of R2/R3 to drop but the opamp cannot tolerate this and will immediately make its output voltage sufficiently positive to inject exactly 778.37 nA into the junction of R2/R3 via the feedback resistor, R1, to return the junction of R2/R3 to 0V.

For a one pound pressure increase the output of the opamp is required to increase by 1V. It is now just a matter of calculating the value of R1, the negative feedback resistor, to produce a voltage of 1V when 778.37 nA is flowing through it. Thus R1= 1V/778.37nA= 1.285M.

That is all there is to it.:)

spec
 
Last edited:
Your solution, spec, is indeed a good one unless the pressure sensor (used for this project) should be grounded (as it is the case for most sensors) and its output is therefore positive relative to the circuit ground.
 
Your solution, spec, is indeed a good one unless the pressure sensor (used for this project) should be grounded (as it is the case for most sensors) and its output is therefore positive relative to the circuit ground.
Hy Kerim,

Thanks for your kind words.

You are right about the practical aspects of pressure transducers. It depends which type though. The circuit is only for theoretical demonstration to illustrate the technique commonly used for transducers, temperature particularly, where you have a relatively large offset compared to the signal. Once the basic architecture of the circuit is explained, it is a fairly straight forward exercise to transform it for polarity, gain etc.

Where are you from? Care to put it in the 'Location' field on your user profile so that it is displayed in your identity window on the left of your posts.

spec
 
Last edited:
Hi, spec,

It happens that I was born and live, since more than 6 decades, in Aleppo city (Syria). Thank you for asking.

I uploaded one of the possible solutions.
 

Attachments

  • Design op amp circuit - 01.png
    Design op amp circuit - 01.png
    89.5 KB · Views: 332
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top