Author Topic: Highside current sensor  (Read 1264 times)

0 Members and 1 Guest are viewing this topic.

Offline sourcechargeTopic starter

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: us
Highside current sensor
« on: October 08, 2026, 07:36:16 pm »
After working with IAs, I found that the 4 resistor network of the differential part is a major source of error for any measurement with a wide range of load resistance, and voltage source.

Please see the spread sheet below.

Basically, as the voltage across the shunt gets lower, the error of the IA increases.

So, I decided that I wanted to make a highside current sensor that was not subject to this error.

The result is a differential output using the circuit in the below schematic.

It's basically a low side current sensor, but with a second opamp that isolates the reference ground resistor of the first opamp.

The result is a error subject to only the 2 resistors, with a differential output.

Because the sensor is designed to be measured by a multimeter, in my case, the MS8040, it can measure differential signals.

Yes, this will have some offset, but under normal conditions, I've found that all of this type of current sensors require a zeroing, REL function of the multimeter before the measurement.

I went with the 100mohm shunt again to keep the bandwidth high, but I changed to the lower 10ppm/C type, which was a little more pricey.

I also use a 0.01% matched 9k/1k resistor network.

The input filter is geared to 15khz for CO, and I also added some output filtering too.

I included a paper about the filtering of highside current sensors if you are interested.

I really hope these current sensors will finally be able to accurately measure my bipolar sources with resonant loads using half and full bridge drivers for frequencies up to 12khz.

It's for research purposes.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 5789
  • Country: dk
Re: Highside current sensor
« Reply #1 on: October 08, 2026, 07:42:05 pm »
why not just use a common INAxxx currentsense amp or a proper diff amp?
 

Offline sourcechargeTopic starter

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: us
Re: Highside current sensor
« Reply #2 on: October 08, 2026, 07:49:33 pm »
I can't tell you how many current sense amplifiers I've looked at, but I know it's alot.

I don't remember why all of them do not fit my needs, but I can tell you I think it might be about isolation.

An IA, or a differential opamp will be subject the the 4 resistor network error problem.

Please see the spread sheet to understand the calculation.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 5789
  • Country: dk
Re: Highside current sensor
« Reply #3 on: October 08, 2026, 08:17:04 pm »
the point of buying an instrumentation amp or current sense amp is that they come with matched resistors build in
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 6071
  • Country: au
    • send complaints here
Re: Highside current sensor
« Reply #4 on: October 08, 2026, 09:07:30 pm »
Just use the multimeter on mV range?
 

Offline sourcechargeTopic starter

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: us
Re: Highside current sensor
« Reply #5 on: October 08, 2026, 10:22:14 pm »
the point of buying an instrumentation amp or current sense amp is that they come with matched resistors build in

Seriously?  Have you seen the accuracy they list in their datasheets?

Using four 10kohm resistors in a diff opamp with a 0.01% error gives 10000 +/- 1 ohms, which is the best matched resistors you can get or put inside a chip.

That could be all four of them with the  +/- 1 ohms.

My spread sheet shows a difference of only one resistor with + 0.01 ohms, a 0.0001% error.

Theoretically, it's impossible for them to have the same accuracy as a low side (non inverting) current sensor with 0.01% matched resistors.

If you single out any one of your "common" picks, name it, and the datasheet will show an error of about 0.05% in a narrow ideal measurement.

The truth of it is that when the load or source changes, the error increases as the voltage difference between the inputs of the differential opamp decreases.
 

Offline sourcechargeTopic starter

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: us
Re: Highside current sensor
« Reply #6 on: October 08, 2026, 10:31:08 pm »
Just use the multimeter on mV range?
I'm sorry, I don't understand what you mean by this..

I'm not sure if you are posting in the right thread...
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 4183
  • Country: us
Re: Highside current sensor
« Reply #7 on: October 08, 2026, 10:43:19 pm »
Just use the multimeter on mV range?
I'm sorry, I don't understand what you mean by this..

I'm not sure if you are posting in the right thread...

It seems that all you are doing is amplifying the voltage across the shunt and then measuring it with a multimeter. Why not just measure the shunt voltage with the multimeter directly?
 

Offline sourcechargeTopic starter

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: us
Re: Highside current sensor
« Reply #8 on: October 08, 2026, 11:27:38 pm »
Well, I'm measuring between 0 to 220mA, and my multimeters are 5.5 digit type.

