Maker Pro
Maker Pro

Ramping signals with op amps?

24Volts

Mar 21, 2010
164
Joined
Mar 21, 2010
Messages
164
Hello,

I have tried all day to make sense of this... calculation after calculation and I really don't get it.

I need some clear and concise help !!! :(

Please refer to the image attached.

I would like to be able to build and calculate (for my personal learning) an op amp that takes a 3 to 4VDC
ramping voltage and linearly outputs a 5 to 6.5 Vdc ramping signal.

If the inverting input has a gain of 2 (ra=10K and Rf = 10K) and we calculate the inverting inputs branches gain like this:

GnonInv = (6.5 - 5)/(4-3) = 1.5

so: GnonInv = ResG (1+rf/ra)
1.5 = ResG(2)
ResG = 0.75

So I choose:
r1= 2500 ohms
r2 = 7500 ohms

When the input is at 3VDC we get at R1,R2 node 2.25VDC

Therefore 2.25VDC is reflected on the inverting input and since the gain is 2, then the output becomes 4.5V

And when the input is at 4 volts we get at R1,R2 node 3.0VDC and since the gain is 2, then the output becomes 6VDC

So I have a problem. As my output I want 5.0 VDC to 6.5VDC and not 4.5VDC to 6.0VDC :(

How do you guys solve a problem like this??

Thanks for any feedback... it will be much appreciated ....

Very discouraged!

24v
 

Attachments

  • opAmp2.jpg
    488.1 KB · Views: 9

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
If you want a change in input of 1 volt to produce a change in output of 1.5 volts, then the gain is 1.5.

If that is the case, the output will be at zero volts when the input is at 3 - (5 / 1.5) volts. Therefore, you need to provide a -1/3 Volt bias.
 

24Volts

Mar 21, 2010
164
Joined
Mar 21, 2010
Messages
164
Hi Steve,

I’m trying to review all this op amp stuff.... sorry
if I’m slow.

What do you mean exactly by 3-(5/ 1.5)

And also where do I need to provide a -1/3
volt bias??? At the input (to the right of ra?)

Thanks
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
What do you mean exactly by 3-(5/ 1.5)

As you have noticed, if the gain is set correctly so that the output voltage changes by 1.5V for each 1V change in input, you won't get 5V output for a 3V input.

In order to get the correct gain, and to have the output voltages match, you need to offset what the op amp thinks is zero.

If the zero for the op amp is x V then with an input of 3 + x V, the output with a gain of 1.5 needs to 5 + x V

So 1.5 * ( 3 + x) = 5 + x
4.5 + 1.5x = 5 + x
0.5x = 0.5
x = 1

So the offset needs to be -1V (which also process you shouldn't try to multiple steps of math while you're standing on a train!

Your circuit has one resistor from the output of the op amp to the inverting input and another from the inverting input to ground. Instead of ground it needs to go to -1V

With this, an input wrt to ground of 3 V is seen by the op amp as 4V. Amplified by 1.5 you get 6V, which is 5V once the offset is removed.
 

24Volts

Mar 21, 2010
164
Joined
Mar 21, 2010
Messages
164
Hey Steve,

I was under the impression that we were able to get this ramping result without adding any other voltage offsets. So I guess we need to add an offset.

So I have recreated the circuit and tested it.
the circuit works perfectly when the bias offset is at -0.5VDC as opposed to -1 VDC.

So here's the way I rationalize it.

If the op amp gain (G2) is 1.5. The R1,R2 gain (Gn) is:

G2 = Gn ( 1+ Rf/ra)
1.5 = Gn (2)
1.5/2 = 0.75
Gn = 0.75

Hence the choice of r1 and r2 resistor values.

Therefore when V2 = 3VDC we see the ouput is 4.5 Volts. So therefore we are missing an offset of 0.5VDC at V1.

Groung - 0.5 is implied that we need a - 0.5VDC applied to V1 in order to have an Rf Vdrop of 2.75Vdc. This will result in 5VDC ot the output.

Similarily when V2 is 4 volts, the same analogy applies and vout = 6.5 Volts.

I don't know why your calculations imply a -1.0V at V1?? When -1.0VDC is applied to V1 the output is 7VDC when V2 is 3VDC!!!!

So for now deducing this as I have done works for me.

======================================================================
HOWEVER, on another note Steve! I could of done this without using r1 and r2. (I haven't tested it though). So if we just do the same circuit but ignoring r1 and r2 and I make G1 to 1.66666666 (rf = 6666 ohms and ra = 10K ohms) I could get very close to my desired ramp! but not perfect???? 3VDC in gives 5VDC out but at 4 VDC in I get 6.666666VDC out instead of 6.5VDC ???? why??

Thanks for your help
24V
 

Attachments

  • opAmp4m.jpg
    351 KB · Views: 3
Top