Author Topic: Current Shunt?  (Read 8618 times)

0 Members and 1 Guest are viewing this topic.

Offline Thane of CawdorTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Current Shunt?
« on: December 01, 2013, 08:19:01 am »
Hi

I wanted to make a current sensor for up to 5A measurement ~10mA inaccurate, I've looked at some current shunt circuits but they all seem to use specialised chips that seem relatively hard to get. Is it possible to use a low value resistor and a simple op-amp (358 ect.) to amplify the voltage drop and read it via a microcontroller ADC pin?


Thanks  :D
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1289
  • Country: fi
Re: Current Shunt?
« Reply #1 on: December 01, 2013, 08:26:55 am »
Sure, it is possible, for varying values of "simple".
You may want to familiarize with the circuit called instrumentation amplifier. It has several features you will need depending on your measurement circuit details.
You need to deal with common mode voltages, offsets an biases to keep your output signal well behaved. All doable but frankly the lazy man's out is to get a proper current sense amplifier. If you really can't get them then this is the way to do it.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Current Shunt?
« Reply #2 on: December 01, 2013, 03:42:02 pm »
Hi

I wanted to make a current sensor for up to 5A measurement ~10mA inaccurate, I've looked at some current shunt circuits but they all seem to use specialised chips that seem relatively hard to get. Is it possible to use a low value resistor and a simple op-amp (358 ect.) to amplify the voltage drop and read it via a microcontroller ADC pin?


Thanks  :D

Yes.  Is the short answer.

10ma in 5A is 0.2%, so you'll need to use 10-turn trimmers, 0.1% or hand-matched resistors.  I'd use a couple of trimmers to set zero and gain.  Build a differential amplifier out of one half of your LM358 and another diff. amp out of the other one to scale it for your ADC.



https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline PA4TIM

  • Super Contributor
  • ***
  • Posts: 1161
  • Country: nl
  • instruments are like rabbits, they multiply fast
    • PA4TIMs shelter for orphan measurement stuff
Re: Current Shunt?
« Reply #3 on: December 01, 2013, 07:02:05 pm »
For a powermeter I used a strip of metal, around 3 cm long, I made it 10 mOhm.
www.pa4tim.nl my collection measurement gear and experiments Also lots of info about network analyse
www.schneiderelectronicsrepair.nl  repair of test and calibration equipment
https://www.youtube.com/user/pa4tim my youtube channel
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5026
  • Country: ro
  • .
Re: Current Shunt?
« Reply #4 on: December 01, 2013, 07:22:36 pm »
At 5 A , your current will warm up the current shunt which in turn will affect the measurement.

As you eventually process data in the microcontroller, I wonder if you could use a hall effect sensor type IC like the ACS714 : http://www.digikey.com/product-detail/en/ACS714ELCTR-05B-T/620-1258-1-ND/1955900

It does +/- 5A measurement but has an error of up to 1.5%. This is more than your 10mA, in fact it's up to about 60-80mA at 5A but since the current just passes through without current shunts  on the line that would heat up and deviate, the error rate should be pretty constant.

Maybe you could just pre-calculate the error percent at various currents and then improve the accuracy in the microcontroller by multiplying the result with some factors from a precalculated table?

 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Current Shunt?
« Reply #5 on: December 02, 2013, 09:07:23 am »
At 5 A , your current will warm up the current shunt which in turn will affect the measurement.

As you eventually process data in the microcontroller, I wonder if you could use a hall effect sensor type IC like the ACS714 : http://www.digikey.com/product-detail/en/ACS714ELCTR-05B-T/620-1258-1-ND/1955900

It does +/- 5A measurement but has an error of up to 1.5%. This is more than your 10mA, in fact it's up to about 60-80mA at 5A but since the current just passes through without current shunts  on the line that would heat up and deviate, the error rate should be pretty constant.

Maybe you could just pre-calculate the error percent at various currents and then improve the accuracy in the microcontroller by multiplying the result with some factors from a precalculated table?
Technically, your right.  Any amount of power dissipated by a shunt will 'warm' it up, although in practice it won't be an issue with a correctly sized shunt, certainly not for the accuracy required.

I'd go with a shunt over the ACS7xx series part for low levels, I love them, but they do drift, not cheap and a bit noisy - 10mA might be an issue. ACS7xx still have a resistance BTW.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline SArepairman

  • Frequent Contributor
  • **
  • Posts: 885
  • Country: 00
  • wannabee bit hunter