That would be 22.00mV, vs 220.00mV or 0.10mV vs 1.00mV.

So there is some logic in the simplicity of what you are suggesting, but a loss of significant digits.

I'm trying to keep the shunt as low as I can without decreasing bandwidth so a 1 ohm shunt is not possible.

Buying really expensive volt meters is kinda out of the question, because I would need 2 at least.



 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 8799
  • Country: ca
Re: Highside current sensor
« Reply #9 on: Yesterday at 02:37:01 am »
gonna hate me,  you're not re-inventing the wheel   your mastech is a 22k count dmm

you have relative measurements if it is what you call differential ?

you have 4 1/2 digits panels meters gives 19999  counts wich is close to your meter  or same for current meters .......   and you just need say 0.1 ohms  shunt, and it gives you a very good precision

and you can find cheapo   dmm's who goes up to 40k 50k or even 60k counts  at "relatively" low prices,  notice the quotes lol

say  some t58d  models on aliexpress


but do you talk about resolution or precision   thats a different thing  if you talk  "digits"

and other member did wrote  you add up errors in your circuit,  you would neeed high precision resistors    ... 

or this for an eample  https://ohm-labs.com/precision-shunts/cs-1-10/

for bipolar   you do have hall effect current sensors,  some are very precise, some brand like Allegro  or others ...  and your voltage losses are near zero

« Last Edit: Yesterday at 02:42:01 am by coromonadalix »
 

Offline sourcechargeTopic starter

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: us
Re: Highside current sensor
« Reply #10 on: Yesterday at 06:24:39 am »
You're right, it's 4.5 digits, not 5.5. My mistake.  Yes, 5.5 digits are usually in the 800 to 2000 dollar range.

My 20k count multimeters are benchtop types, that I can plug into the wall.

I included the MS8040 accuracy specs.

The significant digit that is lost in using no amplifier is a digit that becomes 10x error due the the accuracy of the meters.

For example, the 200mV range has a 0.05% accuracy on DC range, but it has a +6 on the lowest significant digit.

So Using the 100mohm shunt and only the multimeter measuring say 1 mA, it's now +/- 600uV instead of 60uV.

As for the t58d, the "60k" meter you suggest has a 9999 count on the display, (3.5 digits).  Am I missing something?

If you want precision from a multimeter for that extra significant digit, you are going to have to pay through the nose.

I don't have the kind of money for a multimeter.

The 100 mohm shunt I'm using is the best shunt available from digikey, with 10ppm/C and 0.1% error.

Is the shunt you are suggesting any better?

If you have a specific hall effect current sensor that you think is better than a shunt type current sensor, list the model number, maybe post the datasheet.

I've checked "some" hall effect current sensors, but not all I suspect.

The ones I've checked have much less accuracy than the shunt type.
 

Offline sourcechargeTopic starter

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: us
Re: Highside current sensor
« Reply #11 on: Yesterday at 06:36:33 am »
After double checking the shunt you suggested, it is better.

5ppm/C and 0.05%, BUT they look really expensive.

The kind of expensive that requires you to email them to find out the price.

So, kudos for the better shunt, but it's probably out of my price range.
« Last Edit: Yesterday at 06:38:18 am by sourcecharge »
 

Online MariuszD

  • Frequent Contributor
  • **
  • Posts: 697
  • Country: pl
Re: Highside current sensor
« Reply #12 on: Yesterday at 06:42:02 am »
Your circuit cannot be called high side current sensing. There is no level shifting here, it's just an amplifier for the meter, the circuit will work at any point in the circuit.

The biggest source of errors in a differential amplifier is resistance asymmetry, which reduces CMRR. The difficulty lies in the fact that a 1% error in the resistor will result more than 1% error of measured value.
There are solutions that are free of this flaw.
2947573-0


 
The following users thanked this post: PCB.Wiz

Offline sourcechargeTopic starter

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: us
Re: Highside current sensor
« Reply #13 on: Yesterday at 07:16:34 am »
Your circuit cannot be called high side current sensing. There is no level shifting here, it's just an amplifier for the meter, the circuit will work at any point in the circuit.

