# How can I improve this linear ramp generator circuit?

#### RTI

Joined Jan 2, 2019
3
Basically, there are two power sources controlled by a on/off voltage regulator. I want to have a different slope of the linear ramp per voltage source which is controlled by R1 for V1 and R4 for V2. Is there a way I can improve this circuit or make it more efficient? (i.e replace the diodes with something else?).

#### crutschow

Joined Mar 14, 2008
34,452
What's the purpose of the linear ramp?
Why does it need to be linear?
Q1 needs to be an NPN.
Post the .asc simulation file.

Last edited:

#### RTI

Joined Jan 2, 2019
3
The purpose is I want a linear ramp as a signal to control a LM3914 chip in Bar Graph Mode. I want it linear because I want the LEDs of the LM3914 to light up sequentially at a constant rate. I had to edit the .asc file because it isn't recognizing the switches so I just have one voltage source running the circuit.

To reiterate, I want a different linear ramp slope for each voltage source but using the same circuit minus a resistor (R4 and R2 in this case) to change the slope.

#### Attachments

• 1.8 KB Views: 8

#### Alec_t

Joined Sep 17, 2013
14,314

#### Attachments

• 2 KB Views: 10

Joined Mar 10, 2018
4,057
The simplest ramp generator is to use a constant current diode (a jfet) and
a cap. In first part of drawing you replace load with cap and current source
will linearly charge the cap. Then you need to add a switch, either a JFET
or a MOSFET to short the cap to ground to reset the ramp.

The ramp speed is -

Q = C x V
I = C x dV/dT or dT = (C x dV) /I
The I in this example is Idss from the jfet datasheet.

Regards, Dana.

#### RTI

Joined Jan 2, 2019
3
Crutschow,

#### crutschow

Joined Mar 14, 2008
34,452
I removed it so I could correct an error.

I couldn't eliminate any diodes and actually added one to replace Q2 and Q3 for discharging C1.
You can't use Q2 in that configuration since it exceeds the +5V Vbe maximum reverse voltage rating.
I also oriented Q1 in the proper direction.

#### Attachments

• 2.2 KB Views: 5