fast CC/CV power supply take two - Page 1
Forum section: electronics / projects

author: exe
author_rank: Unknown
timestamp: July 30, 2023, 07:03:39 pm
content: Hello my friends,In my previous attempthttps://www.eevblog.com/forum/projects/how-to-design-fast-bench-supply-with-cc-and-cv/I didn't reach my performance goals. Namely, fast operation under wide range of current, while having minimal output capacitance. I decided that output current range (0-2A) is too much for the topology I chose. So, here is another project that aims at low currents. Desired characteristics: 0.5-12V 0-50mA, stretch goal: 0-30V, 200mA.The circuit I draw is a bit of a mess (I blame kicad), so I describe it here in a few words. It's a shunt voltage regulator with a constant current source. This way two loops (CC and CV) are always active. When output voltage drops below set voltage and then goes back, U5 has to slew a little bit. To reduce slewing time, there is voltage shifter V1 on schematic. I used a photovoltaic cell for that, hope it will work. I'll post later more details how the circuit operates, and why I think it should be faster than a typical mosfet current source (spoiler alert: using mosfet in saturation region for intrinsic current regulation and cascode).I just assembled the board, and did a very quick test: output current set to 10mA, load step 840 Ohm to 5k Ohm and back.Rise time is 0.85us, clean step response, which is pleasantly good). There is no output capacitor except parasitics. The load step is generated by TS555 onboard timer.This is my first four-layer PCB, and my first use of kicad. Mistakes were made, I screwed voltage regulator part, namely swapped opamp IN+ and IN-. I will have to think how to bodge it. Another problem, minor but annoying: in Art of electroncs 555 timer circuits don't have reset pin connected. So I left it floating. I guess you know that was a bad idea. A bigger issue: the timer has output voltage of 10V, which is probably too much for the fet that does step load. Idk which fet I used, probably FDV303N (Vgs max 8V ). So, fet may die, but hey, it's a proto board. The fet has zenner protection on the gate, which I think might explain why circuit suddenly stops working when I raise power rail beyond 10V.Question: do I need to short my ground clip? Is it ok for raise times around 300-500ns? I use 10x probe.Challenges:- the biggest one is accurate current measurement as now current depends on two resistors: the one that sets current, and the one that shunts output.- voltage doesn't go all the way down to zero, because of the drop on shunt resistors. I cannot remove shunt resistors (forgot to show them on schematic) because I need to measure current. So, in the worst case in CV-mode minimal voltage is 0.6V. In CC it goes down zero no problem (I think, need to test).That's it for now, off I go to celebrate my first PCB in a while.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 30, 2023, 07:28:24 pm
content: Probe clip should be fine around there. Can always check both ways and see how it affects the edge.Tim

author: exe
author_rank: Unknown
timestamp: August 13, 2023, 03:53:30 pm
content: I'm now testing voltage regulation section. And I've got problems with it. Ignoring huge voltage spikes when switching CC/CV, the voltage sags quite a bit, and slow to fully recover. I figured I put a wrong capacitor in feedback loop: 1u instead of 1n. I fixed that, now new problems)One is overshooting, and another one is capacitive load. Anyway, here are some scopeshots to make this thread a bit less boring. One the first one you can see two responses when stepping CC/CV from 1 to 5V, one from pfet-bjt complementary feedback pair (CFP, Q6/Q7, blue trace), driving voltage 1.7V or there about), the other one is just plain bjt (Q8, yellow trace). Overshoot is significant in both case. CFP also has significant ringing, suggesting it needs more compensation or something.The second shot show help of photovoltaic level shifter. Unsurprisingly, a 650mV shift corresponds to 650mV less overshoot. As of why the drop is 650mV, I'm a bit puzzled. I use an IR led, the forward voltage drop last time I measured was 1V. But in circuit it's only 0.65V. I guess that's because photovoltaic cell outputs only 1.24uA of current?PS I included schematic of the PSU.

