Author Topic: Current metering hall effect vs shunt  (Read 8305 times)

0 Members and 1 Guest are viewing this topic.

Rover

  • Hero Member
  • *****
  • Posts: 788
Current metering hall effect vs shunt
« on: February 21, 2009, 04:28:05 PM »
I'm currently using 4 amploc hall effect sensros (zap 25) to meter inbound and outbound current on my 12 volt system (sensors to Max186 12 bit ADC to Basic Stamp to RF transmitter to PC to Web site) see http://www.rovr1.com/wind/  Data


I'm not thrilled with the accuracy and the temperature variation of the hall effect sensors and I am thinking of switching to a high side shunt (50 amp 50 mv drop 1 milli ohm) using a max4173H current sensor.


Has anyone done something similar?  I'm expecting the accuracy and reproducibility to increase using the shunts.


 

« Last Edit: February 21, 2009, 04:28:05 PM by (unknown) »
Rover
<Where did I bury that microcontroller?>

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Current metering hall effect vs shunt
« Reply #1 on: February 21, 2009, 12:27:48 PM »
Rover,


Used many hall sensor current shunts over the years.

Careful circuit design can eliminate many of the errors.


You mention temp drift problems, listed as 0.03%/c should not be significant unless getting 10's of deg temperature change? Why / how etc.


Have you calibrated the sensor?


Went to your web, did not find a circuit diagram (schematic). Have one?


Resistor shunts have their own problems, initial accuracy is big one, then temperature drift ext just like hall sensor. I like to use the wiring to be the shunt, biggest problem is temperature changes with copper.


Send more details will see if can figure out your problem.


Have fun,

Scott Beversdorf.

« Last Edit: February 21, 2009, 12:27:48 PM by (unknown) »

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Current metering hall effect vs shunt
« Reply #2 on: February 21, 2009, 12:44:29 PM »
Sesnors were calibrated at ~75 F


Sorry no schematic.. I should probably draw one up but time is time.  I know the hall effect sensors are rated at .03% but I'm not sure I buy that.. more like 3% .  Temperature range is roughly 20F to 110F , meter is outside. I'd rather not add temperature compensation to the circuit. Daily temp variation can be +- 40F


I prefer to use a standard shunt with a known resistance ( i can get the shunts for 12$ each - AllElectronics.com) , even factoring in the continous use factor of 66% (my loads usually run less than 30 amps), I should be within limits.

« Last Edit: February 21, 2009, 12:44:29 PM by (unknown) »
Rover
<Where did I bury that microcontroller?>

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Current metering hall effect vs shunt
« Reply #3 on: February 21, 2009, 04:07:58 PM »
Hall sensors output is ratiometric, if supply voltage varies so will output.

This can be canceled (nearly) by powering the ADC and Hall sensor from the same supply.


Hall sensor zero is half it's Vcc.

Important to have Hall and ADC on same supply, any supply change will be canceled.

if not same Vcc any difference will be seen as offset changing along with gain change.

I could go on but you catch the drift! Pun intended.


Rshunt has it own problems:

The Gain and offset of the Rshunt and amplifier must be calibrated out. The amplifier and ADC must be on same supply or have problems similar to Hall sensor. Temperature and voltage changes.

Resistors of the amplifier need to be matching type to temperature cancel.


Rshunt connections are another set of problems, wire to spade connector to terminal port on shunt. Must be kept clean, and sealed from weather. Over time the crimp or spade gets corroded, resistance goes up creating a fault in the wiring. Another set of wires going to Amplifier, often must be shielded kept short as possible etc.


With attention to details both methods work. Hall fewer less connections and less resistance in the wiring and is Isolated from the battery. Some believe Rshunt are more accurate. Allelectronics shunt is 0.5%, 4x better than Hall, yet after calibration should be the same. Most resisters have temperature coefficient, not listed on the shunts. To build the amplifier requires 1% resistors to stay within couple percent error, calibrated out yet how about over temperature? Rshunt grounds and supplies are now connected, definitely a place for problems.


Have fun,

Scott Beversdorf.

« Last Edit: February 21, 2009, 04:07:58 PM by (unknown) »

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Current metering hall effect vs shunt
« Reply #4 on: February 22, 2009, 06:39:34 AM »
I think I'm going to try the shunts and compare it to the Halls I already have running. The ADC and the hall sensors are all powered from the same 5v supply.


I'm not too worried about galvanic isolation at rShunt, and the meter is in a covered place, besides I will use screw terminals not spades.


