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.

The theory behind an integrator...

Status
Not open for further replies.

ikalogic

Member
hello,

i've tried to build triangle or saw tooth generator using op-amp integrator and a source of square pulses.. but always failed, the op-amp would always output +Vcc ... anyway, as a first step, i only want to understand the math and the threory behind this circuit
**broken link removed**

the first thing that blocks me when i try to understand it, is that i feel like there must be somekind of relationship between the values of R and C and the frequency of the square wave...

Then getting a litle deeper into the math:
**broken link removed**
the question is about the integration.. what are the upper and lower limits of the integration? i guess it's from T1 to T2.. yes... but what is T1 and T2?

i've got more and more questions.. but let's start with that, and see whre the discussion goes...

Note: i am in mechatronics engineering (not electrical) so be nice with the math! lol

thanks for your help guys
 
the output will be limited by the output SAT voltage of the OPAMP.
There is a high chance that the RC time constant is very very low and thus when you put a squarewave in all you see is another square wave (if looking on a scope you should see the edges of the waveform having the RC curve). work out the time constant w.r.t. your source period to get the right values
 
One problem you may be having is that without a signal applied, the op amp is going to slew the output off to one rail or the other. A resistor across the capacitor will cure this problem. Use a large value, but it's hard to know what to suggest a specific vaslue.

The idea of integration is that the capacitor should never reach full charge, or the op amp swing its output far enough that it hits a supply rail. The obvious variables here are: the op amp (slew rate, rail-to-rail outout or not), the sixe of the capcitor, the size or R1, the magnitude of the square wave signal, and the frequency of the square wave.

If you want to just have several signals in quadriture, get an NTE864 from Mouser. It's the equivalent of an ICL8038. It gives you sine, square and triangle outputs.
 
Vin is a unit step function, u(t) then Vout = -t/RC

So at t = RC, Vout = -1 Volt. (assuming that Vout and Vin = 0 at t = 0)

eg. if R = 100k and C = 0.1 uF, RC = 10 ms so if you input a 2 Volt peak to peak squarewave (IE. -1V to +1v) with a frequency of 50 Hz, you should see a 50 Hz triangular wave.
 
ljcox said:
Vin is a unit step function, u(t) then Vout = -t/RC

So at t = RC, Vout = -1 Volt. (assuming that Vout and Vin = 0 at t = 0)

eg. if R = 100k and C = 0.1 uF, RC = 10 ms so if you input a 2 Volt peak to peak squarewave (IE. -1V to +1v) with a frequency of 50 Hz, you should see a 50 Hz triangular wave.

gr8 that helps a lot guys thanks...

i am beginning to link between the theory and the practice!

i'll take a piece of paper and do some math.. trying to imagine a litle more how it work, then i'll post new questions..
 
ljcox said:
Vin is a unit step function, u(t) then Vout = -t/RC

So at t = RC, Vout = -1 Volt. (assuming that Vout and Vin = 0 at t = 0)

eg. if R = 100k and C = 0.1 uF, RC = 10 ms so if you input a 2 Volt peak to peak squarewave (IE. -1V to +1v) with a frequency of 50 Hz, you should see a 50 Hz triangular wave.

okay, here is my first math realated stupid question!

I tried to imagine i am design a circuit, that has as intput a 50Hz square wave, and swings from -2V to 2V. taking the initial condition : Vout and Vin = 0 at t = 0. i fixed the value of C to 10nF, and put V= 2V, t = 10ms and found the last unknown which was R = -100Kohm..!!

now, i know that if i used Vout = -2V instead of +2v, i would have got a logical +100Kohm... but what is the meaning of that negative sign?

i think i got the essential parts of the idea... but i hate those litle things that feels like a splinter in my mind! :D
 
ikalogic said:
okay, here is my first math realated stupid question!

I tried to imagine i am design a circuit, that has as intput a 50Hz square wave, and swings from -2V to 2V. taking the initial condition : Vout and Vin = 0 at t = 0. i fixed the value of C to 10nF, and put V= 2V, t = 10ms and found the last unknown which was R = -100Kohm..!!

now, i know that if i used Vout = -2V instead of +2v, i would have got a logical +100Kohm... but what is the meaning of that negative sign?

i think i got the essential parts of the idea... but i hate those litle things that feels like a splinter in my mind! :D

"but what is the meaning of that negative sign?"

The negative sign is used because the op amp is wired as an inverting function because the input signal is going to the minus input of the amp.
 
Leftyretro said:
"but what is the meaning of that negative sign?"

The negative sign is used because the op amp is wired as an inverting function because the input signal is going to the minus input of the amp.

i meant the negative sign of "-100 Kohm" ..... any clues? there is no physical meaning for a -ve resistor, as far as i knwo.....
 
negative resistance

i think there is no negetive resistance only the voltage drop across the resistance is negative or +ive depending on the terminals og the op amp
 