author: exe
author_rank: Unknown
timestamp: August 23, 2023, 08:46:22 pm
content: My friends, I think I found a flaw in current regulator. It works the best when the voltage across shunt is large. Which makes sense, I just didn't take this into account. This limits minimum current on the range. I think about 0.1V is the minimum voltage for this approach. This can be seen on the following two plots showing 1V-10V step response for 25mA load:100ohm_25ma.png vs 5ohm_25ma.png . The later has twice lower rise time. Also notice that top of waveform is not flat. That's because the mosfet current source is not ideal, and an overcompensated opamp has to adjust voltage a little bit:Finally, I include 100mA step response. This is about maximum I can get from sot-723 pass fet (RZM001P02T2L) without risking to burn it. Not that I didn't try to push thru it 200mA, it just started to smell bad, so I had to reduce the current). Here it is:Next is try to get voltage regulation. Last time I tried I got nasty overshoots and oscillations.

author: exe
author_rank: Unknown
timestamp: September 14, 2023, 08:45:33 pm
content: So, I have problems with the circuit, so I decided to first make CC mode working reliably. So, what I did is:1) tried different pass transistors and select the one with fastest response2) optimize opamp feedback.It seems the smaller gate capacitance, the better performance. So, I chose tp0606n3. It requires a heatsink. Fortunately, I have one. The heatsink on TO-92 looks a bit ridiculous, but it works, lowering temperature from over 100C to about 66C under worst condition (100mA at 10V).As of opamp feedback, it turned out I can just drive the fet directly, no oscillation so far. I include two plots for 1V-10V step response in CC mode for 100mA and 10mA loads. Imo looks fine. Idk why there is a small step, that's currently not an issue, though might be an indication of something interesting.Currently, the biggest issue is that CV mode is slow and oscillates (screenshot attached). I'm investigating this. I really hope it's not two loops fighting, as I don't have much skills to resolve that.

author: exe
author_rank: Unknown
timestamp: September 25, 2023, 12:25:03 pm
content: Hello my friends. It's been a while since I posted here. The project proved to be more complicated than I expected, but I'm making progress.I think I'm (mostly) done with constant current source. At the end, the best performance I got from mosfets with minimal gata capacitance, so I just used TP0606N3 with input capacitance about 80p (value from datasheet). With that, I could just drive it from NE5532 directly, no compensation or anything is needed.So, onto the voltage regulating section. This is where I've got the most troubles. I've got some good results with bjt as a pass transistor, but that wouldn't allow for accurate current measurement due to base current. So, I, again, replaced it with a small-signal pfet. And it worked, kinda. Look at the first plot where I do CV/CC switch at 20mA current. It looks very neat!But then I increased the current to 100mA things got ugly. Look at the second screenshot. The blue trace shows step output without any capacitors. There is like 1V overshoot, which is, imo, too much. The yellow plot shows output with 50nF output capacitor. Better, but still not purfect."What's going on here?" (c) Dave. I believe different output currents make the circuit operate at different operating points. I measured voltage at the gate of voltage regulating fet, and it changes noticeably with output current. With higher output current the CV-opamp has to swing more to maintain regulation (540mV@20mA, 1V@100mA). Not sure how I'm going to solve this.

author: xavier60
author_rank: Super Contributor
timestamp: September 26, 2023, 03:19:49 am
content: You are trying to build a fast PSU. I can't remember all the details. A few years ago, someone posted an off-site link to their Harrison style PSU project. The CV compensation didn't look right, seemed to be under compensated, so I breadboarded just the CV loop to find that it was surprisingly fast and stable. 1 or 2 microseconds load transient recovery, as far as I can remember.

author: xavier60
author_rank: Super Contributor
timestamp: September 26, 2023, 02:14:39 pm
content: I put the Harrison CV loop together again using a TL072, BD135 and TIP35C. I put a 33Ω in series with the Base of the BD135 to stop it from oscillating.I took a snap of the output response of the opamp when a 1A transient load was applied. It's quick.