The amplifier in this case is the MAX4173H which outputs a voltage with a final gain of 100 V/V. So starting with 50 Amp shunt 50mv full scale (1 milli ohm), I should end up with 0 to 5 volt out to the ADC which accepts 0 - 4.096 v. I'm not worried about the remaining volt since my currents never rise higher than 30 Amps (which will translate to 3 v to the ADC. Other than the shunt, I won't need to use any other resistors before the ADC, the only extra component will be a small cap on the output of the MAX4173

« Last Edit: February 22, 2009, 06:39:34 AM by (unknown) »
Rover
<Where did I bury that microcontroller?>

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Current metering hall effect vs shunt
« Reply #5 on: February 22, 2009, 06:51:26 AM »
I meant small cap on Vcc.. stupid of me

« Last Edit: February 22, 2009, 06:51:26 AM by (unknown) »
Rover
<Where did I bury that microcontroller?>

Opera House

  • Sr. Member
  • ****
  • Posts: 261
Re: Current metering hall effect vs shunt
« Reply #6 on: February 22, 2009, 09:32:36 AM »
I've always used running averages of 128 to get a value, noticed that you are only using ten and appear to start fresh each time.  With 12 bits we tend to waste them and not scale up our signals. an extra turn or more on hall sensor can reduce those errors.   Don't design the high end limit for the storm of the century, let it clip on those rare occasions.
« Last Edit: February 22, 2009, 09:32:36 AM by (unknown) »

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Current metering hall effect vs shunt
« Reply #7 on: February 22, 2009, 09:49:52 AM »
You mean you are taking 128 samples as a single reading?


