I have a series RC circuit with R= 2.2K Ohm and C=100 nF, and the voltage supply is a 2.5V peak square wave. And I'm not sure how to calculate the voltage across the capacitor.
-
\$\begingroup\$ What have you done so far? \$\endgroup\$– ChuCommented Mar 19, 2019 at 22:39
-
\$\begingroup\$ They teach this in class, why do you not know? \$\endgroup\$– D.A.S.Commented Mar 19, 2019 at 22:39
-
\$\begingroup\$ Is this a milliHertz square wave? Or a megaHertz square wave? Or somewhere in between? \$\endgroup\$– jonkCommented Mar 20, 2019 at 0:00
-
\$\begingroup\$ @jonk it is 1kHz square wave \$\endgroup\$– PedroCommented Mar 20, 2019 at 0:07
-
\$\begingroup\$ @Pedro When you write \$+2.5\:\text{V}\$ is the peak, does this imply that \$0\:\text{V}\$ is the lowest value? Or would \$-2.5\:\text{V}\$ be the lowest value? And are you aware that the voltage will probably be varying, regardless? \$\endgroup\$– jonkCommented Mar 20, 2019 at 0:10
1 Answer
Here's a great article about RC filters: https://www.electronics-tutorials.ws/filter/filter_2.html
You'll see that lowpass RC filters affect the input based on the following formula:
Where:
Now, the formula for a square wave can be expressed as the following Fourier series:
It might look complicated, but it's really just a sum of different sine waves called harmonics. Each of those will be affected differently by the filter because they have different frequencies.
So to know what output you'll have, just replace Vin in the first equation by the last equation and you'll get the output. You can calculate the full series on Matlab or a fancy graphic calculator, or you'll get pretty close if you estimate the input to be only the first 5-10 harmonics.