Highside MilliCurrent - Page 1
Forum section: electronics / projects

author: sourcecharge
author_rank: Regular Contributor
timestamp: September 26, 2024, 03:13:42 am
content: Hi all,I know, uCurrent rules, but for those that use bipolar power supplies and bridge driver (half or full), highside current measurements are required.This is what I came up with for each PS output:I made a pcb through hole version using 1k ohm precision temperature stablized metal film resistors (measured to < 0.01%) that I had on stock.There are 1k 0.01% digikey surface mountable resistors for about 2 bucks a piece. (notice the extra 10x precision compared to the uC)The total number of 1k 0.01% resistors need to make 2 Highside MilliCurrents would be 22.https://www.digikey.com/en/products/detail/stackpole-electronics-inc/RNCF0805TKY1K00/2269700Even if you get those, you still need extra non precision, but temperature stablized resistors and a couple of 18 turn through hole pots for the output stage. (my design)The common mode voltage seems to be the catch for highside measurements.Postive non inverting bias current can be zeroed out by using the relative function, but a Negative non inverting bias current is opposite.The negative non inverting bias current offset voltage can be relatived out if you turn on the oscilations without the power to the input lead follower transistor connected to the highside mC while the PS still connected to the mC.(The 11 ohms on the input is from the shunt resistance from the current measurement from the mastech multimeters I have. Also the PS on the output voltage meter is the relative function of the multimeter set at 8.8uV)This gain mulitplication per stage variation is the lowest in offset voltage in B2spice in order to maximize the bandwidth.

author: jbb
author_rank: Super Contributor
timestamp: September 26, 2024, 07:31:07 am
content: A good thing to have on your bench!I built something similar a few years ago. I used it for measuring the run and sleep mode power consumption of a microcontroller.Instead of buying precision resistors, I decided to use an all-in-one INstrumentation Amplifier (INA)… I forget which one exactly. These all in one devices tend to have good internal resistor matching and therefore really good Common Mode Rejection Ratio (CMRR), at least at low frequencies.The device produces 2 outputs. Firstly, a coax connection for the INA output - essential for viewing waveforms on a scope. Secondly, the INA output also goes into a low pass filter (1Hz) for readout on a multimeter.Power was initially provided by two 9V batteries (+-9V supply), but I later switched to a stack of CR2450 coin cells which I had handy.

author: sourcecharge
author_rank: Regular Contributor
timestamp: September 26, 2024, 02:36:58 pm
content: Quote from: jbb on September 26, 2024, 07:31:07 amI researched INAs and didn't find even one that had a slew rate above 2V/us where as the opa189 or opa2189 has a slew rate of 20V/us. That and the opa189 has a CMRR of 168db.On top of that, the offsets on the INAs were way higher too. Can't beat the precision laser cut internal resistors probably if you are mass producing this, but measuring the resistors manually from a box of 200 or so (what i did), you can find 0.01% matching resistors that are like 20 bucks each normally.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 26, 2024, 06:31:54 pm
content: The main idea with the 3 OP-amp INA / differential amplfier is to have most of the gain in the first stage and only relatively little (e.g. x1 or x2 ) in the 2nd stage. With that there is no more need for super accurate resistors to get good CMRR. The gain of the input stage would improve the CMRR. So one could get something like 40 dB extra with a gain of 100 in the input stage. Accuracy in the input stage would only effect the gain accuracy, not the CMRR.p.s.With a high side voltage and still a ground link one would likely need protection for the amplifiers, especially for the case with the voltage at the measurment side is higher than the OP-amp supply.

author: sourcecharge
author_rank: Regular Contributor
timestamp: September 26, 2024, 10:19:37 pm
content: Quote from: Kleinstein on September 26, 2024, 06:31:54 pmI was eye balling the INA849. The output offset was kinda high and the 10x gain error of 0.025% was not appealing although this one had a 35V/us slew rate. I don't remember why I passed on this one.I did find in B2spice that putting the gain all in the 1st stage had much higher voltage offset on the output. I also remembered that lower gain spread out across multiple stages increased the bandwidth.I found that using a 3x,3x,1.6x had the least amount of offset, with the lowest gain spread across the 3 stages. Also, the last stage was just a non inverting opamp, that could be adjusted with a trimmer pot.The common mode voltage or the maximum voltage measureable is 2.5 voltage less than the PS. I use about +/-10V max to measure so it works out for right now.

author: twospoons
author_rank: Frequent Contributor
timestamp: September 26, 2024, 11:36:54 pm
content: So why not just use TI's INA290? Its a couple of bucks, handles up to 120V common mode, has 1MHz BW for the lower gain version, and CMRR of 140dB. You are really going to struggle to match that using opamps and discrete resistors.While I applaud the OP's efforts to 'roll-your-own' (not enough ppl try to do this) some things are much better done on a single chip.

