How to measure low current accurately with protection?  - Page 1
Forum section: electronics / testgear

author: shamooooot
author_rank: Regular Contributor
timestamp: January 09, 2025, 05:46:16 pm
content: Hello guysI would like to design a current meter to be able to measure current in two ranges: ±199.9uA and ±1.999A with ±0.5% or better accuracy. And preferably capable of AC and DC measurements similar to the μCurrent gold. With external ADC like ADS1115 and Atmega2560.Unfortunately, the μCurrent gold doesn't have a protection mechanism.I think it would be hard to employ any single-same circuit for both ranges, and each range should have its own separate circuit.Would it be a good idea to protect the circuit with clamping diodes in case the current mistakenly reached 2A or so?.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 11, 2025, 07:18:52 am
content: If it is no possible to use the μCurrent gold, how about using current sense amplifier such as AD8418 or an instrumentation amplifier such as AD8428?, if so how do I protect them of several amps overcurrent?https://www.analog.com/media/en/technical-documentation/data-sheets/ad8418.pdfhttps://www.analog.com/media/en/technical-documentation/data-sheets/AD8428.pdf

author: Gyro
author_rank: Super Contributor
timestamp: January 11, 2025, 11:16:28 am
content: Yes, one of the weaknesses of the μCurrent gold that it doesn't include any input protection.If you are aiming for the same mode of operation, i.e. floating and battery powered, then you can probably apply your protection to input terminals. It is fairly easy with a voltage source and DMM to characterize a pair of inverse parallel diodes for leakage current. If you're shooting for a lowest range of 199.9uA, many diodes will have leakage currents low enough to meet your requirements at the few mV involved. This has the advantage of protecting the (possibly more valuable) shunt resistors as well as the opamp.P.S. I found ceramic BYV27-50 diodes were good on leakage when going through the limited range of parts in my drawer. Presumably the higher voltage variants might be better still...https://www.eevblog.com/forum/testgear/my-shunt-collection-(ucurrent-passive)

author: nctnico
author_rank: Super Contributor
timestamp: January 11, 2025, 12:20:51 pm
content: First of all: Do not try and clamp overvoltage into the power rails. It won't work as regulators are single quadrant devices (source only) so an overvoltage situation could potentially lift the power rails up high enough to kill the entire board.The standard method for protecting against overvoltage from a current shunt is to put diodes anti-parallel across the shunt. These will conduct when the current gets too high. For your amplifier circuit you can use a TVS diode or put some capacitance across the input (like 1nf) to protect against ESD.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 11, 2025, 02:05:03 pm
content: Thank you very very much Gyro and nctnico..I actually would power the circuit from from a 5V linear power supply.So if I understood right it isn't a hard job to do as long as I choose the right diodes, here is the schematic updated:I actually don't know how to pick the diodes though:Can handle 2A range continuouslyLeakage current low enough to not significantly affect the 199.9µA measurementshow about the forward voltage drop?How about the SK210:https://diotec.com/request/datasheet/sk22.pdf

author: magic
author_rank: Super Contributor
timestamp: January 11, 2025, 03:25:40 pm
content: Use a fuse to protect 10Ω from overcurrent.Use nothing to protect 10kΩ unless you expect crazy high input voltage.Add another 10kΩ between the shunts and ICs to protect the latter.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 11, 2025, 04:41:55 pm
content: Thank you for your reply.What type and value of fuse do you suggest?

