Getting Different Current Measurements Using High Side and Low Side Measurement Techniques

Thread Starter

phillipsoasis

Joined Aug 22, 2022
170
I have built the attached circuit on a breadboard. It is basically a Pi Zero W controlling a DAC/op-amp/MOSFET current source with two different current measuring circuits. One cicuit measures the current through the low side R223, 0.19R 2 watt resistor (measured value) and a MCP3008 ADC. The other circuit measures the same current on the high side using an INA260. The load at this point is just a car light bulb (~8.9R). What I am really after is measuring the current through rocket igniters (~0.4R), by replacing the bulb with the igniter. I am using the light bulb as a proxy so I don't have to burn up a bunch of igniters, and to test the circuitry.

My preliminary results (all mA) with a 1 msec pause before reading the values:
Programmed CurrentINA260R223/ADC
20098.7516.96
300178.7567.85
300180.067.85
500342.5169.61

I can't find any oscillations in the circuit. I am interested in suggestions to help get these measurements closer in agreement, or, is this the best that can be done with the parts I have? Which measurement method is closer to the real current, whatever that is?
 

Attachments

Last edited:

Thread Starter

phillipsoasis

Joined Aug 22, 2022
170
I have built the attached circuit on a breadboard. It is basically a Pi Zero W controlling a DAC/op-amp/MOSFET current source with two different current measuring circuits. One cicuit measures the current through the low side R223, 0.19R 2 watt resistor (measured value) and a MCP3008 ADC. The other circuit measures the same current on the high side using an INA260. The load at this point is just a car light bulb (~8.9R). What I am really after is measuring the current through rocket igniters (~0.4R), by replacing the bulb with the igniter. I am using the light bulb as a proxy so I don't have to burn up a bunch of igniters, and to test the circuitry.

My preliminary results (all mA) with a 1 msec pause before reading the values:
Programmed CurrentINA260R223/ADC
20098.7516.96
300178.7567.85
300180.067.85
500342.5169.61

I can't find any oscillations in the circuit. I am interested in suggestions to help get these measurements closer in agreement, or, is this the best that can be done with the parts I have? Which measurement method is closer to the real current, whatever that is?
I tried buffering the signal from R223 with the extra op-amp in the TLV2462 package, but the readings changed very little.
 

Attachments

Jolly13

Joined Mar 25, 2018
44
First question is does it matter for the igniter .. how close do you have to be :)
You will be push 3-amp in this circuit .
--- Brain storm ----
Then I would start with doing it the old-fashioned way E = I x R ( I = E/R) does it agree with one of the approaches .
Take your best reading of the resistance and best reading of the voltage your tools allows. see what you get and what is closer?

Light builds will dissipate power and their resistance go up as they start to illuminate?

Were did you put INA260 in circuit.
 

MisterBill2

Joined Jan 23, 2018
27,173
What I see is that neither scheme is correct. It is not clear as to where the shunt resistance that the INA260 INPUT VOLTAGE is derived, and certainly the contribution from R202 can not be ignored.
So it does not really appear that either set of readings would accurately reflect the actual current passing thru R-bulb.
As for the validity of using a light bulb as a substitute, that part is quite reasonable! If the igniters are similar to the "ESTES" brand igniter the resistance increase is similar, while the actual resistances will be quite different.

Neither scheme is able to accurately monitor the voltage across the R223 current shunt resistor.
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
170
What I see is that neither scheme is correct. It is not clear as to where the shunt resistance that the INA260 INPUT VOLTAGE is derived, and certainly the contribution from R202 can not be ignored.

The INA260 has a built in shunt resistor of .002 Ohms - see the datasheet. It is a high side precision digital current, power, voltage monitor. The current through R202 is ~15 microA at max, so not a big factor. As the current increases through R223, less current will be contributed to the total read by a voltage drop across R223 as the voltage drop across R223 increases.