author: exe
author_rank: Unknown
timestamp: September 26, 2023, 04:28:41 pm
content: Quote from: xavier60 on September 26, 2023, 03:19:49 amAh, probably this one, or similar threadhttps://www.eevblog.com/forum/beginners/how-does-blackdog_s-psu-work/. It's a good power supply indeed. There are one or two things that I tried to improve. One is current accuracy, Harrisson topology has problems with that as itsfloating CV opamp is an inverting amplifier, and it draws current from the output proportional to output voltage. I'm aiming of minimal output current of 1uA, so that doesn't work for me. Anyway, I tried to resolve that (say, buffering output with another opamp), but I wasn't able to design a power supply that would be fast forwide range of currents, even with switching shunts. Hence this project, a small power supply for low end of currents (say, 1uA-100mA) that would be an addition for Harrison-like for currents, say, above 10mA.Quote from: xavier60 on September 26, 2023, 02:14:39 pmIt is indeed. The tricky part is to make CC also quick, without much glitching when switching between CC and CV modes. For CC we need to add a shunt, which will reduce phase margin when there is an output capacitor. The bigger the shunt, the faster reaction time, but slower CV mode. Shunt topology, in theory, doesn't have this problem.Anyway, just in case, this project is more like an exploration. The only sensible objective I could think of is, when, say, a power supply drives an opamp beyond rails, it should be fast-enough not to burn ESD diodes.

author: exe
author_rank: Unknown
timestamp: September 26, 2023, 06:36:26 pm
content: Small video from me demonstrating the importance of low output capacitance:

author: xavier60
author_rank: Super Contributor
timestamp: September 27, 2023, 09:34:03 am
content: I went back to experimenting with my old design,https://www.eevblog.com/forum/beginners/lm324-power-supply-with-variable-voltage-and-current/msg3582664/#msg3582664I was able to make it go much faster, mainly by removing the TIP35C's, leaving the D45H11 as the output. I fitted a 1uF with series 4.7Ω across the output.D5 in the original design greatly speeds up the CC response to sudden output overloads. Might be a while before I add the CC loop and test.

author: iMo
author_rank: Super Contributor
timestamp: September 27, 2023, 10:20:42 am
content: Quote from: exe on September 26, 2023, 06:36:26 pmYep, so called "Red LED Test". I've just tried with a 15+y old HY1503 cheapo PSU, and my red led survives, no problem (18.7V/20mA set).. Btw, the output capacitor there is 470uF, in parallel with 1k resistor, afaik. The voltage on the led drops in aprox 25ms (from what I see on my scope). I will post the schematics for reference (I messed with it as it was broken, the schematics fits, the values of the pots are different in the real hw, not easy to follow the design with internally "grounded" positive output node, I had to do some sims in the LTspice to get how it works).. Almost the same as the above xavier60 has linked..

author: xavier60
author_rank: Super Contributor
timestamp: September 27, 2023, 11:17:47 am
content: Quote from: iMo on September 27, 2023, 10:20:42 amActually, your PSU is Harrison topology. I'm surprised that the red LED survives that discharge from 470uF.Ill do some tests on mine later. It's output cap is 47uF.

author: iMo
author_rank: Super Contributor
timestamp: September 27, 2023, 11:24:55 am
content: Quote from: xavier60 on September 27, 2023, 11:17:47 amI've been surprised too (done perhaps 100 firings)..

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 27, 2023, 11:29:13 am
content: D44H11 are nice transistors, one of the better, older and cheap yet still widely available, types. They're... not perforated/ring emitter, I think, butfinely interdigitatedat least. (Yay, citing @Noopy 's work in a post.) maybe some mfgs used the other structures too.Keep in mind that the circuit can only transition between CC and CV as fast as the control loop(s) can act. Which is less and less as you go up in frequency. Which means there must necessarily be a point where neither CC nor CV can truly control, and the output impedance trends towards some asymptotic default open-loop value -- determined by the output device(s) themselves. Which... asymptotic really isn't the right word for it, because the impedance up there can still be plenty weeble-wobbly; more to say that, the influence due to control decreases asymptotically, leaving whatever the impedance spectrum inherent in the structure is; which might be series inductance, collector capacitance, transconductance (including fT effect), etc.Since the control must start from such a point, then settle out over time, it stands to reason that the ideal output impedance is midway between the two, i.e. Z ~ Vmax/Imax. Sometimes it would be better higher or lower (depending on actual CC/CV settings and desired operating mode), but this is presumably the best median approximation for a general-purpose design. (Of course, if you know you're going to operate more often in some region of the V-I operating area, impedance can be optimized towards that direction; an LED supply for example might make such a compromise, uh... assuming one needed a super-fast LED supply, that is.)This might not mean much for, like, conventional output structures -- you're going to have an emitter follower and whatever else as usual, and that's just kind of that; but given some creativity, the output impedance of the level shifter / amplifier / follower can be tuned by joint combination of shunt (voltage) and series (current) feedback; speed (of the output stage itself) can also be optimized by distributing voltage and current gain between stages, rather than having all in one (volt amp) and the other (emitter follower). Granted, this tends to cost some bias current, and is more of an RF/wideband class A approach, but some class AB-ness can still be had from it and if you really need the speed, bias current is likely an agreeable compromise.Tim