author: Gyro
author_rank: Super Contributor
timestamp: January 11, 2025, 05:41:16 pm
content: Quote from: shamooooot on January 11, 2025, 02:05:03 pmThe SK210 is a Schottky rectifier diode. Anything Schottky will have high forward and reverse leakage so is unsuitable. You need a standard Silicon rectifier diode. As I mentioned in my post above, I found that Vishay round SinterGlass packaged BYV27s worked best out of the parts I had available (<1nA @200mV). These are obviously through hole parts and I chose by selection (I forgot to ask if this was a one-off project or whether you are building volume). For SMD you need to look for similar spec to have a good chance.The datasheet won't be very helpful for using a 2A rectifier in this application. The manufacturers won't be testing for leakage down at a few mV forward or reverse, so you are reliant on your own testing (hence my question about volume). I suspect that most standard Silicon diodes will work for you, with a 10R shunt. In my application, my highest shunt resistor was 1k, so much more susceptible to parallel diode leakage.Forward voltage drop of a Silicon rectifier diode is about 1V at rated current, so with a 10R shunt resistor, the maximum dissipation in overload will only be ~100mW.

author: nctnico
author_rank: Super Contributor
timestamp: January 11, 2025, 05:50:39 pm
content: Quote from: magic on January 11, 2025, 03:25:40 pmI don't think that is a good idea due to the noise the resistor adds. R12 seems to have a protection function. Keep in mind that chips have input protection circuitry inside. With a decent amount of series resistance (like 270 Ohm) this will provide a reasonable input protection.

author: magic
author_rank: Super Contributor
timestamp: January 11, 2025, 06:10:42 pm
content: 10kΩ with no current through it should be less noisy than MAX4239 itself. But whatever, you can make the resistor lower if necessary, the point is exactly to have some series resistance so that the chip's own clamping diodes suffice.Quote from: shamooooot on January 11, 2025, 04:41:55 pmOne rated to withstand whatever fault conditions you want to protect from

author: tggzzz
author_rank: Super Contributor
timestamp: January 11, 2025, 06:14:44 pm
content: TAoE X-chapters section 4x.16 Design by the Masters: Bulletproof Input ProtectionThat describes the input protection for the classic Agilent 34401A, including a schematic of the relevant bits. Recommended.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: January 11, 2025, 07:36:48 pm
content: Fuse protection of the 10 ohm resistor is challenging. Fuses have a very noticeable resistance. They have to if they are going to heat up and melt on overcurrent. The attached chart shows fuse resistance vs current rating for several common types as derived from the measurements in the pdf file pulled from the internet. While I make no assertions about the accuracy of the values, they are consistent with my observations.A fuse with resistance small enough to not materially affect the 0.05% tolerance you are selecting will be rated at dozens of amps. It may protect your dwelling but it won't protect the resistor. You may be able to measure your fuse and include it in your meter calibration, but there will be little or no warranty on the tempco of the fuse.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 11, 2025, 08:31:42 pm
content: Quote from: Gyro on January 11, 2025, 05:41:16 pmThank you again Chris, I actually would build like 2 or 3 of them for now, and I would prefer an SMD, but to be safe and because you actually tested it I would just go with the BYV27.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 11, 2025, 08:33:40 pm
content: Quote from: tggzzz on January 11, 2025, 06:14:44 pmThank you, I took a peek at it and that looked intimidating for me..

author: tggzzz
author_rank: Super Contributor
timestamp: January 11, 2025, 08:38:20 pm
content: Quote from: shamooooot on January 11, 2025, 08:33:40 pmYou probably don't need all the protection mechanisms

author: magic
author_rank: Super Contributor
timestamp: January 11, 2025, 08:53:20 pm
content: Quote from: CatalinaWOW on January 11, 2025, 07:36:48 pmWhat do you mean by "materially affecting the 0.05% tolerance of the resistor"? Of course voltage drop is to be measured across the sense resistor(s) only, any fuse is external to that and only increases burden voltage a little. The fuse basically goes in series with the rest of the ammeter.DMMs have fuses on their current inputs and they work.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 16, 2025, 07:20:15 pm
content: Hello againAs the uCurrent gold produces -ve and +ve according to the direction of current I actually forgot to ask how to address this to use it's output with the ADS1115..How about a circuit like the attached?, or could there be better suggestions?Thanks

