Sunday, February 26, 2023

Creating a Ramp Generator

Have you ever wondered how to use the fact that a capacitor charges in a straight line to build a useful circuit? One simple and effective way is to turn it into a ramp generator. In this post, we'll take a closer look at how this can be achieved with a circuit that produces an output waveform that ramps up and down in a controlled manner.


The circuit consists of three main blocks: a capacitor (C1), a constant current source based on a PnP transistor, and a discharge circuit based on a FET. Let's take a closer look at how each of these components works together to create the ramp generator.

Discharge Circuit

Starting from the left side of the circuit, we have some kind of square wave oscillator producing a 1KHz pulse. The square waveform is then fed into a differentiator, which removes any DC offset and produces an output proportional to the rate of change of the signal. This means we only get an output of the rising and falling edges.

However, to ensure the circuit works correctly, we need to remove the negative side of the pulses. This can be achieved using a diode clamp, which is then fed into the gate of a FET. The FET effectively places a low resistance across the capacitor every 1ms, quickly discharging the capacitor.


Constant Current Source

A capacitor will create a linear voltage if charged from a constant current source. The circuit we're using here creates a constant current source by using a PnP transistor. For more details on how the constant current source works, please see a previous blog post on Building a Constant Current Source for Linear Charging.

By combining the discharge circuit and the constant current source, we can create a ramp generator that produces an output waveform that ramps up and down in a controlled manner. The ramp can be adjusted by changing the values of the capacitor or the constant current source.

In conclusion, by using the fact that a capacitor charges in a straight line, we can create a simple and effective ramp generator. This circuit can be useful in a variety of applications, such as in audio circuits, waveform generators, and more.













No comments:

Post a Comment

Mastering the Art of Deep Work: Insights from Cal Newport's "Deep Work”

  Introduction: The Power of Deep Work In a world dominated by constant connectivity and digital distractions, Cal Newport's Deep Work...