# Trying to create simple DC ramp circuit

#### Dean Rantala

Joined Sep 27, 2018
27
The title says it all.

Have found calculations for RC-networks, but they do not take the transistor into account. I have even tried bread-boarding a couple test circuits but to no avail..

What I am trying to accomplish: I want to apply 30VDC to one end, and on the other end, I want the voltage to go from 0VDC to the full 30 (a little transistor loss is fine) in about 5-10 seconds. I originally thought just a simple transistor, capacitor and resistor would do this.. but I am kinda at a loss.

This does NOT have to be linear.

My breadboard attempt started with a voltage divider network to get a full 5VDC (from the 30). Then, feed that 5VDC to a resistor/capacitor (rc network) that is attached to the base of an NPN transistor.. didn't work like I thought. Either this configuration will not work, or I just have to find the correct calculations.

Someone give me a pointer, I do not mind reading/learning... But I am sooooo close to handing this job to an Arduino.

Thanks!

#### dl324

Joined Mar 30, 2015
12,929
$$\small V_C = V_{IN}(1-e^{\frac{-t}{RC}})$$

What load are you driving?

#### Dean Rantala

Joined Sep 27, 2018
27
The load in a pre-amplifier circuit. Total current draw is about 140mA.

Been playing around with the simple RC networks and it seems to work (not great, but works) with a MOSFET. I suppose because these are voltage-driven, not current.

#### KeepItSimpleStupid

Joined Mar 4, 2014
4,933
Many years ago, I may have done what your asking if my xtal ball is working.

Basicaly, I used an OPTO-FET inseries with the audio inputs to an amplier. I used a VTL5c1 Vactrol (not made anymore), but others exist.
It basically forms a voltage divider with the audio.

After the power supply caps (4 of them) were up to aprox 2/3 their maximum value, the clamp to ground was released on capacitor. This drove the OPTO until the LED saturated with a constant current source (LM334). This avoided variations once the ramp finished. The main filter caps were slowly charged.

The pre-amp already had a mute circuit of about 10 seconds. This was on the same order. 10-15s.

Linear ramps, you just replace the charging with a constant current source.

==

You don;t have to use the entire 30 V range. Use a smaller voltage source, like 1.5 V and amplify with a single supply OP-amp.
Linear - charge with constant current; logarithmic - charge with constant voltage. TI and Analog devices have constant current iC's in the range of about 100-200 mA. You can even parallel the LT parts.

#### crutschow

Joined Mar 14, 2008
27,461
Here's the LTspice simulation of a circuit that should do what you want.
It uses a Sziklai pair (sometimes called a complementary Darlington) to get a high gain (and thus high input impedance) that has a lower base-emitter offset than a standard Darlington.
A current-mirror (Q3 and Q4) generate a constant current (determined by R2) to charge C1 and give a linear ramp.
The values of R2 and/or C1 may need to be tweaked to get the desired ramp time.
The maximum output is about 29V.

Last edited:

#### AnalogKid

Joined Aug 1, 2013
9,293
The title says it all.
Not really.

Without schematics, it is hard to say why neither of your circuit attempts worked. You said you don't need a linear ramp, so the first one should have (based.on.your.description).

ak

#### crutschow

Joined Mar 14, 2008
27,461
Simulation for a simple RC circuit rise.

#### MrAl

Joined Jun 17, 2014
8,382
Hello,

The main idea when trying to create a voltage ramp using a transistor is the transistor is used as a constant current source that charges the capacitor with that constant current. That means that you can look up constant current transistor circuits and choose one. If you do not need good linearity then you can use a simple one transistor circuit.

A one transistor constant current source consists of a properly biased transistor with an emitter resistor, and the base bias comes from a voltage that is usually at least two times the base emitter voltage drop. This bias voltage usually comes from two diodes in series that are biased from +Vcc with a resistor.
The main idea here is that the base bias overcomes the base emitter drop and maintains an approximately constant voltage across the emitter resistor which in turn means the approximate collector current is constant. Thus the collector acts as a constant current source or sink depending on how you have it set up.

