Hall Effect Current Sensor: Doodles

Hanging a Hall effect sensor on an Arduino brings up the notion of building a DC current sensor that doesn’t depend on measuring the voltage across a resistor. This would be important for a battery-powered gizmo, where not dropping voltage in a sense resistor makes more voltage available for the load as the batteries discharge.

Pages 55-57 of that Honeywell booklet provides the outline: take a ferrite toroid with a cross-section larger than a linear Hall effect sensor’s package, cut a radial slit just barely big enough for the sensor’s thickness, wind N turns, and pass a current through the winding. Shazam! The sensor output varies linearly with the core flux, which varies linearly with the current, albeit subject to all the usual approximations.

Some variables:

  • Ia = air gap (cm)
  • Ic = mean length of core (cm)
  • I = winding current (A)
  • Bc = flux density in core (G)
  • Ba = flux density in air gap (G)
  • μc = relative permeability of core (dimensionless)
  • N = wire turns around core (dimensionless)

Yes, they use capital-eye for both length and current. They probably know what they’re doing. I don’t have to like it.

Assuming a narrow gap with respect to the cross-section, Ba ≈ Bc. Assuming the core isn’t close to saturation, then Ba is proportional to current, thusly:

Ba = (0.4 π · μc · NI)/(Ic + μc · Ia)

I wondered how the numbers would work for a typical ferrite toroid…

An FT50-43 toroid looks to be both the smallest ferrite core that will surround the sensor and the largest lump you’d want in a gadget. Some specs (that collection will be helpful):

  • 0.50 OD (inch) = 1.27 cm
  • 0.281 ID (inch) = 0.714 cm
  • 0.188 height (inch) = 0.478 cm
  • 0.0206 area (inch2) = 0.1232 cm2
  • 1.19 mean path length (inch) = 3.02 cm
  • μ = 850 (that’s “initial” permeability, with 2000 peak)
  • 2750 saturation flux (G) at 10 Oe
  • AL = 523 in weird units: N=√(nH/AL)

More toroid info, including some background and inches-per-turn tables, lives there. A good guide to building the things, with more tables, is there.

The sensors on hand seem to be 0.060 inch thick = 0.15 cm, although cutting an exact gap may be a challenge; a diamond slitting wheel in the Sherline may be needed for this operation. They claim a maximum flux density anywhere from 400 to 1000 G, depending on which datasheet extract you believe and whether the parts match their descriptions.

Running the numbers for the higher flux density:

1000 = (0.4 π · 850 · NI) / (3.02 + 850 · 0.15) = 8.2 · NI

Note that the air gap dominates the denominator, which makes sense.

Rearranging to solve for NI:

NI = 1000 / [(0.4 π · 850) / (3.02 + 850 · 0.15)] = 1000 / 8.2 = 122

Which means in order to have 1 A produce 1000 G at the sensor, I must cram 122 turns through that little toroid.

The inner circumference of the toroid works out to 0.88 inch if you ignore the gap, which means a single layer requires 122/0.88 = 138 turn/inch. Consulting the enameled wire tables, that’s AWG 34 or 35. I doubt overlapping a few turns makes any difference and I’m certain I can’t wind that many perfect turns anyway, so that spool marked 32-33 AWG / 8.5 mil might actually get used.

The Specialty Wire Box has a nearly full spool of AWG 44-½ wire (that grosses nearly half a pound and might reach NYC), but that’s just crazy talk; the stuff is 1.88 mil in diameter, almost exactly 1 RCH. There’s also a small solenoid coil wound with 4.5 mil wire (about AWG 37), still deep in the realm of craziness for winding that many turns by hand.

Working backwards, NI varies linearly with flux density, so 400 G would require NI = 49 and only 60-ish turn/inch. That’s AWG 26 enameled wire and seems much more sensible.

The gotcha is wire resistance: all this should offer less resistance than a sense resistor on the order of 100 mΩ. AWG 26 wire is 42 Ω/1000 ft = 42 mΩ/ft and FT-50 cores have about 0.6 inch/turn, so a 60 turn winding would be 3 ft long = 126 mΩ. The finer wires would be much much worse, so this is not a clear win despite its overwhelming geekiness.

An op amp could boost the output by a factor of 10, reducing the winding to a dozen turns and the resistance to 13 mΩ, even if you didn’t use bigger wire. I like that a whole lot better, although the amp must remove the Hall sensor’s nominal Vcc/2 offset to get a sensible range & output for DC current, assuming unipolar current. We have control over the current, so we could turn it off, measure the op amp’s offset at 0 mA, then send the offset (as a filtered PWM output) to the op amp’s inverting input.

A gain of 100 would give full-scale sensor output for 100 mA current, although I’d be suspicious of the overall accuracy and stability. For pretty-close measurements, like for LED current control, it might be Good Enough.

Given the reduced number of turns, you could do a bifilar winding and then buck the main current with a sampling current. That has the benefit of reducing the core flux to zero during the measurement, so the sense amp can have huge gain and the sensor maintains a large dynamic range. At the cost of a calibrated current source, of course, but … maybe with more buck turns than sense turns?