author: Kean
author_rank: Unknown
timestamp: January 17, 2025, 03:18:45 am
content: Quote from: shamooooot on January 16, 2025, 07:20:15 pmIt only goes negative if referenced to the virtual ground. If you power the ADS1115 from the same supply (e.g. V+ to 5V and V- to GND), then you can feed the uCurrent circuit outputs into two ADS1115 inputs and do a differential measurement. Just keep in mind the ADS1115 supply max of 5.5V.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 17, 2025, 05:48:03 am
content: Quote from: Kean on January 17, 2025, 03:18:45 amThank you very much.So is it like the updated circuit attached?. I don't' know why the simulation with the LTspice doesn't give the expected result..

author: Kean
author_rank: Unknown
timestamp: January 17, 2025, 06:08:25 am
content: You seem to be missing the opamp to generate virtual ground at 2.5V

author: shamooooot
author_rank: Regular Contributor
timestamp: January 17, 2025, 08:34:59 am
content: Quote from: Kean on January 17, 2025, 06:08:25 amThank you again., apparently I misunderstood your previous reply, and I also think I don't understand how the µCurrent actually works.I am having troubles simulating it, and I would like to ask if it does output a negative voltage with reference to the ground when the current flows in the reverse direction? or the 2.5V offset makes the output 2.5V to 0 for reverse current, and 2.5V to 5V for forward?.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 17, 2025, 09:03:59 am
content: The fuse for overcurrent protection is not in the path where the voltage is measured. So the fuse resistance is not effecting the accuracy. The fuse resistance only effects the burden voltage seen externally.For a 2 A max range one would usually need something like 0.02 ohm for the lowest shunt. With a gap to 10 ohm as the next larger shunt the diode protection is no longer that critical, as 10 ohm have no issue withstanding some 1.5 or 2 V as drop over 2 diodes in series. With 2 diodes in series one pair can be bootstrapped, so that the other pair sees only a small voltage in the mV range. This is the slightly intimidating (but not expensive or large) part in the high end meters. For the not so small currents this should not be really needed here.AFAIR the range switching in the µCurrent is so that the shunts are separate and not in series (this is to get accurate 1:1000 ratios). With an ADC directly behind, one could have the shunts in series (like done with most meters) and this way simplify the switching a little, by only switching the current, not the path for the voltage reading.The virtual ground at 2.5 V allows the circuit to also work with negative voltages relative to the virtual ground. The output and signal to the ADC is also towards the virtual ground. It is a bit like having a +-2.5 V supply instead of the 0 / 5 V.