The biggest source of errors in a differential amplifier is resistance asymmetry, which reduces CMRR. The difficulty lies in the fact that a 1% error in the resistor will result more than 1% error of measured value.
There are solutions that are free of this flaw.
(Attachment Link)

[EDIT]

Oh, I'm sorry, I didn't know the definition of the highside current sensor requires a level shift.

It is what it is then.


After quickly checking multiple AI sources about the definition of a highside current sensor, all are in agreement that it does not require a level shift.
[/EDIT]

What you are showing is a non isolated, floating 6V opamp that is powered by the source.

Correct me if I'm wrong, but it looks like an inverting type that uses a mosfet as Rf and also for the "level shift", presumbably for an ADC for a microprocessor.

Although it doesn't have the same problem as a 4 resistor diff opamp, I think the ADC error is going to cancel any increase of accuracy you get from that setup.

Thanks for the suggestion though but I've considered that already.
« Last Edit: Yesterday at 07:35:37 am by sourcecharge »
 

Online MariuszD

  • Frequent Contributor
  • **
  • Posts: 697
  • Country: pl
Re: Highside current sensor
« Reply #14 on: Yesterday at 08:07:00 am »
I won't argue about the definition with AI. But what you showed doesn't match what most people understand by this term. Compare with the schematics in Google Images for the query "high-side current sensing"; all of them have a level shift to the local ground. The concept of "high-side" loses its meaning when there is no low side in the circuit. The concept of a "high side multimeter" makes no sense because a multimeter can measure anywhere. The term "high-side" in your post is redundant.
Quote
Correct me if I'm wrong, but it looks like an inverting type that uses a mosfet as Rf and also for the "level shift", presumbably for an ADC for a microprocessor.
The circuit does not invert, but regulates the MOSFET current so that the voltages on Rshunt and Rg are equal. So it creates a current proportional to the measured current, and this current is converted into a voltage across Rl. The ratio of Rl to Rg determines the gain.



« Last Edit: Yesterday at 08:13:56 am by MariuszD »
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 3173
  • Country: gb
  • Recovering Electrical Engineer
Re: Highside current sensor
« Reply #15 on: Yesterday at 09:21:17 am »
The harmonic contents and shape of the current waveform will greatly affect the validity of the meter reading.
The meter will respond very differently to a sinewave vs a squarewave. You really need 12bit scope for sensible measurements.
The input filter shown rolls of at ~7.5kHz not 15kHz. See corrected filter.
The amplifier circuit needs to have a BW 3 to 10 times higher than the maximum signal frequency.
If not, there will be further amplitude errors.

Do you need 5.5 digit resolution?
With a 200,000 count meter and a maximum current of 10A the lsd represents ~ 50uV.
That will be impossible to resolve given shunt drift, external noise sources (eg mains hum and RFI) and thermal emfs in the wiring layout.

5.5 digits equates to 150 ppm.
So the amp's gain error needs to be less than 0.015%. Zero drift INAs can meet that spec. eg LTC2053.
No home-brew diff amp will ever out perform these integrated INAs.

Read the datasheet for the LTC6102 or INA241x  very high precession CSAs.
The voltage drop across the shunt must be >> greater than the amplifier's offset voltage.
Kelvin connections are mandatory in precision applications.


The gain network amplifies the OPA129 dc offset by a factor of 10, that's 20mV.
It's an op-amp from a bygone era.
Do you or do you not want isolation?
See offerings from Allegro and TI.
Consider current transformers, they don't drift and have no DC offsets. Hereward CT?

 

Offline sourcechargeTopic starter

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: us
Re: Highside current sensor
« Reply #16 on: Yesterday at 12:14:23 pm »
The harmonic contents and shape of the current waveform will greatly affect the validity of the meter reading.
The meter will respond very differently to a sinewave vs a squarewave. You really need 12bit scope for sensible measurements.
The actual source is a DC source with a halfbridge or full bridge drivers. 

Hence why I need highside current sensors.

I've seen the current waveform that is generated by the drivers and the series resonant cirucits.

The filtering is what is going to control the high frequency waveforms.

The input filter shown rolls of at ~7.5kHz not 15kHz. See corrected filter.
Page 5 of "how-to-filter-the-input-of-a-highside-current-sensing" has the equation of the differential filter as 1/(2 x pi x 2 x R x C).

Page 7 has the equation of the Common mode filtering as 1/(2 x pi x R x C).