author: sourcecharge
author_rank: Regular Contributor
timestamp: September 27, 2024, 01:53:12 am
content: Quote from: twospoons on September 26, 2024, 11:36:54 pmThe price is nice, but its a sot-23-5 and I've sworn off using those along with the tsops.Too small for me, I only like using soic packages as I hand solder them on.I don't need 120V but it does seem like this would be better input range for a universal highside current meter.I think there are current sencing amplifiers that have high common mode voltages too but they use the input voltage to offset and power the chip.The 168db of CMRR on the opa189 or opa2189 and the low offset is worth it though and I'm happy with what I made.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 27, 2024, 06:30:00 am
content: Having more gain with the input stage should not cause more offset. A downside can be the BW and also the need for extra headroom in the supply.At least the OPA189 is quite fast, so the speed should not be an issue.The problem with low gain in the first stage is that the resistor matching for the 2nd stage is than limiting the CMRR.

author: sourcecharge
author_rank: Regular Contributor
timestamp: September 27, 2024, 09:28:14 am
content: Quote from: Kleinstein on September 27, 2024, 06:30:00 amI can't tell you why B2spice is saying there is more offset when the first stage has all of the gain.Maybe you can try it on your spice of choice and check to see if it matches b2spice.I have a box of old 70s 1k metal film temp stable precision resistors.I was able to measure them down to .1 ohm accuracy using a fluke 89 IV and matched them to the exact reading of the multimeter.I may not have got exactly 3x gain on the 1st and 2nd stages but the required resistors were matched as good as I could get them.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 27, 2024, 09:36:42 am
content: The resistor accuracy in the 1st stage only effects the gain accuracy. With the trimmer for the gain of the 3rd stage this is not relevant anyway. The point is that with more gain at the input the resistor matching gets less critical.The offset seen in a simulation is only one example. Normally there should be very little there, as much of the offset comes from effects like input offset current or voltages that scatter and are naturally not included in the simulation. There are also effects that can compensate, but real life is more scattering. Normal math tells that more gain for the 1st stage should give a better chance for lower offset too, though not much difference.

author: sourcecharge
author_rank: Regular Contributor
timestamp: June 28, 2025, 01:33:24 pm
content: Hello again,I just wanted to update the HS mCurrent, and to share some results of testing.I have found problems with circuit as temperature changes.The resistor networks are not very accurate anymore and I now realize why.Even if you use metal film resistors and manually measure them within 0.01%, they generally still have a variable ppm/C for their resistive material.On top of that, there is a ppm/C of the ratio between the resistor networks.This ppm/C of the ratio between the resistor networks is important because it causes the range of which the mCurrent can measure drastically decrease between having to re-calibrate due to differences of current measured.I have found that there are reasonably price quad resistor networks that are found on digikey that have a 2 ppm/C ratio between the resistors, and the cheapest is the 10k quad isolated versions (about 9 bucks) but a 1k quad resistor network has more bandwidth accuracy (about 13 bucks).Not sure why, B2 spice just has lower resistor network values as more accurate outputs at higher frequencies.There are SOIC-EP quad networks with better ratio ppm/C but they are getting very expensive (20-80 bucks each).I am reasoning that because each network needs to be on the same stage, using a gain of 5 on the first stage, a gain of 1 on the second stage, and a gain of 2 on the last stage allows these networks to be used for the correct gain (10x) using a 100mohm shunt.On a related note, when I was searching for a HV HS current sensor that was off the shelf, I noticed that there really isn't any available that uses a shunt and is isolated from the input power.What I mean is that all of the HS current sensors that measure HV use the input power to offset the bias level of the measuring amplifier.I do not like this, so I made a 3 point DC-DC linear converter that is only limited by the mosfets Vds, the caps' V ratings, the number of zeners used, and the +/- PS max V available.Here is the b2 spice simulation schematic:

author: Kleinstein
author_rank: Super Contributor
timestamp: June 28, 2025, 07:51:24 pm
content: There is still very little need for the 3rd amplifier stage.The TC of the resistor networks would likely be one of the lesser issues - the bigger one is likely the shunt itself. This is because the temperature of the shunt may well change with the load current.Chances are one would want an overall gain higher than 10 x.For the 1st stage the TC matching is somewhat critical, but only needs to be in pairs of 4 resistors are used (2 in parallel or series for the center).The accuracy of the resistors does not really matter. The tricky part here is getting sets with gain, like for a gain of 10 or 50.For the 2nd stage 4 equal resitors are the typical choice - if one wants a little gain (like x2) depends on the CM / supply voltages.Here the value matching matters. There ready made differential amplifiers with 4 resistors and the OP-amp, that can be an option too. Usually no need to go 1 K - 10 K resistor have a chance to be more accurate and should be low enough in most cases.From my limited experiance the relative TC specs for the resistor arrays seems to be conservative. I have seen much better matching for a more relevant small temperature range and value of the 5 K to 50 K. This can be due to a larger temperature range than normally relevant in a lab environment. Another point is that the specs are often for a whole range of resistor values. Especially the lower values get more critical with the contribution of the bond wire and pins. So expect a 10 K set to have better matching than an 100 ohms array.The power supply part looks odd - what is the intended function of that part ?

