Trying to create simple DC ramp circuit

Discussion in 'Analog & Mixed-Signal Design' started by Dean Rantala, Sep 29, 2018.

  1. Dean Rantala

    Thread Starter New Member

    Sep 27, 2018
    17
    0
    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!
     
  2. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,083
    1,628
     \small V_C = V_{IN}(1-e^{\frac{-t}{RC}})

    upload_2018-9-28_21-56-34.png

    What load are you driving?
     
  3. Dean Rantala

    Thread Starter New Member

    Sep 27, 2018
    17
    0
    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.
     
  4. KeepItSimpleStupid

    Distinguished Member

    Mar 4, 2014
    2,832
    497
    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.
     
  5. crutschow

    Expert

    Mar 14, 2008
    19,754
    5,525
    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.

    upload_2018-9-29_0-23-24.png
     
    Last edited: Sep 29, 2018
    atferrari and Dean Rantala like this.
  6. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    7,033
    1,991
    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
     
  7. crutschow

    Expert

    Mar 14, 2008
    19,754
    5,525
    Simulation for a simple RC circuit rise.

    upload_2018-9-29_8-45-4.png
     
    Dean Rantala likes this.
  8. MrAl

    AAC Fanatic!

    Jun 17, 2014
    5,177
    1,119
    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:
    TransistorConstantCurrent-1.gif

    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.
     
    atferrari likes this.
  9. Dean Rantala

    Thread Starter New Member

    Sep 27, 2018
    17
    0
    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
     
  10. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    7,033
    1,991
    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
     
  11. Dean Rantala

    Thread Starter New Member

    Sep 27, 2018
    17
    0
    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).
     
  12. crutschow

    Expert

    Mar 14, 2008
    19,754
    5,525
    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.
    Sorry, but I don't really understand what you are saying here. o_O
    What "logic"?
    No.
    The base-emitter junction is never reversed biased for those transistors.
    Why do you think they are?
    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:

    upload_2018-9-29_17-10-33.png
     
  13. Dean Rantala

    Thread Starter New Member

    Sep 27, 2018
    17
    0
    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!
     
  14. crutschow

    Expert

    Mar 14, 2008
    19,754
    5,525
    The base-emitter junction looks like a diode so the forward-bias voltage is similar to that of a forward-biased diode or <1V.
     
  15. Dean Rantala

    Thread Starter New Member

    Sep 27, 2018
    17
    0
    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.
     
  16. Dean Rantala

    Thread Starter New Member

    Sep 27, 2018
    17
    0
    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?
     
  17. crutschow

    Expert

    Mar 14, 2008
    19,754
    5,525
    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?
     
  18. eetech00

    Senior Member

    Jun 8, 2013
    1,141
    231
    Hi

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

    eT
     
  19. crutschow

    Expert

    Mar 14, 2008
    19,754
    5,525
    How can the emitter-base voltage go above 5V? :confused:
    It's forward biased at its normal on voltage of about 0.7V.
     
    Last edited: Sep 30, 2018
  20. eetech00

    Senior Member

    Jun 8, 2013
    1,141
    231
    Measure the voltage from Base of Q3 to ground.
     
Loading...