128 would be nice but could give a factor of 500K + , One of the drawbacks of the 16 bit stamp is storage and the 65K math limit (yes there way around this, but you can't easily store a number greater than 65k)


I'm already using 5 channels of the ADC, memory adds up quickly.


If the stamp was only doing monitoring, not a problem, but my stamp has the following components



  1. RTC (real time clock)
  2. 900 MHZ tranceiver
  3. LCD display
  4. ADC


For logging I use a 1 minute interval average, 1 reading (10 samples) every 2 secs so readings over a minute are actually 10 * 30  or 300 with the sum of the 30 stored as well as max min values, so for each channel of the adc being used I'm saving off I'm using 3 words or 6 bytes of ram before transmission ( total is 6 * 5 channels) so 30 bytes. Then the variables are cleared and the cycle restarts


Unless I add an addtional eeprom (which I might do)

« Last Edit: February 22, 2009, 09:49:52 AM by (unknown) »
Rover
<Where did I bury that microcontroller?>

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Current metering hall effect vs shunt
« Reply #8 on: February 22, 2009, 09:56:31 AM »
Although, you are right on not taking advantage of the full bandwidth of the ADC, I'm using 5 v for the Hall sensor so max 2.5 going to the ADC out of a possible 4.09. No opAmp straight from sensor to ADC


My problem, really is the temp variance, up to 300 mA off of my initial calibration. I can stick a heater in the shed with the ADC and watch the readings change. (The change occurs much faster than the battery bank warming up)

« Last Edit: February 22, 2009, 09:56:31 AM by (unknown) »
Rover
<Where did I bury that microcontroller?>

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Current metering hall effect vs shunt
« Reply #9 on: February 22, 2009, 01:38:22 PM »
The MAX4173H has to potential limitations:

First: 28v Vbat limitation. (24v Vbat will exceed 28v specification.)

Second: reads current in ONE direction. Only charging or discharging currents.

Using two MAX4173H, one for each current direction and Two separate ADC ports then can get both.

For bidirectional see: (Don't know the Maxim parts as well as)

http://www.analog.com/en/amplifiers-and-comparators/current-sense-amplifiers/ad8210/products/product
.html

Good for 48v battery! Gain is 20v/v (need lower gain to keep within range for +-)


Suggest to put RC on output of the amplifiers you use. Does not take much noise to mess up a system.


What Schematic capture program do you use?

I use KiCad, open sourced includes PCB layout. Very good, nice library support.


Have fun,

Scott Beversdorf.

« Last Edit: February 22, 2009, 01:38:22 PM by (unknown) »

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Current metering hall effect vs shunt
« Reply #10 on: February 22, 2009, 04:43:46 PM »
not a prob this a 12v  system, as far what cad program... #2 pencil followed by ( if needed ) Corel... (not true 3d), Autocad  (at the office), TurboCad at home, ... various others ... freeware for board assembly / creation .
« Last Edit: February 22, 2009, 04:43:46 PM by (unknown) »
Rover
<Where did I bury that microcontroller?>

bobfandango

  • Newbie
  • *
  • Posts: 20
Re: Current metering hall effect vs shunt
« Reply #11 on: February 22, 2009, 06:14:02 PM »
Why high side?  If you do that, then you end up with the large common mode voltage that makes measuring the drop across the shunt that much more of a pain.  Put the shunt on the ground side and it opens up a lot of options for instrumentation amps....  


In that scenario, you have to run the instrumentation amp off of a voltage regulator. I've used an ADP3336.  This will keep the voltage to the instrumentation amp pretty constant across temperature and variations in the unregulated source voltage.  


For an instrumentation amp, try an ad8221.  


Anyhow, I'm using this combo with a labjack to keep track of power in and out.  I'm not sure what ADC you are using so other parts may be more suitable.  

« Last Edit: February 22, 2009, 06:14:02 PM by (unknown) »

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Current metering hall effect vs shunt
« Reply #12 on: February 23, 2009, 02:54:14 PM »
I'm using a http://www.dimensionengineering.com/datasheets/DE-SW0XX.pdf 5 volt switching PSU to power the controller, I have a small noise filter between the PSU and the controller. The PSU becomes the 5 volt Vdd for the controller, and all my sensors  etc are powered from that. The ADC is a maxim MAX186 8 channel, 12 bit.
« Last Edit: February 23, 2009, 02:54:14 PM by (unknown) »
Rover
<Where did I bury that microcontroller?>

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Current metering hall effect vs shunt
« Reply #13 on: February 23, 2009, 03:12:14 PM »
I prefer High side since it can detect shorts to ground much more easily. I'm also using a dedicated high side IC that takes most of work out of high side measurements, see max4173H from maxim , at 2$ a pop, sweet little units
« Last Edit: February 23, 2009, 03:12:14 PM by (unknown) »
Rover
<Where did I bury that microcontroller?>

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Current metering hall effect vs shunt
« Reply #14 on: February 23, 2009, 03:16:11 PM »
From the spec sheet of teh MAX4173


The MAX4173 low-cost, precision, high-side current-sense amplifier is available in a tiny SOT23-6 package. It features a voltage output that eliminates the need for gain-setting resistors and it is ideal for today's notebook computers, cell phones, and other systems where current monitoring is critical. High-side current monitoring is especially useful in battery-powered systems, since it does not interfere with the ground path of the battery charger. The input common-mode range of 0 to +28V is independent of the supply voltage and ensures that the current-sense feedback remains viable even when connected to a battery in deep discharge. The MAX4173's wide 1.7MHz bandwidth makes it suitable for use inside battery charger control loops.


The combination of three gain versions and a user-selectable external sense resistor sets the full-scale current reading. This feature offers a high level of integration, resulting in a simple and compact current-sense solution.


The MAX4173 operates from a single +3V to +28V supply, typically draws only 420µA of supply current over the extended operating temperature range (-40°C to +85°C), and is offered in the space-saving SOT23-6 package.

« Last Edit: February 23, 2009, 03:16:11 PM by (unknown) »
Rover
<Where did I bury that microcontroller?>

bobfandango

  • Newbie
  • *
  • Posts: 20
Re: Current metering hall effect vs shunt
« Reply #15 on: February 23, 2009, 05:30:52 PM »
Yeah, I've seen that part.  But I'm running 48v.  The parts I've seen have a high limit of 60 volts and equalizing the battery exceeds that.  


As for me, I always relied on the DC disconnect breaker to detect a short to ground.... ;)  Just kidding...  Yeah, my 180 amp MIG welder made me realize just how much melting of stuff can happen way before you get to 175 amps.... the rating on the breaker.  So yeah, I can see the utility of detecting some huge current surge due to a fault that is not enough to trip the breaker.

« Last Edit: February 23, 2009, 05:30:52 PM by (unknown) »

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Current metering hall effect vs shunt
« Reply #16 on: February 23, 2009, 05:40:44 PM »
Yep, although a 12v system has way more detractions than benefits (mine only powers marine stuff (although on land)) , there is the benefit of fitting into a lot of off the shelf components made forthe marine/auto industry
« Last Edit: February 23, 2009, 05:40:44 PM by (unknown) »
Rover
<Where did I bury that microcontroller?>

BigBreaker

  • Sr. Member
  • ****
  • Posts: 302
Re: Current metering hall effect vs shunt
« Reply #17 on: February 24, 2009, 09:51:44 AM »
I don't know the stamp very well but calculating a 128 step running average is easy without an intermediate large number.  You can drop bits as needed from each sample or from groups of samples to hold the average down.  You can also work with the difference from the previous sample rather than the value itself.


Also consider the analog solution...  hang a cap+resistor off the sensor and use fewer samples.

« Last Edit: February 24, 2009, 09:51:44 AM by (unknown) »