Designing a simple voltage-controlled high current source - Page 1
Forum section: electronics / beginners

author: DanInvents
author_rank: Contributor
timestamp: March 03, 2023, 05:08:42 pm
content: Hi! I'm thinking about how to design a voltage-controlled current source capable of sinking 1A of current.In the sketch a non-inverting amplifier (gain of 20) provides feedback to an op.amp configured as a comparator. The comparator is triggered by a microcontroller pin. I'm thinking about using a dual op.amp for the job to reduce the number of components.Would this design work? I have found a similar design from analog devices where they use an integrator as the control amplifier but I want to keep the design as simple as possible.Any feedback is appreciated!

author: MasterT
author_rank: Frequent Contributor
timestamp: March 03, 2023, 05:26:36 pm
content: Instead of amplifying voltage out of current sensor, it 'd be easier just to divide V-in by 20. No second OPA necessary

author: ledtester
author_rank: Super Contributor
timestamp: March 03, 2023, 05:27:20 pm
content: What op-amp and MOSFET are you planning to use?Most DIY electronic loads I've seen follow the design shown in this EEVblog video:EEVblog #102 - DIY Constant Current Dummy Load for Power Supply and Battery Testinghttps://youtu.be/8xX2SVcItOAOne thing the video doesn't mention, unfortunately, is the need for a compensation capacitor between the op-amp output and inverting input to quell oscillations.There are a lot of electronic load projects discussed on the forum, e.g.:https://www.eevblog.com/forum/projects/yet-another-diy-electronic-load/A lot of the discussion is devoted to the choice of MOSFET.

author: DanInvents
author_rank: Contributor
timestamp: March 03, 2023, 06:28:12 pm
content: Thank you for your quick reply! I have checked the video that you shared with me and indeed, what I want to do is similar.The N-MOSFET that I have in mind is the AO3400A (datasheet attached). For the application that I have in mind, I would need 2A of current for a few seconds and the low Rds ON of this FET makes it ideal for this purpose. As you mentioned earlier it might be necessary to add a compensation capacitor to prevent op.amp oscillations when driving the gate capacitance. This is why I have also considered using a npn or darlington transistor.About the op.amp selection I thought about a LM358 because it features high output drive, and it is inexpensive. For this application however a precision rail-to-rail op.amp might be better.On other topics, I have now also attached the application note from Analog Devices and figure 5 is the one I mentioned earlier. I can't understand why there is a 10M resistor connected to the non-inverting input of the control op.amp and why there is a 15k resistor at the non-inverting input of the feedback op.amp. In any case I will run some simulations to check how the design performs.Thank you for your feedback!

author: Terry Bites
author_rank: Super Contributor
timestamp: March 03, 2023, 06:30:46 pm
content: I know the circuit your thinking of. Its not an integrator as such, just bandwidth limited error amplifier.You're calling your error amplifier a comparator I think?You only need one opamp for a current sink. Choose your MOSFET to suit your current requirements.If you want single supply operation, the opamp needs to be able to operate with its inputs near 0V; so rail to rail input.Watch out for power dissipation in the MOSFET.Note that the sink won't have any compliance below Vgs(th). The lower limit is about Vgs(th)+ Io*RsenseYou can do better with a bipolar transistor but the baase current error can be a problem.

author: DanInvents
author_rank: Contributor
timestamp: March 03, 2023, 06:34:59 pm
content: Hi!Thank you for your reply. You could divide the input voltage by 20 and feed the control signal and the reference signal to a control op.amp that would drive the gate of the MOSFET. However, in that case you would be working with voltage levels in the range of 100 mV and I suppose that you would need precision op.amps. I also wonder how critical noise would be.

author: DanInvents
author_rank: Contributor
timestamp: March 03, 2023, 06:41:48 pm
content: Hi Terry!The idea is that this circuit will be inside a rocket to fire pyrotechnic igniters, this is why it should provide high-current for a few seconds. Therefore, I would prefer to use a resistor about 100 mOhms to reduce power dissipation. I'm worried that if I have too much power dissipation in the resistor the solder will melt and it will come loose under acceleration.The downside of using 100 mOhms is that 1A would produce 100 mV. Therefore, it would be beneficial to amplify that signal to make it easier to work with. However, I suppose that with careful design operating with 100 mV would not be a problem.