Here is an example of an actual constant current sink circuit:

Some designs use two transistors connected as diodes for the two diodes shown in the diagram but that is optional if you dont need super precise operation.

#### Dean Rantala

Joined Sep 27, 2018
27
Simulation for a simple RC circuit rise.

View attachment 160654
Thanks!

So, my first problem was using a SINGLE transistor without sufficient gain. I see the NPN/PNP pair - that makes the entire circuit much more sensitive to the voltage-increase, correct?

Also, since a transistor is current-operated.. I must actually have some load on this circuit to test besides just a multimeter.. correct? I tried the exact circuit (quoted), but with a 33K resistor - and single transistor.

Anyway, the current mirror circuit is certainly new to me - am going to spend a little time this afternoon understanding how that works as the added education is always good. Once I go through and have a complete understanding of the current-mirror circuit, I will try one of the two circuits outlined above. I prefer to [at least try to] understand what I am doing/building.

Will report back

#### AnalogKid

Joined Aug 1, 2013
9,293
So, my first problem was using a SINGLE transistor without sufficient gain.
Maybe. A 330 ohm resistor and 10,000 uF capacitor would give you a ramp greater than 5 seconds (at 3 time constants) while supplying 2 mA of base current (-ish). Not unreasonable numbers, worth a try.

ak

#### Dean Rantala

Joined Sep 27, 2018
27
Okay, I just got done w/ the trans fluid/filter change on my car and had a chance to come back and really dig into crutschow's two diagrams.

The first one interests me the most mainly because it introduced some new concepts for me to learn.

Crutschow: please let me know if I understand this correctly...

1) Since capacitors do not (without a current limiting device) charge in a linear fashion, we use the current mirror network to regulate the charge current for that capacitor. R2 sets the current (and ultimately also contributes to the slope time as a result). C1 is the "C" of the "RC" network.

2) Q2/1 are acting as a darlington pair - got that.. Also inverts the "logic" so I can connect the + side. I believe I *could* leave out Q1 and use Q1 - hence controlling the circuit via the - side.. I am talking gain aside..

HOWEVER, what I do not understand:

The voltages... These transistors have a max Vbe of 5 volts. At 30 volts... Is the Vbe of Q4 and Q3 never going to exceed a differential of 5volts (at least durring startup)? Additionally, once completely "on", C1 will be charged to - essentially - 30 volts.. So Q2 will basically see 30 volts between base and emiter - no? I mean, I suppose that *could* depend on the RLoad? And Q1 - again, what is keeping the 30 volts from the base?

I got all the parts together and going to breadboard this up as a test shortly, but wanted to confirm the voltages. Also, had to substitute the 2N2907 for 3906's (which are basically the same just higher voltage: 40 vs 60).

#### crutschow

Joined Mar 14, 2008
27,461
So, my first problem was using a SINGLE transistor without sufficient gain. I see the NPN/PNP pair - that makes the entire circuit much more sensitive to the voltage-increase, correct?
It significantly reduces the base current.
The base current is about Ic/β for an emitter-follower where a typical value for the β current gain is about 100.
The Darlington (or Sziklai pair) reduces the base current by another factor of β, or Ic /β².
This greatly reduces the effect of the base current on voltage ramp since any base current subtracts from the current that is charging the capacitor.
2) Q2/1 are acting as a darlington pair - got that.. Also inverts the "logic" so I can connect the + side. I believe I *could* leave out Q1 and use Q1 - hence controlling the circuit via the - side.. I am talking gain aside..
Sorry, but I don't really understand what you are saying here.
What "logic"?
The voltages... These transistors have a max Vbe of 5 volts. At 30 volts... Is the Vbe of Q4 and Q3 never going to exceed a differential of 5volts (at least durring startup)?
No.
The base-emitter junction is never reversed biased for those transistors.
Why do you think they are?
So Q2 will basically see 30 volts between base and emiter - no?
No.
The emitter is at about 29V and the base is at 30V.