About these ads
  1. #1 by david on 2012-12-18 - 08:13

    In Fig 6-16, l-sub-c is clearly an ell and and an eye, so I vote ‘typesetting error’…

    • #2 by Ed on 2012-12-18 - 08:42

      All the really good letters have been used up, but at least they didn’t throw a lowercase-ell into the mix. Or maybe they did?

      The typeface on my Zire 71 had no visible difference between zero and capital-oh, which added another layer of encryption to passwords. When I transferred that database to the Kindle Fire, I discovered I’d been mis-entering some passwords forever

  2. #3 by madbodger on 2012-12-18 - 11:07

    I’ve been turning over similar things in my head recently (I need a high-side low-current sensor on a noisy high voltage signal). I hadn’t considered a hall effect sensor, that’s a creative approach. I had been looking at Rogowski coils and linearized opto-isolators. There are some high-side current sensing ICs, but they seem to either have a voltage limit (which I’m way over), they’re intended to measure high currents, or they need a floating power supply. Granted, the linearized optos also need a floating power supply, but the parameters seem to be considerably less strict.

    I didn’t know diamond slitting wheels were available, but it makes sense. A water jet cutter would be ideal, but I don’t have access to one. I wonder if I can cut ferrite neatly with a laser cutter. If I can, I wonder how much the heat would change the ferrite’s properties.

    Ah, the odd questions people like us end up pondering!

    • #4 by Ed on 2012-12-18 - 11:49

      a hall effect sensor

      You can actually buy Hall effect current sensors from Allegro. They’re good for 50 A, so you’d need ugly fiddling to get good resolution & stability at, say, 2% of full scale.

      I got a prototype current sensor (Thanks! You know who you are…) using those modules that requires a mu-metal shield to reduce the effect of ambient static magnetic fields, plus it has a manual zero button to null out what’s left. I’m sure a homebrew solution, even with a toroid, will have the same problem, which means the firmware must implement auto-zero from scratch.

      diamond slitting wheels

      Just picked up a pack o’ five at Harbor Freight. They’re for Dremel-class tools and surely have terrible concentricity, which means the grit will quickly rub off the tiny arc that touches the toroid, but … for a buck a pop, they should serve as a proof-of-concept.

      I’m thinking of embedding the toroid in a block of machinable wax to stabilize the operation, plus squirting cooling water on the cut. Yuch!

      • #5 by Jonathan Katz on 2012-12-18 - 20:08

        The allegros are availible on digikey at least down to +-5A with a sensitivity of ~185mV/A which is a bit better than the ~40mV/A of the 50A guys. They also come in a standard SOIC-8 package then instead of the very odd one in the 50A. About $3.80 each buying one at a time.

        • #6 by Ed on 2012-12-19 - 08:32

          a sensitivity of ~185mV/A

          Even though that still needs an amp to work with a plain old Arduino ADC input, that sounds more like a real solution.

          I feel a Circuit Cellar column comin’ on strong for the DIY version, if only because I could explore the magnetics, but I should also pick up a few of those sensors for comparison.

          Thanks for the pointer!

  3. #7 by Bill Rutiser on 2012-12-18 - 11:50

    Many years ago( JFK was the president), I got quite a bit of experience with an HP clip-on DC mA meter. The instrument had a split transformer core that clipped over a component lead or wire. The xfmr had several windings. One winding was excited with a sinusoidal wave in the high kHz. A second winding sensed the harmonics produced by the core saturating.
    A DC current fed into yet another winding in a feedback loop to minimize the harmonics. The feed back current was, of course, proportional to the current to be measured. The meter worked amazingly well and didn’t seem to be bothered by AC and RF currents in the wire. There was one big gotcha. The sensing current coupled into the circuit under test where it showed up on other instruments. I discovered all this while trying to resolve sporadic parasitic oscillations in a VHF telemetry transmitter.

    Instead of slitting the core, you might be able to grind away half of each of two cores, then reassemble them around the windings.

    • #8 by Ed on 2012-12-18 - 12:32

      The feed back current was, of course, proportional to the current to be measured.

      Of course it was: verily, there were giants in those days and they could figure that stuff out from first principles!

      The Tek AM503 Hall current probe amp I mooched from Eks seems to use a bucking current transformer driven by a power amp controlled by the Hall sensor. The block diagram on page 53 of the manual shows how it’s done, although the range switch on page 60 is one of their intricate cam cylinders that you could never duplicate.

      The probe uses a split ferrite core with a mirror-polished joint. Worksmanship like that, it is to die for.

      grind away half of each of two cores

      If things work out the way I expect, I’ll have plenty of fractional core pieces to work with… [sigh]

  4. #9 by Brent Crosby on 2013-09-20 - 13:41

    This would do it, no?

    Texas Instruments announced the new DRV411 Sensor Signal Conditioning IC for Closed-Loop Magnetic Current Sensors:

    http://www.ti.com/product/drv411

    • #10 by Ed on 2013-09-20 - 16:45

      That’s a driver for a bare Hall effect sensor element, of the kind I’ve seen only when peering through the encapsulation of that switch package and it definitely solves problems I didn’t even know I had… [sigh]

      The smart people say bucking the primary flux to zero makes life simpler and the output more accurate. For my simple (and very low current) needs, an uncompensated ferrite core seems to work pretty well; at higher current levels you probably can’t avoid core saturation without a buck winding.

      I should definitely run the numbers and make a few measurements on core saturation, because the core specs give the saturation flux density B for a specific primary H over the entire core circumference and I’m no longer sure I calculated that correctly.

  1. Red LEDs: Current vs. Voltage Sorting « The Smell of Molten Projects in the Morning
  2. Hall Effect Current Sensor: More Toroid Numbers « The Smell of Molten Projects in the Morning
  3. Slitting a Ferrite Toroid « The Smell of Molten Projects in the Morning