Here I wanted to share a simulation of filtering in action of bypass capacitors used in operational amplifier circuits. I found out this while I was building a square wave generator to a PWM signal generator using a potentiometer. During the simulation of the circuit I noticed that the output of the Sallen Key 2nd order filter, which is the PWM(Pulse Width Modulation) signal contained high frequency components as shown below.
The circuit diagram for the test is shown below.
The astable multivibrator, also called simply square wave generator, capacitor and resistor values where calculated using the transistor astable multivibrator calculator. The components values were selected to output a square wave with frequency of 1KHz.
The square wave enters the active low pass filter via the 10KOhm potentiometer and the output of the filter is a PWM signal whose duty cycle can be set using the potentiometer knob. The low pass filter was deliberately designed to have a cutoff frequency of 1.95KHz using the sallen-key low pass filter calculator. Hence frequencies upto ideally 1.95KHz are passed but the output square wave has a frequency of 1KHz. The capacitor concerned here is the the high frequency bypass capacitor C6 used in the low pass filter op amp circuit itself.
When a 10uF bypass capacitor is used the high frequency components are seen in the output PWM wave. The following shows high frequency noise in output PWM wave on a graph through simulation.
As you can see the highest magnitude of these high frequency signals is about 5.5V.
Now if we change the capacitor value from 10uF to 1uF, we can observe that the high frequency components which is noise for our intention has been removed.
Now the highest magnitude has reduced from earlier 5.5V to about 3.7V.
With further reduction in the bypass capacitor value from 1uF to 0.1uF, we can see that the almost all high frequency spikes in the output PWM signals are removed.
The following video shows the simulation of the filtering action of bypass capacitor used in op-amp circuits like the Sallen-key low pass filters and other op-amp circuits.
If you found this article useful, or found mistakes or bugs let us know in the comment section below.