author: xavier60
author_rank: Super Contributor
timestamp: September 27, 2023, 11:54:35 am
content: The old design I linked earlier and the modified version both have Hi-Z output stages as do Harrison topology.The tricky part is when an overload initially starts to pull down the output voltage, the currently active CV loop immediately begins to rapidly ramp up drive to the output, while the CC opamp is sitting there usually in some saturated state and gets caught off guard, needing time to discharge the compensation cap before it finally takes control of the output stage.D5 in the linked design allows the CC opamp to directly discharge the cap, greatly reducing the CV to CC transition time.Will it be quick enough to save a poor red LED is the question.

author: exe
author_rank: Unknown
timestamp: September 27, 2023, 06:57:24 pm
content: About LED test: I found that different LEDs have different overload capabilities. I've got some LEDs that are "indestructible", and I've got a back of cheap LEDs from aliexpress that are very sensitive. I'll try to make a video comparison if I find parts (most likely next week).Quote from: T3sl4co1l on September 27, 2023, 11:29:13 amI spent a lot of time trying to create something like that: hybrid feedback. But that's beyond my skills. Not even sure where to start. I tried to imagine a three-input opamp, but couldn't). I also tried to make something with TIA, also no success. So, now I'm experimenting with simple circuits.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 27, 2023, 08:16:35 pm
content: How about, y'know... not burning devices of unspecified burn rate?A large-ish MOSFET, optional series limiting resistor (consider that LEDs have pretty substantial internal resistance), and a 555 timer set for a low duty cycle, will get you identical conditions with respect to the power supply, but with repetitive trigger for the oscilloscope to read the voltage (and current via shunt resistor) during the transient.Tim

author: magic
author_rank: Super Contributor
timestamp: September 28, 2023, 06:23:01 am
content: I wonder if this could be done with a pair of OTAs. Lacking internal compensation, they ought to have very fast slew rate if biased generously. One could first diode-OR their outputs, and only then compensate the resulting output with some capacitance to ground or a bit of Miller across a common emitter power stage, or whatever.

author: xavier60
author_rank: Super Contributor
timestamp: September 28, 2023, 07:22:44 am
content: Quote from: magic on September 28, 2023, 06:23:01 amThat would be fast. A possible problem might be in finding a compensation that suits both loops. I find that the CV and CC loops need to be compensated differently.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 28, 2023, 09:57:49 am
content: Dual input stage OTA would be ideal, yes. You can also assign output clamping by simply placing diodes on the gain node (if you don't mind they're a bit inaccurate, being diodes), which isn't relevant here, but good when you need to set the output range of a controller generally speaking. LM13700 is the only extant and cheap example though, and is relatively slow (~3MHz GBW?) for what we're talking here. Convenient, but maybe not actually much of an improvement.Definitely worth testing and playing with though. Old bit of analog magic, they are!OTOH, voltage mode op-amps are cheap and abundant, and you could simply plop in a 100MHz part to significantly reduce slewing, even without the help of saturation-clamping diodes.Personally, where top precision isn't required, I've used something like this before,the discrete diff pair has low offset (at most 10s mV), and local compensation handles its gain relative to the op-amp it's controlling. The specific application was for voltage error amp in a current-mode control: the input +/- is reference and output voltages, and "Max" is the current reference; "Out" is the current setpoint for the current loop, which in turn runs PWM and a buck converter stage.The equivalent for present purposes would be a gm output stage (i.e. common emitter/source plus op-amp for stability and linearization) with this feeding it.Tim