Below is the simulation showing the voltages at all the circuit nodes:

#### Dean Rantala

Joined Sep 27, 2018
27
Curtschow -

Thanks for the explanation!

I am a programmer (by profession) who - at times - dives into MCU's. So, my mind things logic - sorry. 1 == on == positive, 0 == off == negative. In other words.. Without the transistor pair, the "logic is inverted" (we are controlling negative side -vs- possite)... and.. as you said: increasing base current (I now see and understand that as well).

I completely failed to realize as well that - without the darlington pair - the charge to c1 is affected more.

Regarding Q3/4.. I did not think it would ever be reverse-biased.. I just failed to fully grasp the way a mirror-pair worked in practice in regards to the voltages.. The difference between E-B of those is - by design - never more than what is needed for the current to flow.

Thanks for the help.. I am **not** an electrical engineer, but I am expanding my knowledge - so I may be a bit slow to grasp some of this as I move forward. Nonetheless: I have WORE OUT at least 2 of Googles servers this past couple days looking up datasheets, researching circuit principals and trying to gain a better understanding of transistors in general. My exposure to them (more with MOSFETS) is utilizing in combination with an MCU - and usually via PWM. So the analog side of things is certainly out of my comfort zone. Besides, the company I work with usually has EE's to handle the hardware side lol..

Alrighty... going to mock this up with a breadboard and test the operation. Will report back.. And thanks again so far for all the help!

#### crutschow

Joined Mar 14, 2008
27,461
The difference between E-B of those is - by design - never more than what is needed for the current to flow.
The base-emitter junction looks like a diode so the forward-bias voltage is similar to that of a forward-biased diode or <1V.

#### Dean Rantala

Joined Sep 27, 2018
27
The base-emitter junction looks like a diode so the forward-bias voltage is similar to that of a forward-biased diode or <1V.
Aaaaahhhhh..... Makes sense!!

Breadboarded circuit works great, about 8 seconds to full ramp. I changed to resistor value just a bit, but works great.

Now Im gonna wire this into a small pcb and test out how well this fixes my original issue.

#### Dean Rantala

Joined Sep 27, 2018
27
Tried the [breadborded] circuit actually connected to the pre-amp board.

I keep loosing Q3. Even dug out a proper 2907A for 60V.. same thing. Works once or twice, and no more.

Any thoughts?

#### crutschow

Joined Mar 14, 2008
27,461
I keep loosing Q3.
There's nothing that should cause the failure of Q3 by connecting a load if the rest of the circuit is working properly.

I suspect a wiring error of some type.
Double check all the connections with an ohmmeter (with the power off).
Make sure the transistor connections are correct (particularly the emitter and collector of the 2N2907's).
(A BJT will operate with the collector and emitter reversed, although with very low current gain).

Measure the actual load current.

Is Q1 operating properly?

Is there a proper common (ground) connection between the circuit and the load?

#### eetech00

Joined Jun 8, 2013
2,498
Tried the [breadborded] circuit actually connected to the pre-amp board.

I keep loosing Q3. Even dug out a proper 2907A for 60V.. same thing. Works once or twice, and no more.

Any thoughts?
Hi

I'm thinking the max Emitter-Base voltage (5.0v) is being exceeded destroying Q3.

eT

#### crutschow

Joined Mar 14, 2008
27,461
I'm thinking the max Emitter-Base voltage (5.0v) is being exceeded destroying Q3.
How can the emitter-base voltage go above 5V?
It's forward biased at its normal on voltage of about 0.7V.

Last edited:

#### eetech00

Joined Jun 8, 2013
2,498
How can the emitter-base voltage go above 5V?
It's forward biased at its normal on voltage of about 0.7V.
Measure the voltage from Base of Q3 to ground.