author: Kean
author_rank: Unknown
timestamp: January 17, 2025, 03:20:01 pm
content: Yes, the virtual ground generates a 2.5V offset, which is used as the output negative terminal. This is possible as the battery power is otherwise isolated.If you leave the virtual ground there (it is needed to work) but measure from power supply ground, then the output positive terminal will vary from 0V to 5V, which is the same as -2.5 to +2.5 relative to the virtual ground.Of course the virtual ground is not exactly 2.5V, or even half the power supply voltage, due to tolerance of components. But by using the ADC to measure both the positive and negative outputs, you can calculate the difference. And these ADCs have a mode that does exactly that.Note that many people get confused by the ADC datasheets thinking that these can measure negative voltages with respect to the supply. Although there are some ADCs that actually can do that (they usually also have a negative power supply), that is not the case here. They can just measure a negative differential reading. All the inputs must still be within the 0 to 5V bounds.Hope that helps clear things up. Maybe take some time to look over the ADC datasheet and app notes, and also go back and read Daves original article describing how the uCurrent works. He also did a video or two on it.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 17, 2025, 08:23:18 pm
content: I appreciate all the great help guys, I've drawn the circuit, and I’m hoping to get the PCB done soon as well.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 17, 2025, 10:24:35 pm
content: The resistor R50 is take from the µCurrent, but it is kind of at the wrong place. The point is to isolate capacitive load and for thus the resistor should be outside the loop.There are 2 shunt resistors shown in parallel. For 3 ranges one would still need range switching of some kind and the shunts not directly in parallel.If one only wants to send the signal to the ADC, there is no need for super accurate resistor values. One can apply a numerical calibration factor anyway.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 18, 2025, 02:02:27 pm
content: Quote from: Kleinstein on January 17, 2025, 10:24:35 pmThank you so much for your great help Kleinstein.The 270-ohm is out of the loop now, but I don't really understand the second point about the shunt resistors. I am looking only to measure currents with hundreds of uA range, isn't the 10ohm shunt enough?.Also, for using with the ADC, can you advise me what would be a good tolerance for the resistors to get better than 0.3% accuracy of the adapter for let's say 200uA range?.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 18, 2025, 02:38:38 pm
content: Usually a suitable burden voltage or drop at the shunt is on the order of 100 mV, a little less with high current and maybe more with low current. So for a 200 µA range a suitable shunt would be around 500 ohm. For the mentioned 2 A range it would be more like 0.05 ohm.A 10 Ohm resistor is a bit on the low side to measure 200 µA with good resolution - it may just boarderline work but it unnecessary difficult as the voltages get really small.For the solution with the ADC the question is if one needs good accuracy out of the box, or can do a calibration step and numerical scale factor to adjust. For the 200 µA range this may still work, as accurate resistors of some 500 Ohm are relatively easy to get. For a 2A range this gets tricky, as 0.1 or 0.05 ohm resistors are rarely that accurate - if at all as 4 wire resistors.To get an accurate value from the start, one has errors from the shunt, the gain stage(s), the ADC and the voltage reference. The sum (one could argue about geometric sum) of the tolerances would have to be smaller than the target accuracy. Especially for the 2 A range there can also be quite some self heating effect at the shunt.The ADS1115 with internal reference already has 0.15% initial accuracy and 0.05% for the long term drift. This may not even include the effect of soldering the part. So getting 0.3% accuracy without a calibration step is challanging - at least a check should be done.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 18, 2025, 03:16:40 pm
content: Quote from: Kleinstein on January 18, 2025, 02:38:38 pmThank you for enlightening me, I have made some adjustments as advised with 200ohm resistor (to make the range 500uA). I also removed the 10K parallel with the shunt resistor..

author: OLderDan
author_rank: Regular Contributor
timestamp: January 19, 2025, 12:41:58 am
content: i too found myself with a tape measure, trying to determine the size of the currant i noticed on the floor near the bed while i was engaged safely yet carnally with my partner... oh, current... sorry.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 19, 2025, 04:58:42 am
content: Quote from: OLderDan on January 19, 2025, 12:41:58 amWell, good thing you didn’t try to measure the voltage of that currant

author: Kleinstein
author_rank: Super Contributor
timestamp: January 19, 2025, 09:35:20 am
content: The ADS1115 is not very fast and for the path to the ADC one would not need a high bandwidth for the amplifier. The µCurrent has a relatively high bandwidth because it is also meant to be used with a scope - actually more the main use as DMM can usually measure current on there own.With no more need for high BW one can get away with a 1 stage amplifier. So only 1 AZ OP-amp and only 1 pair of precision resistors for the gain.It looks like the higher 2 A current range was droped from the plan.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 19, 2025, 10:05:22 am
content: Quote from: Kleinstein on January 19, 2025, 09:35:20 amThank you so much for your help and great explanation!. I’d like to test the suggested circuit to get a better understanding, would you say it will be good enough as attached to get an accuracy better than ±0.3% over the ±500uA range?.And yes, you’re correct—the 2A range was dropped. For now, I’ll set it up for 500uA to test..

