# RC differentiator / RC integrator explanation

I am watching a Youtube video about a very simple RC differentiator.

Quote from: Dipayan Das

I really cannot understand how the output waveforms looks, where there is a negative part. I know it is a simple question but please help me to understand this basic circuit.

• What a silly answer to an electronic job interview question. Only acceptable answer for me would have several drawings including those where I choose values of 0 for some things, and where I fry the circuit!
– Abel
Sep 28 at 11:39
• That said, the explanation you probably seek is that the voltage will eventually drop to 0 through the resistor. Then when current flows back through the input capacitor, it will initially charge the output capacitor in reverse.
– Abel
Sep 28 at 11:57
• @Abel, Thank you. What topic should I search to read on this? Are this explanation "the voltage will eventually drop to 0 through the resistor. Then when current flows back through the input capacitor, it will initially charge the output" is for top circuit?
– Alan
Sep 28 at 12:00
• No it is for the bottom. I thought you only needed an explanation for where there is a negative part. You could learn to simulate and model circuits and circuit components.
– Abel
Sep 28 at 12:33
• @Abel, thank you. Can you explain in simple English the tp circuit too?
– Alan
Sep 28 at 12:41

Let's assume the second resistor in the first circuit and the second capacitor in the second circuit are not there, it will make it easier to understand.

In the integrator the capacitor starts out uncharged and acts like a short, when the input goes high the current flows through the resistor and charges the capacitor.

When the input goes low the capacitor now discharges through the resistor. The rise and fall are exponential, so the output looks like a saw tooth, curving up and down.

In the differentiator he capacitor starts out as a short so when the input goes high the output goes high almost instantly and you see a sharp positive spike. As the capacitor now charges through the resistor the voltage across it will increase, and since it's in series the output voltage is the input minus the capacitor voltage so the output drops as the cap charges. You now end up with Vin across the capacitor and 0 V at the output. When the input goes low it pulls the left side of the capacitor to ground. Since that side of the capacitor is positively charged the other side is negative with respect to ground and you see a sharp negative spike. As the capacitor discharges the output returns to 0 V. Again the charge and discharge are exponential, but because the capacitor is in series with the signal the charge/discharge curves are inverted compared to the integrator (curves are concave rather than convex).

Now let's add the second resistor and cap back in.

In the integrator the resistors form a voltage divider, and if they're equal the output will be basically the same except the peak voltage will be half the input high voltage. At the same time, the resistance in the circuit is half what it was without the second resistor so the time constant is cut in half and the charge and discharge happen twice as quickly. Note the width of the curve from the start to where it flattens out.

In the differentiator the capacitors also form a divider, so the same thing happens, the output waveform peak voltages are half the input high voltage. In this case the capacitance is doubled, so the charge/discharge happens half as quickly.

As a interviewer, I have given the simpler RC and CR circuits earlier in the video as questions to prospective employees. I did not give values, but it was an interactive test, they could ask for clarification. I would ask what might the output look like. Only about 20% would get them both right. To be fair, most of the jobs were for digital design, but I still think that every EE should have some basic understanding of analog circuits.

The intuitive way to solve these is to remember that the capacitor voltage will be the same immediately after the step function. Then, it will charge/discharge to the new steady state.

For the differentiator, assuming that the time constant is small compared to the period (cap is at steady state before the next edge), when you apply a negative step function to a cap that is charged, the negative voltage step is transfered to the output.

For the first question in your post, it is easy if you realize that a Thevenin equivalent (input and 2 resistors) will have a voltage of 1/2 the original.

Unfortunately, the second question is not intuitive to me. IMO, it is considerably harder than a simple RC or CR. I would guess that only a few percent of people could solve it in 30 seconds. I am not one of them.

• Thank you, we will contact you, if needed... Sep 29 at 13:41

Notice that the transfer function of the circuits is given by:

$$\mathscr{H}_{\space\text{circuit}\space 1}\left(\text{s}\right):=\frac{\text{V}_{\text{o}_1}\left(\text{s}\right)}{\text{V}_{\text{i}_1}\left(\text{s}\right)}=\frac{\text{R}\space\text{||}\space\frac{1}{\text{sC}}}{\text{R}+\left(\text{R}\space\text{||}\space\frac{1}{\text{sC}}\right)}=\frac{1}{2+\text{CRs}}\tag1$$ $$\mathscr{H}_{\space\text{circuit}\space 2}\left(\text{s}\right):=\frac{\text{V}_{\text{o}_2}\left(\text{s}\right)}{\text{V}_{\text{i}_2}\left(\text{s}\right)}=\frac{\text{R}\space\text{||}\space\frac{1}{\text{sC}}}{\frac{1}{\text{sC}}+\left(\text{R}\space\text{||}\space\frac{1}{\text{sC}}\right)}=\frac{\text{CRs}}{1+2\text{CRs}}\tag2$$

Where $$\\alpha\space\text{||}\space\beta:=\frac{\alpha\beta}{\alpha+\beta}\$$.

Using the convolution theorem of the Laplace transform we can see that:

$$\text{v}_{\text{o}_1}\left(t\right)=\int_0^t\text{v}_{\text{o}_1}\left(\tau\right)\cdot\mathscr{L}_\text{s}^{-1}\left[\mathscr{H}_{\space\text{circuit}\space 1}\left(\text{s}\right)\right]_{\left(t-\tau\right)}\space\text{d}\tau=$$ $$\int_0^t\text{v}_{\text{o}_1}\left(\tau\right)\cdot\frac{\exp\left(-\frac{2\left(t-\tau\right)}{\text{CR}}\right)}{\text{CR}}\space\text{d}\tau\tag3$$ $$\text{v}_{\text{o}_2}\left(t\right)=\int_0^t\text{v}_{\text{o}_2}\left(\tau\right)\cdot\mathscr{L}_\text{s}^{-1}\left[\mathscr{H}_{\space\text{circuit}\space 2}\left(\text{s}\right)\right]_{\left(t-\tau\right)}\space\text{d}\tau=$$ $$\int_0^t\text{v}_{\text{o}_2}\left(\tau\right)\cdot\left(\frac{\delta\left(t-\tau\right)}{2}-\frac{\exp\left(\frac{\tau-t}{2\text{CR}}\right)}{4\text{CR}}\right)\space\text{d}\tau\tag4$$

• Sorry, can you explain in simple English please?
– Alan
Sep 28 at 15:13
• Can someone explain the downvotes? Sep 29 at 10:15
• I didn't downvote, but the OP is asking for a simple basic understanding, so he can answer problems of this type quickly in an interview quiz. The quiz asks for a plot of the output, your answer doesn't have a plot. The person in the video did a poor job explaining, that is why the question was asked. GodJihyo's answer is good, I probably wouldn't have answered if I saw her answer before I was done. Sep 29 at 13:53