Disclaimer: I'm trying to learn about circuits on my own. I'm reading as much as possible to avoid any basic mistakes, but if there's any, please point it out and I'll investigate further in that direction! Sometimes the problem is not lack of interest, but not knowing what you don't know (if that makes any sense). :-)

I want to build an Ammeter circuit to measure currents with an Arduino. But before I do that, I was planning to build my own current sink, in order to be able to connect it to my regulated power source and be able to draw currents to verify the measurements.

Since I have many LM358Ns, I figured I could try to reproduce the "High Compliance Current Sink" from page 18 in this datasheet.

The maximum current that I want to sink is 100mA.

I've designed a prototype and simulated connecting a 5V power source:

enter image description here

The current values in Cload1 and 2 seem to be perfectly aligned with the voltage in Vreg1 and 2.

I have a few questions though:

  • I've split the circuit in two different LM358Ns because I believe the 2n2222s are dissipating 250mW each (5V, 0.05A). Is this correct?
  • Is it ok to use a single POT like I'm using for both LM358Ns?

And last but not least: let me know if there's any improvement, or anything else that's obviously wrong with either the theory or my implementation of it!



At 5V you should probably be OK. But who knows what the safe operating area is for those transistors... Why not use a 2n3055 after the 2n2222? Then the 2n3055 will never fail at least up to 10V and 2A. Also, be very careful if you replace the transistor with a mosfet in any electronic load. Check the DC SOA curve of the mosfet. [At 10V and 200mA, probably even a BD139 will be fine, and has a hole to attach a heatsink.] Make sure it is in a darlington configuration with the 2n2222, so base current (op amp output) is minimal and will not throw off readings.

As for your question, LM358 has a fairly high offset voltage. Additionally, load resistors will not be matched. So the op amps will settle at different voltages across the resistors. Meaning, different currents through the transistors. Should probably not cause a thermal runaway (as long as transistor SOA is maintained at DC). But, probably better to use a single op amp if you want any reliability between readings and linearity (i.e. single op amp driving 2 transistors, each with its own separate load resistor at emitter).

Why is it a problem? Probably not a problem if an ammeter is permanently attached to collector. Although, it will never be as accurate as placing ammeter at emitter, due to base current coming from op amp. Also, the components will have different temperature characteristics, so results may not be repeatable with respect to the position of the reference pot wiper position. Also, it is mighty inconvenient if you just want to measure voltage at the load resistor and calculate current, since there are two of them.

Since the circuit aims to calculate microcontroller current, I'm guessing accuracy is a requirement, if not at uA range, then at least in 0-5mA range. Probably best to use a TIP122, or a really suitable mosfet rated for linear use. If the circuit is never ever operated at voltages above 10V, an IRFZ44N might be fine up to 1A See my question here. Since no gate current flows into the source, this will give most accurate result.

PS: also, your schematic shows the LM358 running from the same supply. I'm assuming you have a separate regulated source for the LM358 and reference pot.... i.e. they are not connected to the transistor collectors which should be at the power supply under test.

  • 1
    \$\begingroup\$ Like I said above, check the DC SOA curve. Also see the link to my question. The important thing is that if the mosfet is fried, there may not be much resistance between drain and gate, so the rest of the circuit, op amps etc, may get fried too. This is more likely with a mosfet, and less with a BJT. I am not discouraging use of a mosfet. Mosfet will give the most accurate result. \$\endgroup\$ – Indraneel Aug 23 '18 at 5:54
  • 1
    \$\begingroup\$ mosfet has to be rated for linear use Show us an example of such a MOSFET. My bet: you can't because these don't exist. Except for RF MOSFETs basically all discrete MOSFETs are intended for switching applications (low Rdson). But even a MOSFET for switching can be used in a linear circuit, I know because I have done so myself. As long as Rdson can be controlled by Vgs, the MOSFET will work as a linear device. Even if the relation Rdson(Vgs) isn't linear that doesn't matter, the opamp can still control the MOSFET and therefore the current. \$\endgroup\$ – Bimpelrekkie Aug 23 '18 at 6:59
  • 3
    \$\begingroup\$ Please see this link first: electronics.stackexchange.com/questions/361407/… Also this link for LINEAR POWER MOSFETS WITH EXTENDED FBSOAS ixapps.ixys.com/family.aspx?i=5 and also ixapps.ixys.com/family.aspx?i=54 and ixapps.ixys.com/family.aspx?i=56 \$\endgroup\$ – Indraneel Aug 23 '18 at 7:01
  • 1
    \$\begingroup\$ I suggest actually testing out what you say, instead of quoting theory from the datasheet. Please read the link I have posted. The IRFZ44N will be destroyed at only 500mA at 40V DC. Other common mosfets may not fare that well. I do agree that for the intended operation in this question (5V 100mA), the IRFZ44N will work fine. \$\endgroup\$ – Indraneel Aug 23 '18 at 7:11
  • 1
    \$\begingroup\$ Switching is a mosfet's claim to fame. But larger dies (less mosfets per die, as in planar) common in old mosfets will handle linear operation better. Please see the IXYS links I posted above. \$\endgroup\$ – Indraneel Aug 23 '18 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.