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.
- 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?