Electronics-Related.com
Forums

Constant current to capacifor / rising voltage

Started by sonn...@gmail.com June 19, 2023
Hi

I want to get a steady rising voltage, which is simple as constant current.
Say, like a saw tooth but only first rising part and really slow.
(I do not want a timer, but a rising voltage)

I was thinking of something like this using the Vbe of a transistor
https://electronics.stackexchange.com/questions/53615/constant-current-source

Also a similar thing can be done with an op-amp
https://www.instructables.com/Constant-Current-Source-with-Operational-Amplifier/

But I was just wondering, are there other ways of doing this?

On a sunny day (Mon, 19 Jun 2023 01:43:18 -0700 (PDT)) it happened
"sonnic...@gmail.com" <sonnichjensen@gmail.com> wrote in
<eed6b6ab-4f16-402c-95eb-5dfcbdc3dd00n@googlegroups.com>:

>Hi > >I want to get a steady rising voltage, which is simple as constant current. >Say, like a saw tooth but only first rising part and really slow. >(I do not want a timer, but a rising voltage) > >I was thinking of something like this using the Vbe of a transistor >https://electronics.stackexchange.com/questions/53615/constant-current-source > >Also a similar thing can be done with an op-amp >https://www.instructables.com/Constant-Current-Source-with-Operational-Amplifier/ > >But I was just wondering, are there other ways of doing this?
If you have a realy high voltage, say 1000V and only need a 1 V ramp, then just a resistor will do, as I will not change much (1 part in 1000) in that case. JFETs also make decent current sources, this is for a negatve ramp (J2): https://panteltje.nl/panteltje/scope_tv/index.html
On Mon, 19 Jun 2023 01:43:18 -0700 (PDT), "sonnic...@gmail.com"
<sonnichjensen@gmail.com> wrote:

>Hi > >I want to get a steady rising voltage, which is simple as constant current. >Say, like a saw tooth but only first rising part and really slow. >(I do not want a timer, but a rising voltage) > >I was thinking of something like this using the Vbe of a transistor >https://electronics.stackexchange.com/questions/53615/constant-current-source
That works but won't be very temperature stable. A zener or bandgap instead of the two diodes would improve it. An LED can be the voltage reference instead of two diodes. That can temperature compensate Vbe. And it lights up! I think I did that a while back and it worked pretty well.
> >Also a similar thing can be done with an op-amp >https://www.instructables.com/Constant-Current-Source-with-Operational-Amplifier/
That may oscillate. There are fixes for that. Use a bandgap as the reference. And a mosfet to eliminate base current error.
> >But I was just wondering, are there other ways of doing this?
A depletion fet, LND150 type, can be a simple constant-current source. LND150 is about 1.6 mA but a source resistor can scale that down. A 3-terminal voltage regulator, LM317 type, and a resistor make a constant-current source. An opamp follower and a bootstrap current source is nice. That can make nanosecond linear ramps. Bootstraps are fun. An opamp integrator makes a nice ramp. Just a voltage, a resistor, and a cap make an exponential rise, which is sorta linear. That's easy and can go very fast. Just live with or compensate for the curvature. Add an inductor to make that more linear. If someone suggests a current mirror, it's probably a bad idea. The ultimate horror: a PNP operating in beta-limited constant-current mode. One transistor and one resistor. Beta-bracketed transistors like BCX71 make that slightly less awful. I did a linear ramp recently with a PV optocoupler driving a cap and an n-channel mosfet follower, with amps of drive capability. It ramps all the way up to the 48-volt power rail. It's a soft-start circuit for a power inverter.
On 2023-06-19, sonnic...@gmail.com <sonnichjensen@gmail.com> wrote:
> Hi > > I want to get a steady rising voltage, which is simple as constant current. > Say, like a saw tooth but only first rising part and really slow. > (I do not want a timer, but a rising voltage)
So, a "ramp generator".
> I was thinking of something like this using the Vbe of a transistor > https://electronics.stackexchange.com/questions/53615/constant-current-source > > Also a similar thing can be done with an op-amp > https://www.instructables.com/Constant-Current-Source-with-Operational-Amplifier/ > > But I was just wondering, are there other ways of doing this?
Many, so many. -- Jasen. &#127482;&#127462; &#1057;&#1083;&#1072;&#1074;&#1072; &#1059;&#1082;&#1088;&#1072;&#1111;&#1085;&#1110;
On Monday, June 19, 2023 at 6:43:23&#8239;PM UTC+10, sonnic...@gmail.com wrote:
> Hi > > I want to get a steady rising voltage, which is simple as constant current. > Say, like a saw tooth but only first rising part and really slow. > (I do not want a timer, but a rising voltage) > > I was thinking of something like this using the Vbe of a transistor > https://electronics.stackexchange.com/questions/53615/constant-current-source > > Also a similar thing can be done with an op-amp > https://www.instructables.com/Constant-Current-Source-with-Operational-Amplifier/ > > But I was just wondering, are there other ways of doing this?
You want to use a dual transistor so both transistor junctions are at the same temperature. By cascoding one or both of the transistors you can do better. https://en.wikipedia.org/wiki/Wilson_current_mirror It all depends on what kind of performance you need. -- Bill Sloman, Sydney
On Monday, June 19, 2023 at 8:25:27&#8239;PM UTC+10, John Larkin wrote:
> On Mon, 19 Jun 2023 01:43:18 -0700 (PDT), "sonnic...@gmail.com" > <sonnic...@gmail.com> wrote: > > >Hi > > > >I want to get a steady rising voltage, which is simple as constant current. > >Say, like a saw tooth but only first rising part and really slow. > >(I do not want a timer, but a rising voltage) > > > >I was thinking of something like this using the Vbe of a transistor > >https://electronics.stackexchange.com/questions/53615/constant-current-source > That works but won't be very temperature stable. A zener or bandgap > instead of the two diodes would improve it. > > An LED can be the voltage reference instead of two diodes. That can > temperature compensate Vbe. And it lights up! I think I did that a > while back and it worked pretty well. > > > >Also a similar thing can be done with an op-amp > >https://www.instructables.com/Constant-Current-Source-with-Operational-Amplifier/ > That may oscillate. There are fixes for that. Use a bandgap as the > reference. And a mosfet to eliminate base current error. > > > >But I was just wondering, are there other ways of doing this? > A depletion fet, LND150 type, can be a simple constant-current source. > LND150 is about 1.6 mA but a source resistor can scale that down. > > A 3-terminal voltage regulator, LM317 type, and a resistor make a > constant-current source. > > An opamp follower and a bootstrap current source is nice. That can > make nanosecond linear ramps. Bootstraps are fun. > > An opamp integrator makes a nice ramp. > > Just a voltage, a resistor, and a cap make an exponential rise, which > is sorta linear. That's easy and can go very fast. Just live with or > compensate for the curvature. Add an inductor to make that more > linear. > > If someone suggests a current mirror, it's probably a bad idea.
John Larkin thinks that he can design electronic circuits. People who actually can are more fond of current mirrors, but they tend to recommend the three transistor Wilson current mirror or it's four transistor elaboration. Integrated circuits are full of current mirrors, but their designers have a lot more things that they can play with
> The ultimate horror: a PNP operating in beta-limited constant-current mode. One transistor and one resistor. Beta-bracketed transistors like BCX71 make that slightly less awful.
It is the sort of gross over-simplification that only gets mentioned for completeness.
> I did a linear ramp recently with a PV optocoupler driving a cap and an n-channel mosfet follower, with amps of drive capability.
MOSFETs can need a gate-stopper resistor - 10R/22R mostly - in series with the gate to discourage them from oscillating.
> It ramps all the way up to the 48-volt power rail. It's a soft-start circuit for a power inverter.
A rather expensive one. -- Bill Sloman, Sydney
On 6/19/2023 1:43 AM, sonnic...@gmail.com wrote:
> Hi > > I want to get a steady rising voltage, which is simple as constant current. > Say, like a saw tooth but only first rising part and really slow. > (I do not want a timer, but a rising voltage)
How much control (repeatability, etc.) do you want over the current's magnitude? Over how short of a time interval do you want to have this occur? How linear must it be (or, just monotonically increasing?) WHY do you want it?
> I was thinking of something like this using the Vbe of a transistor > https://electronics.stackexchange.com/questions/53615/constant-current-source > > Also a similar thing can be done with an op-amp > https://www.instructables.com/Constant-Current-Source-with-Operational-Amplifier/ > > But I was just wondering, are there other ways of doing this?
On Monday, June 19, 2023 at 4:43:23&#8239;AM UTC-4, sonnic...@gmail.com wrote:
> Hi > > I want to get a steady rising voltage, which is simple as constant current. > Say, like a saw tooth but only first rising part and really slow. > (I do not want a timer, but a rising voltage) > > I was thinking of something like this using the Vbe of a transistor > https://electronics.stackexchange.com/questions/53615/constant-current-source > > Also a similar thing can be done with an op-amp > https://www.instructables.com/Constant-Current-Source-with-Operational-Amplifier/ > > But I was just wondering, are there other ways of doing this?
Make your question more specific by stating just exactly how "really slow" the ramp should be, the low to high voltage range of the ramp, the load using the ramp, the ultimate performance accuracy you're going for, circuit power supplies available, whether you want really simple low cost, easy to build, or not.
sonnic...@gmail.com <sonnichjensen@gmail.com> wrote:
> Hi > > I want to get a steady rising voltage, which is simple as constant current. > Say, like a saw tooth but only first rising part and really slow. > (I do not want a timer, but a rising voltage) > > I was thinking of something like this using the Vbe of a transistor > https://electronics.stackexchange.com/questions/53615/constant-current-source > > Also a similar thing can be done with an op-amp > https://www.instructables.com/Constant-Current-Source-with-Operational-Amplifier/ > > But I was just wondering, are there other ways of doing this? > >
Relying on the collector impedance of a BJT over a wide voltage range will get you roughly 1-10% nonlinearity, depending on the device and conditions, on account of the Early effect. A big resistor in series with the emitter helps a lot, but doesn&rsquo;t fix the next problem, which is that the beta also varies with Vce. You can fix that problem by using a FET instead. Their nonlinearity is much worse than a BJT&rsquo;s, so you absolutely need an op amp wrapped round it, with close attention to stability as JL says. Another approach to slowish ramps is a bootstrap current source. You hang a voltage reference on the output of an op amp follower, and connect a resistor from the reference to the follower&rsquo;s input. In principle, that makes a perfectly constant current. You can make it pretty nearly perfect in real life too, by choosing a FET op amp with really good common mode rejection, such as the OPA140. The two remaining problems are the reset circuit and dielectric absorption in the capacitor. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics
On Mon, 19 Jun 2023 13:35:11 -0000 (UTC), Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>sonnic...@gmail.com <sonnichjensen@gmail.com> wrote: >> Hi >> >> I want to get a steady rising voltage, which is simple as constant current. >> Say, like a saw tooth but only first rising part and really slow. >> (I do not want a timer, but a rising voltage) >> >> I was thinking of something like this using the Vbe of a transistor >> https://electronics.stackexchange.com/questions/53615/constant-current-source >> >> Also a similar thing can be done with an op-amp >> https://www.instructables.com/Constant-Current-Source-with-Operational-Amplifier/ >> >> But I was just wondering, are there other ways of doing this? >> >> > >Relying on the collector impedance of a BJT over a wide voltage range will >get you roughly 1-10% nonlinearity, depending on the device and conditions, >on account of the Early effect. > >A big resistor in series with the emitter helps a lot, but doesn&#4294967295;t fix the >next problem, which is that the beta also varies with Vce. > >You can fix that problem by using a FET instead. Their nonlinearity is much >worse than a BJT&#4294967295;s, so you absolutely need an op amp wrapped round it, with >close attention to stability as JL says. > >Another approach to slowish ramps is a bootstrap current source. You hang a >voltage reference on the output of an op amp follower, and connect a >resistor from the reference to the follower&#4294967295;s input. In principle, that >makes a perfectly constant current. >
I do that for my fastest linear ramps, nanosecond stuff. It avoids making a really good fast low-capacitance constant-current source, which can be a nuisance. Some fraction of the world's fine-pitch ICs are fabbed by a controller that includes this: https://www.dropbox.com/scl/fi/shk7hp4d1t4t0nml3wtfb/TEM2_Time_Stamp.jpg?dl=0&rlkey=ktld7d8uwy5amt4ecbq2bobwv Apologies for the trimpot; we had to do this in a rush. Here's a later variant with two time ranges: https://www.dropbox.com/scl/fi/10zr76x347kxktukb6msp/Fast_Ramp.jpg?dl=0&rlkey=t3yz6hjhjv88juqexd384b5ar Incidentally, does this link work? https://www.dropbox.com/scl/fi/10zr76x347kxktukb6msp/Fast_Ramp.jpg?raw=1 Dropbox is being obtuse again.
>You can make it pretty nearly perfect in real life too, by choosing a FET >op amp with really good common mode rejection, such as the OPA140. > >The two remaining problems are the reset circuit and dielectric absorption >in the capacitor. > >Cheers > >Phil Hobbs