author: MasterT
author_rank: Frequent Contributor
timestamp: March 03, 2023, 06:51:38 pm
content: Quote from: DanInvents on March 03, 2023, 06:34:59 pmOffset voltage & noise requirements in case of voltage divider /20 is Exactly the same as requirements to amplifying x20 OPA you have in the initial circuits. The only question where to put divider to minimize interference injected directly into the control line, and cirtanly divider has to be right in front of the first op amp, not on the other end

author: Zero999
author_rank: Super Contributor
timestamp: March 03, 2023, 07:33:03 pm
content: Why not use a BJT? It's far more stable, compared to a MOSFET.

author: DanInvents
author_rank: Contributor
timestamp: March 03, 2023, 07:52:07 pm
content: That is an excellent point Zero999! For a given package size MOSFETs can handle more current than BJTs. This being said, I agree with you that a BJT solution would be more stable and predictable. Perhaps I could use a large BJT package or multiple BJTs with ballasting resistors.

author: Zero999
author_rank: Super Contributor
timestamp: March 03, 2023, 08:27:23 pm
content: Quote from: DanInvents on March 03, 2023, 07:52:07 pmThat's only when fully switched on. The maximum power dissipation will be comparable, because it's limited by temperature rise. Your AO3400A will fry with more than 1V or so across it, with 1A flowing through it.There are only two other advantages with a MOSFET: no drive current and not subject to secondary breakdown. The lack of drive current is good, but the gate has a huge capacitance, which as you know, makes it difficult to stabilise. The lack of secondary breakdown is only relevant to high voltage applications, above 30V.If you're not using both of the op-amps in the LM358, they can be connected in parallel to increase the drive to the BJT.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 03, 2023, 08:31:24 pm
content: The OP's schematic should work, I've done similar stuff. But beware of stability. Depending on the opamp and MOSFET, it can oscillate.Taming it with a capacitor as shown in an above schematic is often required. Also, do not use overly fast opamps.

author: Zero999
author_rank: Super Contributor
timestamp: March 03, 2023, 08:37:54 pm
content: Looking at the circuit again: why use two op-amps in the same loop like that? It's asking for trouble! Put a potential divider on Vin. If Vin is high impedance, simply add a buffer.

author: Benta
author_rank: Super Contributor
timestamp: March 03, 2023, 08:42:45 pm
content: Looking at the OP's original circuit mkaes my hair stand on end.opamp + opamp + MOSFET in a loop like that is more likely to turn into a very high power oscillator than a current source (sink).In short: I don't like it, and it has to be very carefully analyzed for stability.

author: shapirus
author_rank: Super Contributor
timestamp: March 03, 2023, 08:58:25 pm
content: Quote from: Benta on March 03, 2023, 08:42:45 pmThey will oscillate almost certainly. However, a capacitor between the output of the op amp that's driving the gate and its inverting input is quite likely to suppress the oscillation. I've had practical experience with a similar arrangement, and that's on a solderless breadboard. Even so, the capacitor worked.p.s. for just 1A, I would go with a BJT. There's a lot of transistors which will easily handle it, provided that heat sinking is sufficient, and if the transistor isn't too large (think TO-126 package with a typical max current 2-4A), its DC gain at 1A is going to be high enough for the op amp to be able to provide a sufficient base current to drive it.

author: DanInvents
author_rank: Contributor
timestamp: March 03, 2023, 09:16:27 pm
content: Thank you all for your insightful comments! I have certainly learned a lot from this post

author: Terry Bites
author_rank: Super Contributor
timestamp: March 03, 2023, 09:18:11 pm
content: Do you really need a constant current sink to set off pyros?A capacitor, a thyristor and a current limiting resistor might just do it, no?I'm guessing that you only need the peak current for a short time.

author: shapirus
author_rank: Super Contributor
timestamp: March 03, 2023, 09:20:40 pm
content: btw, have astrologists announced a week of dummy loads? I am making myself one too (and very surprisingly for myself, it's for a specific practical application).There have been a few more related topics that I noticed here lately.

author: ledtester
author_rank: Super Contributor
timestamp: March 03, 2023, 11:01:46 pm
content: Quote from: shapirus on March 03, 2023, 09:20:40 pmDummy load and linear power supply design are perennial topics on this forum.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 04, 2023, 11:32:39 am
content: Written by dummies who can’t write for dummies who can’t read. What a load!