shunt wires

Thread Starter

ag-123

Joined Apr 28, 2017
276
recently i've been looking at measuring currents using an mcu. and one of those things that keep coming back are the shunt wires.
while i'd guess many people would simply buy pre-made shunt resistances, the low costs ones aren't really expensive, but that literally even very slight connections variation between the shunt and the measuring device e.g. a current sense amplifier would have changed those milli-ohms and affects the accuracy of the measurements.
given this i've decided to make do with simple bare nichrome or constantan wires

here is a little python script
Code:
#!/usr/bin/python3
import math

resistivity = { 'nichrome' : 1.1E-6, \
'constantan': 4.9E-7}

# mat material
# d diameter mm
# R needed resistance milli ohm
def calcres(mat, d, R):
    print(mat)
    print ('diameter : ' + str(d) + ' mm')
    r1 = d * 1E-3 / 2.0
    a = math.pi * r1 * r1
    print ('resistivity : ' + str(resistivity[mat]) + ' ohm.m')
    print ('resistance : ' + str(R) + ' milli ohm')
    l = R * a / resistivity[mat]
    print ('length : ' + str(l) + ' mm')

#50 milliohm
ohms_needed = 50
#wire dimeter mm
d = 0.5
calcres('nichrome', d, ohms_needed)
print('')
calcres('constantan', d, ohms_needed)
and sample run
Code:
nichrome
diameter : 0.5 mm
resistivity : 1.1e-06 ohm.m
resistance : 50 milli ohm
length : 8.924979129516457 mm

constantan
diameter : 0.5 mm
resistivity : 4.9e-07 ohm.m
resistance : 50 milli ohm
length : 20.035667433608374 mm
this would let you estimate the length of wire needed, and the somewhat harder task would be to literally measure that resistance.
i'd guess things like kelvin bridges would help but that it isn't easy to make a good kelvin bridge and the precision parts may be costly.
but if extreme precision (and accuracy) isn't too critical, one could use precision resistors that cost modestly higher to calibrate the shunt that is perhaps soldered in place with its current sense amplifier. in this way using the precision resistor in series with the shunt, one could estimate the currents from the voltage measurements i = v/r.
the current sense amplifier will amplify the voltage across the shunt so that it is within the voltage granularity of conventional adcs common to micro controllers.
with the voltage across the shunt known and the current known (estimated from the precision resistor), one can estimate the shunt resistance that is connected in place with the current sense amplifier.
 
Last edited:

TeeKay6

Joined Apr 20, 2019
573
recently i've been looking at measuring currents using an mcu. and one of those things that keep coming back are the shunt wires.
while i'd guess many people would simply buy pre-made shunt resistances, the low costs ones aren't really expensive, but that literally even very slight connections variation between the shunt and the measuring device e.g. a current sense amplifier would have changed those milli-ohms and affects the accuracy of the measurements.
given this i've decided to make do with simple bare nichrome or constantan wires

here is a little python script
Code:
#!/usr/bin/python3


import math

resistivity = { 'nichrome' : 1.1E-6, \
'constantan': 4.9E-7}

# mat material
# d diameter mm
# R needed resistance milli ohm
def calcres(mat, d, R):
    print(mat)
    print ('diameter : ' + str(d) + ' mm')
    r1 = d * 1E-3 / 2.0
    a = math.pi * r1 * r1
    print ('resistivity : ' + str(resistivity[mat]) + ' ohm.m')
    print ('resistance : ' + str(R) + ' milli ohm')
    l = R * a / resistivity[mat]
    print ('length : ' + str(l) + ' mm')

#50 milliohm
ohms_needed = 50
#wire dimeter mm
d = 0.5
calcres('nichrome', d, ohms_needed)
print('')
calcres('constantan', d, ohms_needed)
and sample run
Code:
nichrome
diameter : 0.5 mm
resistivity : 1.1e-06 ohm.m
resistance : 50 milli ohm
length : 8.924979129516457 mm

constantan
diameter : 0.5 mm
resistivity : 4.9e-07 ohm.m
resistance : 50 milli ohm
length : 20.035667433608374 mm
this would let you estimate the length of wire needed, and the somewhat harder task would be to literally measure that resistance.
i'd guess things like kelvin bridges would help but that it isn't easy to make a good kelvin bridge and the precision parts may be costly.
but if extreme precision (and accuracy) isn't too critical, one could use precision resistors that cost modestly higher to calibrate the shunt that is perhaps soldered in place with its current sense amplifier. in this way using the precision resistor in series with the shunt, one could estimate the currents from the voltage measurements i = v/r.
the current sense amplifier will amplify the voltage across the shunt so that it is within the voltage granularity of conventional adcs common to micro controllers.
with the voltage across the shunt known and the current known (estimated from the precision resistor), one can estimate the shunt resistance that is connected in place with the current sense amplifier.
@ag-123
Why not consider a Kelvin connection to the shunt?
 

Thread Starter

ag-123

Joined Apr 28, 2017
276
a main thing with kelvin bridges
@ag-123
Why not consider a Kelvin connection to the shunt?
i realized that what i'm doing is pretty similar to a kelvin connection to the shunt during the shunt calibration stage
https://en.wikipedia.org/wiki/Four-terminal_sensing

the idea is this, kelvin connection
Code:
               +------(power) ---- (A) ------- +
               |          +- (V) -+            |
               + -------- +-  R  -+ -----------+
(A) is an ammeter, (V) is a voltmeter, R is the shunt resistance being measured
in place of A is my precision resistor of known resistance, but that it is higher than R.
This is so that the mcu can measure the voltage across (A) and I = V / Rref where Rref is the known resistance.

The issue is ordinarily the mcu adc can't measure (V) as R the shunt resistance is in the order of say 10 milli ohms to 50 milliohms, it is too low for the ADC to measure. So (V) the voltmeter in this case is my current sense amplifier (an accurate gain is required for this), with that amplification,
the mcu can measure the voltage across (R)

Hence, i used a standard resistor and voltage measurements as a substitute for my (A) (ammeter) and used a current sense amplifier in place of (V) to magnify the voltage so that the ADC can measure it. But of course, what is implicit here is that i deemed i'm able to measure the voltage accurately.

once the R (shunt) value is determined, i can then use the current sense amplifier with the shunt in place as an ammeter and the amplification would allow my mcu with adc to compute the currents
 
Last edited:

crutschow

Joined Mar 14, 2008
34,280
The usual way this is done is to use an accurate shunt resistor in a kelvin connection, and amplify the shunt voltage with an accurate differential/instrumentation or current-sense amplifier to the the voltage range you want for the mcu input.
 

Thread Starter

ag-123

Joined Apr 28, 2017
276
thanks and yup, it seemed i'm doing something pretty close to it this time round. But without an ammeter, i resort to using precision resistors as references to calibrate the shunt
 

SLK001

Joined Nov 29, 2011
1,549
Depending on the accuracy that you require, you also have to measure the temperature of the current shunt, because they change value over temp.
 

Thread Starter

ag-123

Joined Apr 28, 2017
276
thanks! my thoughts are to basically calibrate with different series standard resistors as reference, so that each time i work out the currents and voltages stochastically. i should pretty much arrive at the same shunt resistance for the different measurements.
i may use constantan wires as consantan has much better temperature coefficient compared to nichrome wires
https://en.wikipedia.org/wiki/Elect...stivity_and_conductivity_of_various_materials
however, i'd think nichrome is still ok for low to moderate currents like below 1 amp as 0.05 ohms generates 0.05 watts of power at 1 amp which is still pretty moderate
 
Top