Re: Current Shunt?
« Reply #6 on: December 02, 2013, 01:14:27 pm »
the ultimate current shunt will have a temperature sensor on it. You determine the resistance at various temperatures and use those resistances to determine the more accurate current.

BEWARE
You may notice in a spec sheet of your shunt there may be a value for how many watts of dissipation there is per amp but this figure is just to give you an idea of whats going on, however, trying to use P=IV to subtract out the error will not necessarily be accurate unless you take account emissivity of the materials and your surrounding environment and from what temperature related researchers have told me that determining these factors is a real pain in the ass, it is done for physics experiments but not in a practical lab setting.

 This is the reason why temperature sensing with RTDs can be a pain in the ass, the only way you can fight is by lowering the stimulation current..... For instance you might think plugging in a RTD into a 6.5 digit multi meter is the bees knees until you realize that the multimeter is sending a whopping miliamp (or more) through the device, your resolution is nice but you are heating your sample and the sensor! Non trivial.

I don't know if its a good idea to epoxy a temperature sensor on a standard current shunt either... I might try this later. :-+

« Last Edit: December 02, 2013, 01:18:56 pm by SArepairman »
 
The following users thanked this post: oilburner

Offline SArepairman

  • Frequent Contributor
  • **
  • Posts: 885
  • Country: 00
  • wannabee bit hunter
Re: Current Shunt?
« Reply #7 on: December 02, 2013, 01:20:49 pm »
Isn't the alternative to temperature-calibrating the shunt, just to use a large piece of metal with it's resistance measured? as the thicker metal may not be as susceptible to temperature drifts created by the shunt.

Thanks

Sure. But keep in mind no matter how big it is it will get warm, you can (somewhat) easily measure very small differences in temperature (if you are interested in that kind of thing!) and these differences in temperature will effect your measurement. Once you make the shunt big enough the difference will be difficult to discern but to some extent the effect is always there.

I bought a little eBay hong kong shunt for 50A, I never used it, but I wonder how warm it gets... No one has ever done shunt experiments as far as I know... unfortunately I lack a stable high current source. I could of course just use a oven but whats the fun then....
« Last Edit: December 02, 2013, 01:31:09 pm by SArepairman »
 

Offline SArepairman

  • Frequent Contributor
  • **
  • Posts: 885
  • Country: 00
  • wannabee bit hunter
Re: Current Shunt?
« Reply #8 on: December 02, 2013, 01:29:45 pm »
Also be aware of different materials that have different coefficients of resistance temperature change. Brass is twice as good as copper (despite having a slightly higher resistance). There are shunts that will change very little with changes in temperature, they are more expensive, but as usual you get what you pay for. Cupron is nice.


http://www.digikey.com/product-search/en/resistors/chassis-mount-resistors/66696?k=shunt
http://www.digikey.com/product-search/en/industrial-controls-meters/accessories/2949204?k=shunt


Also keep in mind that you can cool your shunts too... heat sinks, fans, anything to keep the error down

an informative guide:
http://www.vishay.com/docs/49159/49159_pl0005.pdf


best I managed to quickly find...
http://www.precisionresistor.com/PLV2-2W-Wire-Wound-Precision-Power-4-Terminal-Axial-Shunt.html

But keep in mind, no matter how you cool it *unless you use a peltier cooler or refrigerator* if the ambient temperature goes up then the error will go up, so you can make a super duper awesome heatsink for your crappy shunt but if its a hot day in a hot room next to a hot machine you will have an unavoidable error.
« Last Edit: December 02, 2013, 01:39:24 pm by SArepairman »
 

Offline PA4TIM

  • Super Contributor
  • ***
  • Posts: 1161
  • Country: nl
  • instruments are like rabbits, they multiply fast
    • PA4TIMs shelter for orphan measurement stuff
Re: Current Shunt?
« Reply #9 on: December 02, 2013, 02:13:34 pm »
How would you measure that resistance? My DMM doesn't go that low. Did you use the four wire measurement technique or buy it like that.

Quote
10ma in 5A is 0.2%, so you'll need to use 10-turn trimmers, 0.1% or hand-matched resistors.  I'd use a couple of trimmers to set zero and gain.  Build a differential amplifier out of one half of your LM358 and another diff. amp out of the other one to scale it for your ADC.