Using the values in the schematic, the CO frequency is about 15.9khz.

Are you saying that the st microelctronics application note is incorrect?

The amplifier circuit needs to have a BW 3 to 10 times higher than the maximum signal frequency.
If not, there will be further amplitude errors.
The opa2189 with a 10x gain has a bandwidth of about 100khz, well above my 12khz max.

Do you need 5.5 digit resolution?
With a 200,000 count meter and a maximum current of 10A the lsd represents ~ 50uV.
That will be impossible to resolve given shunt drift, external noise sources (eg mains hum and RFI) and thermal emfs in the wiring layout.

5.5 digits equates to 150 ppm.
I never said I needed one, although I wouldn't mind having one or better.

There was discussion about not using an opamp altogether, and just using the multimeter.

My problem is that in order to have the same number of significant digits of the measurement, I would need a more pricise measurement device.

They are too expensive, and I need at least two. 

Altogether, it would be about 1600 to 4000 dollar investment, just in multimeters.

Not going to happen.

So the amp's gain error needs to be less than 0.015%. Zero drift INAs can meet that spec. eg LTC2053.
No home-brew diff amp will ever out perform these integrated INAs.
The slew rate of the LTC2053 is 0.2V/us, which is why I dicounted that IA from the start.

Read the datasheet for the LTC6102 or INA241x  very high precession CSAs.
The voltage drop across the shunt must be >> greater than the amplifier's offset voltage.
The LTC6102 is not isolated, it requires the ADC, uP, etc.

It's the same as the circuit as MariuszD suggested.

The ADC is going to have error, and that error must be incorperated in to the total error.

The INA241 does not support negative supplies, and it has only 8V/us which is why i discounted that one too.

Kelvin connections are mandatory in precision applications.

Digikey Application notes show how to connect the shunt.

I have included my dual PCB (mirrored) that shows this connection.

The gain network amplifies the OPA129 dc offset by a factor of 10, that's 20mV.
It's an op-amp from a bygone era.

The OPA 2189 is much better, I'm not sure why you brought up the opa 129?

Do you or do you not want isolation?

Yes, isolation is a must.

See offerings from Allegro and TI.

Are you referencing the hall effect current sensor?

If so, list the specific model # and I'll check it out, but most are less accurate than shunt type current sensors.

Consider current transformers, they don't drift and have no DC offsets. Hereward CT?

I can't put inductances in series with the loads which are series resonant circuits.

I'm not sure how accurate those are anyways.


Well, thanks for all the suggestions, but I think this simple circuit I've posted is so far beating all of them.



 

Online MariuszD

  • Frequent Contributor
  • **
  • Posts: 697
  • Country: pl
Re: Highside current sensor
« Reply #17 on: Yesterday at 02:09:59 pm »
The answers don't quite fit because we don't know what you want to measure and where. Guessing based on what you wrote leads to contradictory conclusions.

Do you want to measure direct current at point A or alternating current at point B?

If you want to measure direct current, such a wide bandwidth is not necessary. It would be advisable to limit it, even to 1Hz. Slew rate shouldn't matter either because the filter will take care of it.

If you want to measure alternating current, the meter will probably not measure it correctly.
« Last Edit: Yesterday at 03:10:53 pm by MariuszD »
 

Offline sourcechargeTopic starter

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: us
Re: Highside current sensor
« Reply #18 on: Yesterday at 02:51:15 pm »
The answers don't quite fit because we don't know what you want to measure and where. Guessing based on what you wrote leads to contradictory conclusions.

Do you want to measure direct current at point A or alternating current at point B?

If you want to measure direct current, such a wide bandwidth is not necessary. It would be advisable to limit it, even to 1Hz.

If you want to measure alternating current, the meter will probably not measure it correctly.

A, and -A, because it's bipolar sources.

Just because you are measuring at point A, doesn't mean it's DC.

In fact, when you measure at point A (or -A), the current is pulsed, and therefore the measurement is an AC+DC signal, or pulsed DC.

Hence why an opamp with good bandwidth is necessary.

Reviewing the datasheet of the OPA2189/189, which I've posted below, the UGB is 8Mhz, so with a gain of 10, the bandwidth should be at least 800khz.
« Last Edit: Yesterday at 02:53:28 pm by sourcecharge »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->