author: Kleinstein
author_rank: Super Contributor
timestamp: January 19, 2025, 10:25:03 am
content: With 0.1 % resistors one would not longer get 0.3 % total accuracy. The two 0.1% reistors in series effectively act as one resistor and with the ADC one is no longer limited to a gain of exactly 10 x. So a single resistor (e.g. 10 K) could be used.With 3 resistors one would alone be close to 0.3 % uncertainy from the resistors and this adds to some 0.2% from the ADC. So one would be more at the 0.5% level. When using the geometric mean (assuming independent errors and partial compensation), one would get a slightly lower uncertainty, but still not for sure below 0.3%.There is a way to reduce the number of critical resistors to 1. With 500 µA one could still just use a transimpedance amplifier instead if the shunt and amplifier and than no extra gain would be needed. The downside is that additional power (as much as the input current) is needed. 500 µA is a bit on the high side for this solution, but for low currents this would definitely be the way to go. pA meters are nearly all made this way.

author: shamooooot
author_rank: Regular Contributor
timestamp: January 19, 2025, 10:57:13 am
content: Quote from: Kleinstein on January 19, 2025, 10:25:03 amCould you please share a schematic for such solution with the transimpedance amp. and perhaps suggest me one that is good for the job?..Also, could you advise if I can apply the same protection as proposed before with the antiparallel diodes to it as well?, and whether it is good fo AC and DC currents?.

author: Kean
author_rank: Unknown
timestamp: January 19, 2025, 11:02:18 am
content: Quote from: Kleinstein on January 19, 2025, 09:35:20 amI don't believe scope use was ever a design goal for the uCurrent. It isn't mentioned at all in Dave's article. The primary goals were low burden voltage and higher accuracy than typical DMMs.http://alternatezone.com/electronics/ucurrent/As mentioned in the article, the 2kHz bandwidth (with low THD) is primarily for AC measurement.

author: Kean
author_rank: Unknown
timestamp: January 19, 2025, 11:17:19 am
content: Quote from: shamooooot on January 19, 2025, 10:57:13 amThe anti-parallel diodes are a nice simple protection solution, and will work for both AC and DC currents.As Gyro mentioned in reply #7, the key thing in choosing the diodes is low reverse leakage, and a forward voltage that is slightly above the max voltage drop you expect across your sense resistor.Many Schottky parts are not ideal, but maybe the PMEG10010ELR would be OK. I used it as a drop in replacement on a design which needed lower leakage than my usual Schottky parts, but could tolerate a slightly higher forward voltage.Edit: The forward voltage of the PMEG10010ELR is quite low at low currents, but it should still be below the voltage across the sense resistor at those low currents. But if you did decide to use it rather than a different silicon diode, I'd probably allow for having two in series. Either way you should do some measurements with and without the protection diodes to make sure they don't have a significant effect on your accuracy across whatever temperature range you need to operate, and that they limit the voltage across the sense resistor as planned when there is an over-current condition. Note that these are only rated to 1A average, but can handle more for short peaks. There might be another part in the PMEG range with a higher current range, but similar low reverse leakage.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 19, 2025, 06:14:05 pm
content: The diode protection also works with an TIA. One the positive side the burden is usually rather low and leakage thus less of an issue.One can also mix a TIA for low currents with a classic shunt for higher currents if one uses range switching.The TIA is just the OP-amp with the measuring resistor and maybe a parallel capacitor in the feedback and the non inverting input to ground. To avoid ringing / osciallation with a capacitor as DUT/source one may still want some series resistor and or inductor for the input.A slightly confusing point with a TIA is that it will not read zero current with a short - zero current is with an open input.I would not use schottky diodes for the protection, as they have relatively high leakage and no need for speed. It is more slightly higher voltage (slow) rectifier diodes like the 1N4007 or 1N540x. For slight high burden and AC current one may even want 2 diodes in series each to allow for high peak currents from a high crest factor and to use bootstrapping the critical pair to reduce the leakage even more (e.g. for sub nA resolution with a 2 A fuse).Especially with a relatively high shunt value like 100 ohm there is not problem when the voltage goes to 1 V or even 2 V as the power level is still acceptable. It gets tricky with a shunt of some 1 Ohm though.