author: magic
author_rank: Super Contributor
timestamp: September 28, 2023, 04:36:49 pm
content: AD829 looks like it might work as a poor man's fast OTA.There's no bias control, but that's not important for applications like here.

author: xavier60
author_rank: Super Contributor
timestamp: September 29, 2023, 10:13:17 am
content: This shows an idea I used in a 20A PSU. Q2 isolates the output of the CC opamp from the compensation cap C1. When the CC threshold is reached, the opamp's output can swing low at it's full slew rate until B-E of Q2 and the CC ORing diode D9 are forward biased. So at the same time of the CC opamp taking control of the output MOSFET, C1 becomes connected via Q2.To get a smooth CV to CC transition, C1 needs to be pre-charged to a voltage that suits the CC setting.I found no simple way to do this and finally used a crude PWM DAC from the PSU's microcontroller to set C1's voltage according to the CC setting.

author: iMo
author_rank: Super Contributor
timestamp: September 29, 2023, 10:37:05 am
content: I wonder whether somebody tried a PSU with for example the TDA2020 - that is basically an opamp +/-22V, 3.5A output, 20W, with two pins for controlling the output transistors (two internal "power and current limiting circuits").

author: xavier60
author_rank: Super Contributor
timestamp: September 29, 2023, 12:50:58 pm
content: Quote from: iMo on September 29, 2023, 10:37:05 amThat could be a quick way to make a 4 quadrant PSU if CC mode could be added.

author: iMo
author_rank: Super Contributor
timestamp: September 30, 2023, 11:00:48 am
content: Quote from: xavier60 on September 29, 2023, 12:50:58 pmLike this PSU playing music

author: xavier60
author_rank: Super Contributor
timestamp: September 30, 2023, 02:09:41 pm
content: I have combined my other two ideas into one idea for fast CC response limiting.While in CV mode, Q5 keeps the non-inverting input of the CC opamp switched to ground, shunting away negative feedback from the compensation cap C4.When the CC threshold is exceeded, the output of the CC opamp only sees the small capacitive loading of C4 so is able to slew down at close to it's full speed.Q2 senses when the CC loop is in control and turns off Q5 via Q4, allowing C4 to provide feedback for normal CC compensation.I took a photo of the CC opamp's output at the time the PSU's output was short circuited.

author: Zoli
author_rank: Frequent Contributor
timestamp: October 03, 2023, 03:59:24 am
content: I' playing around with simulations, with a radically different topology(sorry, no details yet). What can I recommend: use faster components; as example 2N5550, 2N5401 as control transistors, 2SCR586J as bypass transistor, OP37 as op-amp; all of them are part of LTspice standard distribution. Now about the pictures: first is is current limit set to 1.5A, the second current limit set to 3A; current sensing resistor 0.1Ω, reference 7V, output divider 360k/100k. Simulation command: .tran 0 4.5m 4.395m startup; load configuration: PULSE(1 2 4.4m 1u 1u 49u).

author: xavier60
author_rank: Super Contributor
timestamp: October 03, 2023, 05:10:49 am
content: Do you see an over-shoot across the CS resistor when the output is short circuited?

author: Zoli
author_rank: Frequent Contributor
timestamp: October 03, 2023, 05:32:02 am
content: Voltage over the CS resistor, current limit@1.5A; not nice, but does the job.Edit bonus: output voltage with 330µF/50mΩ capacitor.

author: xavier60
author_rank: Super Contributor
timestamp: October 04, 2023, 12:54:39 pm
content: This simpler version also has 3us of short circuit current overshoot.