I can measure that in several ways and that is what I did.
First I used a 7,5 digit meter and 4 wire to get close. Then
I made a ratio measurement with a ESI standard resistor and a 7,5 digitVolt meter. (using DC from a Fluke calibrator)
I used a current calibrator (that can source 10A AC and DC) and measured the voltage over the shunt
I checked it on two GR LCR bridges and with my IET DE5000. Later I checkecd the powermeter bij using the same gear to check if power was displayed the right way. 

The tempco can be problem but you can use trhat in your advantage. I used a circuit from Bob Pease and he knew the tranistors had a 3000 ppm tempco. He used a 1 mOhm shunt with a oposite 3000 ppm tempco.

For me it was just a fun project to investigate and try it. I'm now working on it's big brother. It is TRMS and you make it in half an hour. You use a multimeter as read out.

0,01 Ohm at 5A is a voltdrop of 0.05V so that is 250mW. If tempco is 1000 ppm then the shunt changes 1 uOhm./C so lets say it rises from 25 degrees to 100 degrees that is 75 uOhm and then it becomes 0,01075 and the voltdrop at  5A will be  0,05375V. The calculated current reading from that will be 5,375A or 7%. And that is not bad because I think you need a lot more power to get it at 100 degrees.

On the project I'm now working I monitor the shunt temp and I will measure the tempco of the shunt (a commercial 0.1 Ohm power resistor) and figure out trhe correction needed for the tempco. The software then will correct the tempco.

Here you find the schematic and pictures from the shunt. That was the quick and dirty version. It worked so well I made a better PCB and now the shunt is connected straight in between to terminals and hanging free for safety.
http://www.pa4tim.nl/?p=4751
« Last Edit: December 02, 2013, 02:17:22 pm by PA4TIM »
www.pa4tim.nl my collection measurement gear and experiments Also lots of info about network analyse
www.schneiderelectronicsrepair.nl  repair of test and calibration equipment
https://www.youtube.com/user/pa4tim my youtube channel
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Current Shunt?
« Reply #10 on: December 02, 2013, 03:07:36 pm »
0,01 Ohm at 5A is a voltdrop of 0.05V so that is 250mW. If tempco is 1000 ppm then the shunt changes 1 uOhm./C so lets say it rises from 25 degrees to 100 degrees that is 75 uOhm and then it becomes 0,01075 and the voltdrop at  5A will be  0,05375V. The calculated current reading from that will be 5,375A or 7%. And that is not bad because I think you need a lot more power to get it at 100 degrees.

1000ppm would indeed be pretty crap.  Something like the Bourns PWR4412-2S in 0.01ohm ($1 in singles) is 20ppm/C, even the Ohmite 4 wire RW series is only 50ppm/C.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline SArepairman

  • Frequent Contributor
  • **
  • Posts: 885
  • Country: 00
  • wannabee bit hunter
Re: Current Shunt?
« Reply #11 on: December 02, 2013, 11:43:24 pm »
How would you measure that resistance? My DMM doesn't go that low. Did you use the four wire measurement technique or buy it like that.

Quote
10ma in 5A is 0.2%, so you'll need to use 10-turn trimmers, 0.1% or hand-matched resistors.  I'd use a couple of trimmers to set zero and gain.  Build a differential amplifier out of one half of your LM358 and another diff. amp out of the other one to scale it for your ADC.


I can measure that in several ways and that is what I did.
First I used a 7,5 digit meter and 4 wire to get close. Then
I made a ratio measurement with a ESI standard resistor and a 7,5 digitVolt meter. (using DC from a Fluke calibrator)
I used a current calibrator (that can source 10A AC and DC) and measured the voltage over the shunt
I checked it on two GR LCR bridges and with my IET DE5000. Later I checkecd the powermeter bij using the same gear to check if power was displayed the right way. 

The tempco can be problem but you can use trhat in your advantage. I used a circuit from Bob Pease and he knew the tranistors had a 3000 ppm tempco. He used a 1 mOhm shunt with a oposite 3000 ppm tempco.

For me it was just a fun project to investigate and try it. I'm now working on it's big brother. It is TRMS and you make it in half an hour. You use a multimeter as read out.

