Current Shunt? - Page 1
Forum section: electronics / beginners

author: Thane of Cawdor
author_rank: Regular Contributor
timestamp: December 01, 2013, 08:19:01 am
content: HiI 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

author: Kremmen
author_rank: Super Contributor
timestamp: December 01, 2013, 08:26:55 am
content: 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.

author: fcb
author_rank: Super Contributor
timestamp: December 01, 2013, 03:42:02 pm
content: Quote from: Thane of Cawdor on December 01, 2013, 08:19:01 amYes. 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.

author: PA4TIM
author_rank: Super Contributor
timestamp: December 01, 2013, 07:02:05 pm
content: For a powermeter I used a strip of metal, around 3 cm long, I made it 10 mOhm.

author: mariush
author_rank: Super Contributor
timestamp: December 01, 2013, 07:22:36 pm
content: 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/1955900It 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?

author: fcb
author_rank: Super Contributor
timestamp: December 02, 2013, 09:07:23 am
content: Quote from: mariush on December 01, 2013, 07:22:36 pmTechnically, 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.

author: SArepairman
author_rank: Frequent Contributor
timestamp: December 02, 2013, 01:14:27 pm
content: 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.BEWAREYou 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.

author: SArepairman
author_rank: Frequent Contributor
timestamp: December 02, 2013, 01:20:49 pm
content: Quote from: Thane of Cawdor on December 02, 2013, 01:18:10 pmSure. 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....

author: SArepairman
author_rank: Frequent Contributor
timestamp: December 02, 2013, 01:29:45 pm
content: 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=shunthttp://www.digikey.com/product-search/en/industrial-controls-meters/accessories/2949204?k=shuntAlso keep in mind that you can cool your shunts too... heat sinks, fans, anything to keep the error downan informative guide:http://www.vishay.com/docs/49159/49159_pl0005.pdfbest I managed to quickly find...http://www.precisionresistor.com/PLV2-2W-Wire-Wound-Precision-Power-4-Terminal-Axial-Shunt.htmlBut 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.

author: PA4TIM
author_rank: Super Contributor
timestamp: December 02, 2013, 02:13:34 pm
content: Quote from: Thane of Cawdor on December 02, 2013, 09:05:49 amI 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. ThenI 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 shuntI 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

author: fcb
author_rank: Super Contributor
timestamp: December 02, 2013, 03:07:36 pm
content: Quote from: PA4TIM on December 02, 2013, 02:13:34 pm1000ppm 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.

author: SArepairman
author_rank: Frequent Contributor
timestamp: December 02, 2013, 11:43:24 pm
content: Quote from: PA4TIM on December 02, 2013, 02:13:34 pmHow 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?

author: Rick Law
author_rank: Super Contributor
timestamp: December 03, 2013, 06:31:46 am
content: 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