So it does not really appear that either set of readings would accurately reflect the actual current passing thru R-bulb.

Why?

As for the validity of using a light bulb as a substitute, that part is quite reasonable! If the igniters are similar to the "ESTES" brand igniter the resistance increase is similar, while the actual resistances will be quite different.

Neither scheme is able to accurately monitor the voltage across the R223 current shunt resistor.
Only the ADC monitors the voltage across R223 as a means of calculating the current. The INA260 is a high side monitor to measure the same current above the load, less the negligible contribution of R202.
 
Last edited:

Thread Starter

phillipsoasis

Joined Aug 22, 2022
170
First question is does it matter for the igniter .. how close do you have to be :)

It does not matter for launching the rocket. I am just curious to see if I can measure the current accurately and in a repeatable fashion. When I started this project, there was little to no data regarding the electrical characteristics of the igniters, so I had to guess as to how much current and for how long was needed to ignite the igniter. As a result, I ended up measuring the current/duration for countless igniters to arrive at a current/duration for programming the DAC for each launch. I used the crude ADC method on Rsense as shown in the schematic. I later added the INA260 on my test bench to see what that would say, and the numbers are very different. Hence, my question.

You will be push 3-amp in this circuit .

For the igniter, that is what I normally use to ignite it - 3A for ~ 300-500 msec. The light bulb only needs ~1A to light, so the DAC is programmed for a lower current.

--- Brain storm ----
Then I would start with doing it the old-fashioned way E = I x R ( I = E/R) does it agree with one of the approaches .
Take your best reading of the resistance and best reading of the voltage your tools allows. see what you get and what is closer?

Programmed CurrentManual Reading of R223
200 mA54.95 mA
300 mA99.0 mA
500 mA187.32 mA

Yet another set of values! lol

Light builds will dissipate power and their resistance go up as they start to illuminate?

Yes

Were did you put INA260 in circuit.

It is a high side current monitor - see the schematic. It sits between the Vload (~15V) and the load, and measures the current through an on board .002 Ohm sense resistor. It has an on board 12 bit ADC and does all the E = I x R calculations on board and delivers the answers (current, voltage, power) over an I2C bus that the Raspberry Pi reads.
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
170
It looks like a low side sense, but not the way I would do it.

I don't understand your comment. I am sensing the current in two ways - low side with R223 and the ADC, and the high side with the INA260.

How would you go about sensing the current through the igniter/light bulb?
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
170
A little more data... Varying the SPI bus frequency(2.34MHz to 100Khz) has no impact on the data read from the ADC nor the data programmed into the DAC. The I2C bus is running at the default 100kHz. The issue with wide variation in measurements is not a sampling issue.

Programmed Current
INA260
R223/ADC
Manual Reading of R223
DAC Sample Frequency
ADC Sample Frequency
200​
98.75​
16.96​
54.95​
2340000​
2340000​
300​
178.75​
67.85​
99.00​
2340000​
234000​
300​
180.00​
67.85​
n/a​
234000​
234000​
500​
342.50​
169.61​
187.32​
234000​
234000​
200​
97.50​
16.96​
58.63​
1000000​
1000000​
300​
177.50​
67.85​
105.26​
1000000​
1000000​
300​
178.75​
67.85​
105.26​
1000000​
1000000​
500​
340.00​
152.65​
198.68​
1000000​
1000000​
1000​
736.25​
390.11​
430.42​
1000000​
1000000​
200​
97.50​
16.96​
58.63​
100000​
100000​
300​
178.75​
67.85​
116.74​
100000​
100000​
300​
178.75​
67.85​
116.89​
100000​
100000​
500​
338.75​
152.65​
198.52​
100000​
100000​
1000​
736.25​
390.11​
430.05​
100000​
100000​
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,173
I don't understand your comment. I am sensing the current in two ways - low side with R223 and the ADC, and the high side with the INA260.