author: Zoli
author_rank: Frequent Contributor
timestamp: October 04, 2023, 04:44:26 pm
content: Quote from: xavier60 on October 04, 2023, 12:54:39 pmOvershoot where? On the CS resistor, or on the load? To understand the importance of the question, see attachments:-Green: output load-Blue: current sensing resistorThe first(Load&CS_W_RC(1+4.7).png) has an RC snubber over the output, 1µF+4.7Ω, exactly like in your drawing; current within 10% the target(1.5A) shortly after the 70µs mark.The second(Load&CS_W_RC(082+22).png) RC snubber is 82nF+22Ω; current within 10% the target(1.5A) around the 15µs mark.The third(Load&CS_WO_RC.png)has no RC snubber over the output; current within 10% the target(1.5A) around the 12µs mark, but with ringing extending up to the 40µs mark.Note: the CS resistor is in series with the main supply, exactly like in your drawing; on my previous screenshots were in series with the load.It takes around 5µs1for the CC circuit to take over the bypass transistor control, that's the spike around the 11µs mark.Simulation command: .tran 0 4.5m 4.395m startup ; PULSE(1 2 4.4m 1u 1u 90u).Schematics: I intend to release it soon, in public domain; since is niche of the niche, not worth trying to monetize IMNHO, even if it would be patentable.15µs is the time required to discharge the compensation capacitors in the CV section.

author: xavier60
author_rank: Super Contributor
timestamp: October 04, 2023, 08:50:25 pm
content: I always measure across the CS resistor. I have also included the Base of Q1.I personally have no need for super fast CC limiting.This is the design of the mainly used PSU on my bench,https://www.eevblog.com/forum/beginners/lm324-power-supply-with-variable-voltage-and-current/msg3582664/#msg3582664

author: Zoli
author_rank: Frequent Contributor
timestamp: October 05, 2023, 12:59:34 am
content: I've posted my design:https://www.eevblog.com/forum/projects/voltage-regulator-in-current-feedback-topology/Pay a visit for some reading and comment.TIA,Zoli

author: luudee
author_rank: Frequent Contributor
timestamp: October 05, 2023, 02:47:21 am
content: I've been following this thread with great interest.Why not use an approach similar to high speed SERDES. They face the sameproblem, trying to turn the output on or off really fast.To avoid over and under shoots, the use a three stage driver:1. Pre Driver2. Main Driver3. Post DriverAll three are very fast, the Pre and Post are weak drivers.I wonder if you guys can adopt the same principle to this "fast PSU".Good Luck,rudi

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 05, 2023, 03:22:15 am
content: That's rather cryptic. Could you provide a little more information or background on that? Unqualified, "pre" "main" and "post" could be anything: any ratings, any connection. It's also not clear if it would be a specifically digital solution, or at all amenable to analog function. At the least, it doesn't sound like it needs to be reactive -- high speed digital signals transmit into controlled impedance and that's it, if the impedance is lumpy your signal is lumpy, end of story; whereas this circuit is intended to respond in a very specific way to different load conditions.Tim

author: luudee
author_rank: Frequent Contributor
timestamp: October 05, 2023, 04:02:18 am
content: Quote from: T3sl4co1l on October 05, 2023, 03:22:15 amHi Tim,yeah sorry, I know it is a bit cryptic, lol.Basically you have 3 drivers, first one and last one are "weak".To turn on a signal (drive to logical '1'), you first engage the pre-driver, then themain driver. The idea is that the pre-driver will charge up the line and preventovershoot.To turn off the signal, you disable the main driver and enable the post-driver,before disabling it as well. The idea here is to avoid undershoots.It's a little bit of both digital and analog, but then at 56Ghz, nothing is digital noranalog any longer, lolBest Regards,rudi

author: exe
author_rank: Unknown
timestamp: November 26, 2024, 09:45:36 am
content: Hello everyone!Some time ago I abandoned this circuit because I could not figure out how to do accurate current sensing. Last night it landed my mind that I can just do a normal series sensing (attaching pic). I didn't want to do this in the beginning because that would mean a second current source loop and yet another shunt resistor (the first one sources current to shunt regulator). But I think this may actually work. Here is the idea.1) The "main" current source set the "hard" limit on total current supply. It's fast, but not accurate. In case of overcurrent it engages first.2) The second current loop uses own shunt resistor to do precise adjustment of current. It controls the shunt regulator (not shown on the pic).Having two shunts is suboptimal, but I learned that I can drop like just 0.1-0.2V on each and still have a good speed and precision. If I keep the shunt on low side, I can accurately sense sub-mv drop.I have to go now, and I'll experiment more with the circuit later. Just wanted to share my idea with you guys).

author: exe
author_rank: Unknown
timestamp: January 25, 2025, 09:19:07 am
content: Hello everyone!I decided to finish this project. It was quite a bumpy ride. A lot ideas I tried and fail. I think one of the most challenging aspects was to define the specs. I think I finally set my mind. So, it's current source with precise voltage clamp. I've already built a TIA amplifier for low-current measurements and, while it's a cool small device, I really miss the adjustable voltage source for it. I kinda need the same functionality, but with voltage/current sources.So, desired specs:- Voltage range: 0.1v-12.5V (ideally down to zero)- Current: 10nA - 50mA+- Overshoot should be below 0.3V.- It should limit current within 2us at currents above 50mA.- The accuracy of set current is not important, I'm happy if it's within 1%.- Accuracy of current readback is important. I want to get a dynamic range of 100db from a single shunt. I believe this is possible, already achieved on this project: .- Voltage readback: within +-2mV absolute accuracy, but really not that important.I'm attaching the circuit I want to build. The two "tricks" I used are the following.- Put a small capacitor across measurement shunt. I can't believe I didn't do that before. It greatly helps with stabilizing voltage regulation, without, I believe, compromising other parameters too much. Even 1nF cap helps a lot- The voltage is clamped with a bjt in emitter-follower configuration (Q2 on schematic). It has to be set slightly above the set voltage so it doesn't normally conduct, but only dumps current on overshoot event.The clamping with a bjt is kinda "meh". It has to clamps as close to the output voltage as possible, but also not to affect accuracy of set current. That's not possible to achieve for all ranges of currents. So, in the real circuit I make the clamping voltage configurable, the user can select tradeoff between overshoot voltage and how precise the output current is set (NB this doesn't affect current reading precision).There are other issues with this circuit. One is stability. I think without clamping with Q2 it starts oscillating for some values of output capacitance. So, compensation might need to be adjusted, I left some provisions for that on the pcb.Also, implementing "floating" reference voltage V28 adds some circuitry. In the real circuit I implement it with instrumentation amplifier (ad8227) with buffered reference pin. What I don't like is that most inamps cannot work with the voltage headroom I have. AD8227 is pretty much the only device I could find that would fit the circuit.To be continued... Measures from <0.1pA to 32nA+ on single 100M shunt:https://www.eevblog.com/forum/projects/yet-another-picoammeter/msg5498422

author: exe
author_rank: Unknown
timestamp: January 26, 2025, 09:12:19 am
content: About AD8034. I chose it because I need a fast rail-to-rail part. And there is a big catch about this specific part. While AD advertises it as "1pA jfet-input R-R amplifier", look what happens when you approach the positive rail. The input bias jumps from a few pA to over 30uA, a factor 30_000_000. I wouldn't call this a rail-to-rail amplifier in my book.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 26, 2025, 05:03:29 pm
content: It is a bit odd conbination of having a JFET and BJT mixex input stage, but at least they clearly show it in the data sheet.It is quite common that RR amplifiers have a cross over region somewhat some 1 V from the supply limit, where they behave not that well. For demanding used this input cross over region may not be acceptable. So RR input is often to be taken with a grain of salt.There are a few exceptions though (e.g. OPA388) that have an internal charge pump and hinger supplyto get away with a single input stage. For low speed may AZ amplifier can also be OK, as the switched part is often working over the whole range.

author: exe
author_rank: Unknown
timestamp: January 27, 2025, 01:06:37 pm
content: Folks, I think I found a critical flaw in the design. Kinda.So, when circuit switch to CC mode, the shunt transistor gets reverse-biased, Vbe voltage. That's because it's an emitter follower output, and when output drops, voltage on the base goes above emitter voltage. So, Q2 and Q7 might get damaged.That's a fatal flaw.Let me know if you have ideas how to fix this. May be there are special bjts that can handle higher Vbe voltage, or some schematic improvements?Anyway, I did some quick-n-dirty experiments with four transistors I had at hand. Here are rough break-down voltages of base-emittor junction:- MPSA92 foschan -- 11.4V- MPSA92 semtech -- 11.4V- KSB772YS (I believe onsemi) -- 9.4V- Tip2955 onsemi -- 12.4VSo... I could use TIP2955 to clamp the source current... but it's huge... Also, only rated for 7V Veb, but I'm fine to push it up to, say 11V in my home lab power supply)PS found 2N2946A in metal can that can survive 32V. And it's only 15bucks/piece, yeah)

author: magic
author_rank: Super Contributor
timestamp: January 27, 2025, 03:20:04 pm
content: You mean that some opamp reverse biases the BE junction of an emitter follower?I suppose you could add a diode in series with the base. Or clamp base voltage with another emitter follower hanging off the emitter - opamps don't source much current.

author: exe
author_rank: Unknown
timestamp: January 28, 2025, 10:23:07 am
content: Thanks for suggestions. I think they still require some research. With diode in series with base I see two potential problems:- it should be a very low-leakage diode, less than the leakage of b-e junction, or it won't divide voltage properly. It's the same issue as with a string of diodes connected to high voltage.- opamp won't be able to "push" current into the base. This can potentially reduce performance due to storage charge, I think.But this could be viable, I'll simulate the circuit.Clamping voltage with emitter follower... Hm, interesting, I'll try that too. On schematic, U3 provides a low-impedance "copy" output voltage. It can also clamp it.

author: Zero999
author_rank: Super Contributor
timestamp: January 29, 2025, 10:02:16 am
content: I've just found a controller IC which might be suit this application, the MP26085.https://www.monolithicpower.cn/cn/documentview/productdocument/index/version/2/document_type/Datasheet/lang/en/sku/MP26085/It's only rated to 20V, but you should be able to add a transistor to the output, forming a cascode with the internal transistors.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: January 30, 2025, 12:19:52 am
content: Quote from: exe on January 27, 2025, 01:06:37 pmYou should be able to easily clamp the opamp drive with either a diode or an emitter follower, or you could use a PMOS as the clamp device.There are BJT designed for audio muting that have higher VBEO, but I've only seen those in NPN.They also typically have high gain in both directions.eg 2SD2114, 2SC3326, 2SD2351

author: exe
author_rank: Unknown
timestamp: January 30, 2025, 09:38:42 pm
content: Yeah, I also found muting bjts and I have 2SC3326.BTW, I measured beta of BC549C (onsemi). So, initial beta was 601 (according to transistor tester). After about two minutes of passing ~10mA of reverse base current iit dropped to 477. Then after a few minutes of 40mA it dropped to 453. Heating with hotair at ~250C (don't really know how accurate is the temperature) for about 20 seconds, it started to smell plastic). Anyway, after heat treatment beta recovered to 547, and Vbe raise by 10mV, to 653mV. I let the transistor to cool down before taking measurements.I decided to further abuse bjt, and passed 40mA for about an hour. So, beta right now 438. But there is a slight temperature variation in the room, so all those numbers are not very accurate. Like, heating the bjt with my fingers raised beta to 467, for example.I didn't do leakage measurements due to a busy schedule. But I plan to do it, at least a quick one.There was a tread on the forum about B-E breakdown, but I wasn't able to find it, so posting my findings here.

author: exe
author_rank: Unknown
timestamp: February 08, 2025, 07:19:51 pm
content: I did a few more measurements. I measured leakage current of B-E junction of new bc549c vs the one I already tortured in the previous tests.It's hard for me to measure down to picamps, so take the results with a grain of salt.- abused bjt (device #1): ~5-7pA leakage current, measured by this device:https://www.eevblog.com/forum/projects/yet-another-picoammeter/msg5707001/#msg5707001. There is 4-5pA offset, and device showed 10pA when connected in series with 3.3V cr2032 battery. The other device I used for measurements is nanoranger (https://www.eevblog.com/forum/testgear/nanoranger-8-5-decade-ammeter-micro-review/msg5421981/), it showed 26pA average reading, and it seems it has 19pA offset reading with leads disconnected. So, 26pA-19pA=7pA.- brand new bc549 (device #2): nothing. I can't reliably read its leakage current at 3.3V reverse bias.- same new bjt, after 5 mins of reverse 10mA current (Veb 9V): beta dropped from 540 to 440. Reverse current: 6pA.- Collector-emitter leakage current, at 3.3V bias, base is left unconnected: below what I can reliably measure for both devices.PS temperature in the lab is 19C.