author: sourcecharge
author_rank: Regular Contributor
timestamp: June 28, 2025, 09:21:58 pm
content: I'm finding that over time, as the seasons change in an outside shop that does not have constant ac, the resistor network is less accurate than I originally made them.Having resistor networks that have stabilized ppm/C ratios between the resistors would probably take care of that issue.I agree that a lower shunt would decrease the power across the shunt and therefore ppm/c drift, but I am also trying to decrease the gain to increase the bandwidth.I deal with <200mA measurements so really the only temperature affecting the shunts is RT at 35C to 30C sometimes, but the calibration stage at the end is able to take that error out.The first stage is set for the cheapest networks available for the best quality, they have 1k 5k and 10k quad resistor networks that are bound by what looks like a thermal spreader.That leaves only a 5 gain on the first, but I don't want to put all of the gain on the first stage anyway to maximize the bandwidth.The second stage is set to 1 because of whats available, and the last stage can use the calibration pot or the extra network for a gain of 2.I'm guessing the network would be more stable over time, but the resistor/pot to calibrate can increase accuracy if the gain of the networks don't add up to exactly 10x.The PS is meant to allow HV measurements and have the input power to be measured, isolated by at least 100Mohms.All HV current sensors that measure positive and negative voltage require the input power to be measured, also power the current sensor IC.Basically, it uses bipolar 50V PS inputs to make 3 voltage levels.+10V CMV, CMV, and -10 CMV.These three voltages are then used to power the current sensor's amplifiers.I have prototyped this circuit, it works, but it needs more stability (I don't have 50V 10mF caps).More testing is required.Overall, when the CMV changes, all three voltages track it so that the CMV of the current sensing amplifiers is not exceeded.Using this HV circuit requires the HS sensor to be connected to a DC input, you can't directly run a pulse through the sensor.It requires a switch after the sensor.It allows measurements up to about the +/-PS inputs (- the CMV top range limit) while being isolated to the senor by the voltage dividing network, of which I'm using 100Mohms.No other shunt sensor can do this while measuring both + AND - voltages. (I found 1 that can do only + voltages up to 100V)I use bipolar PS for my research so I need to have 2 sensors for both + and - measurements.

author: Terry Bites
author_rank: Super Contributor
timestamp: June 30, 2025, 05:15:57 pm
content: Have you looked at this data sheet with an app on how to float a current sense amp on a high CMV?ADs LTC6102 page 23. I've had a few of these circuits on the go in some crusty X-ray units.No magic smoke yet. Pretty damn precise too. Summing the current outputs is a joy.About £5 a pop.

author: sourcecharge
author_rank: Regular Contributor
timestamp: June 30, 2025, 07:40:15 pm
content: Hello Mr Bites,The LTC6102 is a off the shelf HV current sense amplifier that uses the input power that is being measure, to power the IC.I wanted to make one that uses a shunt that has at least 100Mohm isolation. Nice chip, but not what I wanted. Thanks though.On a side note, I wasn't happy with my previous design because it was not stable enough, so I came up with something a little more complex, more parts, but much more stable.I'll proto it later but B2 Spice is showing good results.I'm using some old LM324 Quad op amps, so the last set of 4 is because there were 3 Op amps left over so I put them in parallel to boost the current capacity.Betwen the first buffer op amps, only one needs to be used that can be used for the remaining 6 op amps, eliminating 1 op amp, but with the quad IC, I put all of them to use.The values of the summing op amps (17.5k,1K and 12.4k) are values that I needed to use because of the +/- 15Vdd/Vee, the +/- 1V biasing, and the input offset that is caused by the buffer op amps' non inverting V offset.Spice shows the buffer op amps' non inverting V offset to be different for different op amps and so therefore the Voltage divider can vary.

author: sourcecharge
author_rank: Regular Contributor
timestamp: July 03, 2025, 04:55:13 pm
content: So, ya.I found some HV OpAmps at I higher than I would like price but still ok.OPA455 is a +/-75V OPAMP that is about 8 bucks.Using 3 of them, I can have 10^13 ohm input isolation, have a about +/-73 CMV (+/-50V is enough), 3p CMV reference Voltage supplies because each of them can put out 45mA, and makes the circuit much less complex.50ohms to the non-inverting input to the first OPA455 as a buffer, then DC bias the input by using the summing op amp config for the other two OPA455, and then 50ohm off of all three to a filtering with a cap.I did prototype the circuit above, it works, but I changed it around to have a single 10k pot change the voltage ref input of the summing op amps, which then required the dividers to be in the Meg ohms.It was resonably accurate, and it could have had better Meg ohm voltage dividers.I did find something that I didn't expect, but I should have caught it when designing it.The caps that are filtering the outputs need to be non polarized caps, just use to electrolytics in series back to back.