How would you go about sensing the current through the igniter/light bulb?
Glad you asked. First if any degree of accuracy is required, the sense connections to the series resistor are direct, and not shared for any other function. So in this application the wires from the INA260 amplifier pins #1 and #14 would connect directly to the sense load resistor, R223.
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
170
So in this application the wires from the INA260 amplifier pins #1 and #14 would connect directly to the sense load resistor, R223.
Totally incorrect.

As I said in the title of this post and in the original post, I am measuring the same current at the same time with 2 methods, one high side and one low side.

* The high side method uses the INA260 between the power supply (12-15V) and the light bulb (load). As I said in my previous post, the INA260 has an internal sense resistor between pins 1 and 14 for making high side current measurements. The very first lines in the INA260 datasheet, which I also attached to an earlier post, says:
Precision Integrated Shunt Resistor:
– Current Sense Resistance: 2 mΩ
– Tolerance Equivalent to 0.1%
– 15-A Continuous From –40°C to +85°C
– 10 ppm/°C Temperature Coefficient
(0°C to +125°C )
This block diagram of the INA260, also on the first page of the data sheet, shows how high side current measurements are made:
Screenshot from 2024-08-29 21-45-26.png

* The low side measurement uses an ADC to measure the voltage across R223, and converts that to a current based on the measured value of R223 as 0.19 Ohms. And all of this was stated in my earlier posts.

* This picture may help you understand what is contained in the schematic diagram attached to the original post:
Screenshot from 2024-08-29 21-39-25.png

* The two measurements should be correlated and more or less equal, since it is the same current flowing through the INA260 and R223 when the high side and low side measurements are taken concurrently.
 

Sensacell

Joined Jun 19, 2012
3,768
Have you performed basic static checks?

Run a constant current.
Check all DC voltages with a meter, across both shunts, and at all main circuit points.

With all the MCU/Digital herky-jerky going on, it's good to divide the problem down.
 

MisterBill2

Joined Jan 23, 2018
27,173
My comment in my post #7 was based on the original posted circuit, in which the connections to the low side current sense resistor were not shown in a manner indicating that they were directly at the resistor. It seems that the voltage between the high side of the sense resistor and the system ground bus is being measured. That is the reason for my statement: " It looks like a low side sense, but not the way I would do it."
As for the high side current measurement, it appears that the internal shunt in the INA260 is being used.
 

Jolly13

Joined Mar 25, 2018
44
Well ADC does not match manual reading of voltage , hard to tell with out real ### from ADC .

Get that right first if you want to use this approach.

May just be in margin of error and noise you will see on ADC .. Get confident this is good +- some level going to be more that the 10bits ? Work with Voltages ### first..

Put accurate known voltage on ADC and does read it accurately. ( mid rail, close to ground, close to vs ) if so hmm Why does Voltmeter show a different value ?

====== Ponder
Slow system way down , oversample.
Record value with a stable voltage .. is it rock solid ( never are on ADCs) as in how much noise you seeing and deviation from known values.
Record value with a well defined sweep . do they make since .

All depends on what you see.
Slow it down , over sample , low pass filer in software .. Depends on what you see
 

MisterBill2

Joined Jan 23, 2018
27,173
Measuring the current versus what one is commanding via a D/A converter is not likely to result in agreement. And that source of difference is quite separate from accurate measurement techniques using an "ammeter shunt" scheme. That is why "Kelvin Connection" is important for achieving accurate measurements.
Current flowing thru the measurement conductors provides uncertainty.
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
170
Apologies to all for going dark. I appreciate all the comments and suggestions and have incorporated many of them in my new design.

I noticed on my solderless breadboard that the current through the MOSFET melted the plastic and deformed the board. I switched to a breadboard with soldered components, but it took awhile to build the board and get some replacement parts. I also added more signals to the ADC to see what is happening, as reflected in the attached updated schematic. The INA260 did not fit on my new breadboard, so I will add that in after looking at the ADC measurements.

