With a constant current source, we can charge a capacitor in a linear fashion. We examine a simple constant current source circuit and how it works. We also touch the difference between linear charging and based on the RC-time constant.
In a post on building a relaxation oscillator, I used a constant voltage source for charging. This results in the capacitor charging exponentially. With the rising voltage the current will drop and thus the charging will slow down. An RC-time constant graph shows that with every time step the charging slows significantly.
If we want the charging to happen in a linear fashion, we need to use a constant current source instead.
Constant Current Source Circuit
There are many ways to build a constant current source. The circuit below is simple, elegant and works for our purpose. The circuit charges the capacitor through the PNP transistor. The switch let the capacitor quickly discharge when closed.
The constant current source is built around a BJT general purpose PNP transistor like a 2N3906. In a PNP transistor, the base is a current sink where current flows out off. The two diodes set up a fixed voltage at the base of the transistor of about two diode drops (10.8V). You can use a Zener diode for this purpose as well.
Since the emitter-base junction acts like a diode we’re left with the source voltage minus a diode drop at the emitter, which is about 11.3 Volt.
The resistor value at the emitter sets the current amount flowing through the transistor. This current is almost equal at the collector as long as the collector voltage is lower than the base. When the collector voltage reaches that of the base, the current at the collector drops to almost 0 Amps.
In the scope view, you can see the straight controlled linear rise of the voltage at the capacitor.