excuse me, but i'll have to be extra clear, whether you think it or not, the calculations yielded a negative value of resistance!

now i just want to know if there is an error on my side, or if this is normal and we take the ABS value ...?
 
The operational integrator is a lot easier to explain to someone who understands feedback theory and the concept of virtual ground. Are you one of those people? :)
 
ikalogic said:
okay, here is my first math realated stupid question!

I tried to imagine i am design a circuit, that has as intput a 50Hz square wave, and swings from -2V to 2V. taking the initial condition : Vout and Vin = 0 at t = 0. i fixed the value of C to 10nF, and put V= 2V, t = 10ms and found the last unknown which was R = -100Kohm..!!

now, i know that if i used Vout = -2V instead of +2v, i would have got a logical +100Kohm... but what is the meaning of that negative sign?

i think i got the essential parts of the idea... but i hate those litle things that feels like a splinter in my mind! :D
You're assuming that Vin = 0 Volt at t = 0+.

The integral of 0 is 0. So if Vin = 0, then Vout = 0 for ever.

I may have misled you by stating that Vout and Vin = 0 at t = 0. What I was trying to say is that C is discharged at t = 0.

In fact, Vin must step to a voltage other than 0 at t = 0+

So you need to decide what input step you want.

For example, if Vin = -1 Volt at t = 0+, and you want Vout = 2 Volt at 10 ms,
then 2 = -(-1)/RC. So R = 1/2C
 
ljcox said:
You're assuming that Vin = 0 Volt at t = 0+.

The integral of 0 is 0. So if Vin = 0, then Vout = 0 for ever.

I may have misled you by stating that Vout and Vin = 0 at t = 0. What I was trying to say is that C is discharged at t = 0.

In fact, Vin must step to a voltage other than 0 at t = 0+

So you need to decide what input step you want.

For example, if Vin = -1 Volt at t = 0+, and you want Vout = 2 Volt at 10 ms,
then 2 = -(-1)/RC. So R = 1/2C
Len, I know you'll correct this if I wait a while... ;)
 
okay..... after some thinking, i think that my error is that i assumes both the input and output have the same sign.. which is impossible in this coniguration...!

when i used Vout to be the opposite sign of Vin (which is logical) then the calculation yields good old positive resistor values...

i feel better! :D thanks
 
For analysis purposes, you must assume that the voltage is the same at both the negative and positive terminals of the op-amp. Thus, the voltage at the negative terminal is what we call a virtual ground or 0 volts. I will label the negative terminal "V-". By nodal analysis, we know that the currents going into the node V- is the same as the current leaving the node V-. Hence, the current entering the node must be the same current going to the capacitor due to the virtual ground.

Due to the virtual ground, the negative voltage across the capacitor is the output voltage Vo(passive sign convention). The voltage across a capacitor in general is V(t=0)+1/C*Integral(i(t)dt,0,x). Substitute i(t) = Vin/R and you have your theoretical integrator. I have attached the work I did in MSpaint. I hope you can read it and it makes sense.

Of course this is theoretical and will not work in practice. You need a feedback resistor in parallel with the capacitor to get it to work if I remember correctly. I'll hopefully post on this part after dinner if no one else beats me.

edit: The reason you need a resistor in parallel with the capacitor is because any DC input offset will get integrated over time and saturate your amplifier. The basic rule for choosing this resistor value is: Rf >> 1/(2*pi*f*C)
 

Attachments

  • integrator.JPG
    integrator.JPG
    35.3 KB · Views: 315
Last edited:
arod said:
For analysis purposes, you must assume that the voltage is the same at both the negative and positive terminals of the op-amp. Thus, the voltage at the negative terminal is what we call a virtual ground or 0 volts. I will label the negative terminal "V-". By nodal analysis, we know that the currents going into the node V- is the same as the current leaving the node V-. Hence, the current entering the node must be the same current going to the capacitor due to the virtual ground.

Due to the virtual ground, the negative voltage across the capacitor is the output voltage Vo(passive sign convention). The voltage across a capacitor in general is V(t=0)+1/C*Integral(i(t)dt,0,x). Substitute i(t) = Vin/R and you have your theoretical integrator. I have attached the work I did in MSpaint. I hope you can read it and it makes sense.

Of course this is theoretical and will not work in practice. You need a feedback resistor in parallel with the capacitor to get it to work if I remember correctly. I'll hopefully post on this part after dinner if no one else beats me.

edit: The reason you need a resistor in parallel with the capacitor is because any DC input offset will get integrated over time and saturate your amplifier. The basic rule for choosing this resistor value is: Rf >> 1/(2*pi*f*C)
A resistor in parallel with the cap, or some sort of reset, is needed in an integrator that is not within a larger feedback loop. In some cases, such as a so-called "function generator", the integrator is in a feedback loop with a Schmitt trigger. In this case, no parallel resistor is needed, because the Schmitt trigger automatically inverts the polarity of the input voltage when the integrator's output reaches defined +/- limits.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top