Some preliminary results (duration = time between programming the DAC and taking the measurement from the ADC):
Screenshot from 2024-09-01 14-17-56.png

The good:
* The ADC is reporting the two reference voltages (2.22 and 1.11) correctly.
* The DAC ouput voltage is correct and consistent across different durations.
* The U204V+ reading is very close to 1/10 of the DAC ouput voltage, as it should be.

The bad:
* The U204V- is not behaving correctly and varies between measurements, so the gate voltage is moving, too.

The ugly:
* The Source voltages and calculated currents look terrible, probably due to issues with U204V-.
* Buffering the input to the ADC does not appear to make much difference.

I am still taking measurements and looking for solutions. I will also add in the INA260 for comparison. Stay tuned!

Meanwhile, if you have any suggestions for improving the circuit, especially the feedback path from the R223, I am all ears!
 

Attachments

MisterBill2

Joined Jan 23, 2018
27,173
Are you still using the internal resistor in the INA260??Is there any chance that you are correctly reading the voltage developed across R223??
With the connection scheme as shown, that is not possible.
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
170
Are you still using the internal resistor in the INA260??
As I wrote in the note above, the INA260 is not in the circuit at this time. I will be using the internal sense resistor when it is hooked up.

Is there any chance that you are correctly reading the voltage developed across R223??
With the connection scheme as shown, that is not possible.
Please explain why it is not possible with the circuit shown to read the voltage across R223.
 

MisterBill2

Joined Jan 23, 2018
27,173
The issue is that an accurate reading demands that only the voltage developed across the known shunt resistor is measured. That means that both sides of that resistor need to be directly connected to the measurement input, so that no other current flows in any portion of the measurement loop. That is not what the drawing shows. The drawing shows the negative side of the sense resistor connected to "ground", and the MCP3008 analog return connection connected to a different point, shared with other unknown currents. Thus the effective input voltage includes a number of unknown voltages.
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
170
@MisterBill2 You have a point. However, the impact of these other voltages depends on the relative size of the ground currents. Hard to measure those.

I found that when I programmed the light bulb for 1A of current and ran it for 10 seconds, the voltage across R223, when measured with my manual voltmeter, never settled on one value. It kept jumping around. Which would also explain the variations in the U204V- input. Given the non-linear relationship of voltage, temperature, and current for a light bulb, this is not surprising.

When I replaced the light bulb with a 1 Ohm resistor, I was able to read a consistent voltage across R223 0f 110.43 mV when the DAC was programmed for 1A. The Rload = 1.06 Ohms and the voltage across the load was 731 mV. This means the current in R223 was 581.2 mA and the current in the load resistor was 689.6 mA.

The circuitry made 4 measurements during the 10 sec the current was running:
Screenshot from 2024-09-02 14-22-14.png

A lot more consistency in measurements for the resistor load than the light bulb. Still not a lot of agreement between the 3 measurement methods for a programmed current of 1000 mA:
voltmeter: 689.6 mA in load resistor and 581.2 mA in R229
INA260: 720 mA in load resistor
ADC: 593.6 mA in R229 (note: the buffered readings were closer to the voltmeter readings)

I also hooked up the INA260 to a 75 Ohm load and got these measurements:
Screenshot from 2024-09-02 11-59-21.png

I measured with my voltmeter the supply voltage as 15.198V and the voltage drop across the 75 Ohm resistor as 15.194. The measured resistance of the 75 Ohm resistor was 74.26 Ohm. According to my measurements, the current through the 75 Ohm resistor was 204.61 mA, which is very close to the INA260 current measurements, although the reported voltage is way off.

A new run with the light bulb back in as the load:
Screenshot from 2024-09-02 14-49-42.png

For some reason, there is less variation in the measurements.

I have one important conclusion from all of this. I do not want to ever have a job as an instrumentation engineer!
 
Top