0,01 Ohm at 5A is a voltdrop of 0.05V so that is 250mW. If tempco is 1000 ppm then the shunt changes 1 uOhm./C so lets say it rises from 25 degrees to 100 degrees that is 75 uOhm and then it becomes 0,01075 and the voltdrop at  5A will be  0,05375V. The calculated current reading from that will be 5,375A or 7%. And that is not bad because I think you need a lot more power to get it at 100 degrees.

On the project I'm now working I monitor the shunt temp and I will measure the tempco of the shunt (a commercial 0.1 Ohm power resistor) and figure out trhe correction needed for the tempco. The software then will correct the tempco.

Here you find the schematic and pictures from the shunt. That was the quick and dirty version. It worked so well I made a better PCB and now the shunt is connected straight in between to terminals and hanging free for safety.
http://www.pa4tim.nl/?p=4751

How do you feel about a peltier stabilized current shunt? I saw several circuits in application notes for peltiers cooled/heated oscillators and CCDs.
How are you bonding your temperature sensor to the resistor?
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3442
  • Country: us
Re: Current Shunt?
« Reply #12 on: December 03, 2013, 06:31:46 am »
I think at 5A+-10mA, the complications may not be necessary.

(1) Say you use a 0.1ohm resistor, at 5A, the burden voltage is 0.5V.  0.5V is a lot, so probably a smaller resistor is preferred.  But even at that 0.5V, you are talking just 2.5watt.  Even a small 1" fan can cool your shunt adequately well.  To get a lower burden voltage, say running a pair of 0.1ohm in parallel, you are down to 0.25v drop and merely 1.25watt.  Get 4 in parallel and you are down to 0.62watt heat and mere 0.125v drop. 

(2) If you are going with the trouble of calibrating, getting 0.2% accuracy with even a lowly ATMEGA328 is doable.  If you get a reasonable 12bit adc, that would make the job a lot easier.  But for good calibration, it takes patience - lot of it.

(3) I don't think individual component accuracy is as necessary as consistency.  So what if 2.3V across the shunt is measured as 1.7v, as long as it is the same all the time, your MCU can translate that with good calibration data.  You need resolution (more bits from the adc) and consistence.

I made an ATMEGA328 based volt logger not so long ago.  I use the UT61E to calibrate the volt logger.  If I do not change/unplug/touch the test-lead wires between calibration and verification, I can get around 0.2% "accurate" from about 50mV to 200mV readily.   When I plug/unplug test leads, that change in the contact resistance/quality introduces 1-2mV error.  My 0-200mV range is OpAmp multiplied to be 0-5V for the ADC.  Accuracy here means agreeing with my the device (UT61E) I used to calibrate the ATMEGA.  If I am to solder the test-lead directly to the shunt as oppose to a plug-in wire, getting below 0.2% error 50mV to 200mV is rather doable even with the lowly ATMEGA328.

I think with a good (consistent) 12bit or 16bit ADC, 5 to 10 0.1ohm shunt in parallel, it should be a cake walk.

Making the calibration table is the key.  The more effort there the more accurate the result  You can make all kinds of adjustments there with your MCU code and even correct for the non-linear aspect of the OpAmp and %error in the "not exactly 0.1" 0.1ohm resistor.

Calibration I did was to sweep the voltage within the range (ADC=0 to max), log what the ADC reading is, and log the real voltage (in my case UT61E) readings as you sweep.  Have the logging program store them into a text file, and make an adjustment table(s) from them.  In short, your ADC reading is not a variable to calculate the result but rather an index into the "real reading table".  So, say you store ADC=40 and real reading is 4.333v and the system is consistent, you don't need to care what ADC=40 should calculate to based on your multiplier or resistor values.  Instead, just look up the stored table for the real voltage.  If your average ADC reading is 40.5 for that sampling period, then you interpolate the mid point between the 40 and 41 readings.  Works very nice, takes care of any non-linearity, resistors not being exact, so forth.  As long as consistency is there, you get back the exact calibrated value.  But it is a lot of work to program a calibration scheme and do the calibration.

With my volt logger, it takes me 2-3 days to calibrate each range "quick".  I had 7.  So, I accepted less than best.  I also had to squeeze 20 "calibration tables" in to 32K of flash, so that was a lot of work in working up a scheme there too.  I can see spending a week or two to sweep the voltage and correcting the calibration table entries afterward to make fine-fine-and-refined adjustments if you want very very good results.

Rick
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf