Practical Sensors: The Hall Effect

Measuring a magnetic field can be very easy with some pretty low tech, or it can be very high tech. It just depends on what kind of measurement you need and how much effort you want to expend. The very simplest magnetic sensors are reed switches. These are basically relays with no coil. Instead of a coil, an external magnet gets close enough to make or break the contacts in the reed. You see these a lot in, for example, door alarm sensors.

Then again, there’s no real finesse to a reed. It changes state when it sees enough of a magnetic field and that’s about all. You could use a compass with some sort of detection on the needle to get some more information about the field, but not much more. That was, however, how early magnetometers worked. Today, you have lots of options, including the nearly ubiquitous Hall effect sensor.

You might use a Hall effect to measure the magnetic button on a keyboard key coming down when you press it or the open and closed state of a valve. A lot of Hall effects see service as current monitors. Since a coil generates a magnetic field proportional to the current through it, a magnetic sensor can estimate the current in a coil of wire without any physical contact. Hall effects can also watch a magnet go by in a linear motion system or a rotating system to get an idea of position or speed. For example, check out this brushless motor controller that uses three sensors to understand the motor’s position.


Edwin Hall identified the effect in 1879. The basic idea is simple: an electrical conductor carrying current will exhibit changes due to an external magnetic field nearby. These changes show up as voltage you measure across the conductor. Normally, the voltage across a conductor will be nearly zero, but with a magnetic field, you’ll get a non-zero reading in proportion to the magnetic field strength in a particular plane, as we’ll see shortly.

Hall effect sensors are just one type of modern magnetometer. There are many different kinds including those that use inductive pickup coils that may or may not rotate or a fluxgate, which is a special type of coil. Some use a scale or a spring to measure force against another magnet — sometimes microscopically. You can even detect a magnetic field using optical properties like the Kerr effect or Faraday rotation.

Then you get into the really exotic sensors. You can also measure proton resonance in hydrogen-rich materials like kerosene or detect energy states in gasses like cesium. Superconducting coils are also on the menu.

Still, Hall effects, especially those using semiconductors, are cheap and plentiful. They are also small. It is hard to imagine your PC keyboard using a superconducting coil to pick up small magnets glued to the bottom of the keys.

How Does it Work?

We like the video from [rcmodelreviews] that talks about the theory behind the Hall Effect (see below). however, the explanation is pretty simple even with no video. Consider a conductive sheet shaped like a dollar bill. Connected across the left and right sides is a constant voltage source, causing a current to flow through the conductor. If you measure the voltage — the Hall voltage — across the top and bottom of the bill, you’d expect the voltage to be nearly zero if the conductor is any good. With no magnetic field present, you would be right. The voltage across the top and bottom will be practically zero volts.

However, when a magnetic field is present with flux lines at right angles to the bias current, a Lorentz force acts on the electrons — or other charge carriers, such as holes — and they will bend away from the force as you can see in this animation. This will cause electrons to group together on one side of the conductor and tend to be absent from the other side.

Hall effect animation is by [FraunhoferIIS], CC-BY-SA-4.0.

This causes the two sides to have different charges, and where we have a charge differential, we must have a voltage. In the animation, you can see the battery providing the current flow and the meter measuring the Hall effect voltage as the horseshoe magnet applies different magnetic fields to the device.

A practical device will have additional circuitry. Usually, there’s an amplifier for the Hall voltage. Sometimes there’s a regulator for the bias voltage. A digital output sensor may have a comparator and an output transistor, too.

Reading the Datasheet

Every device is different, so it pays to read the datasheet for the one you want to use. Hall effects generally have limitations on frequency range and can be rather expensive. Melexis, for example, has a 250 kHz device, and that’s much faster than many other similar products. That particular device requires 5 V and less than 15 mA to operate.

From the datasheet, you can see there are two versions. One can operate up to about 7.5 millitesla and the other works around 20 millitesla. There’s even a version that can work to 60 millitesla. Of course, there are many other choices from other vendors with different parameters.

Some sensors output a voltage proportional to the sensed magnetic field or you can get a digital on/off type sensor. Obviously, if you expect to deploy a sensor, you’ll need different support for whichever sensors you choose to use. In some cases, you don’t even need an external device. The ESP32, for example, has its own Hall effect built in, as you can see in this video.

Building with Hall Effect Sensors

If you want to build your own Hall effect projects, there are plenty to choose from. A portable magnetometer is quite simple and lives in a Tic Tac box. If you are measuring current, you might want to use a device that contains not just the Hall effect sensor, but everything else you need, too.

Or, why not build something new? If you do, though, be sure to send us a note on the tip line, so we can spread the word about your latest creation.

22 thoughts on “Practical Sensors: The Hall Effect

        1. Well that depends on the speed, according to Einstein, the faster you go, the more energy you have so you save some by going faster. But my fluxcap weighs around 20 tons so it’s easier/simpler to “up the voltage” (Real Genius quote).
          Of course that means I have to find twice as many suppliers as in the ideal case but a brilliant young friend from Texas found an alternative supply, by contacting smoke alarm makers and recycling their defect units. I’m not sure Americium blends well with plutonium but you know, Science !

    1. Using a flux capacitor is risky as you’re not always able to measure the capacitance because it is always in a state of flux.With that in mind, you risk the output becoming a Monty Hall Effect!

  1. If you got a hall effect throttle on an ebike or scooter you can use some multiturn pots to adjust how it reacts. The cheap ones usually require some adjustments on the hall sensor or magnet to get a nice smooth throttle response.

    1. Uh, a magnetocardiogram application wouldn’t use anything remotely like a Hall sensor. You need something a trillion times better SNR. What sensor are you actually using? Is that TDK device actually shipping to mere mortals (with finite budgets) yet?

    2. Excellent progress! Back when I had limited exposure to NMR spectroscopy and resources, I wondered about the progression of earth-field or lower magnetic field NMR for more benchtop applications without the liquid gases required.

      Wondering about the applications of the MR magnetic sensor for NMR and MRI’s now?

      Will be interesting to see how the market develops since I do see the benchtop NMR’s finally out that don’t requiring the liquid gases to cool the magnets and with the SQUID designs those detectors.

      Also, wondering what other electrophysiological modalities can be studied and characterized for diagnostic utility using the MR magnetic sensor?

  2. What, no mention of the coolness of the various sensors that use diametric magnets to produce absolute position? AS-5048 and AS-5600 variants arevpretty neat little Hall effect sensor ICs that use a disc magnet whose face is split between + and – down the center, so that when the magnet rotates on a shaft for example, the sensor “knows” exactly which position in 360 degrees of rotation it is in, even if the power is cut and reactivated. It’s a pretty fascinating Hall effect variant if you are asking me!

    1. Oh that is cool! I think I was reading some datasheets the other day for Hall effect sensors that were intended for electronic throttle position sensor for cars, and were some absolute or maybe multi axis thing? It had something to do with a special magnet which is why your comment reminded me.

    2. Automotive steering angle sensors commonly use this, with 2 small gears with different ratios, each with such a magnet in the middle, and this way an absolute position can be determined over a number of rotations (about 5-6), because they measure the angle of both gears, and each set of angles translates to a unique multi-turn angle of the steering wheel.

    1. The Kerr effect is the well-known electrooptical effect, as (e.g.) a Kerr cell shutter.
      The very different magneto-optical Kerr effect might best be known for its application in reading magneto-optical discs.
      The author neglected to point out the important distinction.

  3. I just recently learned about an interesting application of Hall sensors, which is to use them for reading linear position encoders. In that case, the encoders stripes are basically made of magnetic foil (like the stuff that sticks onto a fridge door). I’ve heard that those type of encoders are used in elevators, as optical encoders might produce false readings once they get dirty. Since magnet foil is easy to obtain, that principle could be also useful for all kinds of DIY builds where high resolution doesn’t matter.

    1. Don’t forget to use a pair of them, spaced 90 degrees apart, so to get a quadrature signal so you can distinguish direction too (not just speed).
      Bonus points: read them in analog and you can multiply your resolution one or two orders of magnitude, depending on how goo your calibration is.
      Or use the pre-built periodic magnet+hall sensor arrangements found in many 3.5″ floppy disk drives, and use it for a nifty high-resolution rotary encoder for a handwheel. These are usually 3-phase (not quadrature), but the math is only a bit more difficult.

  4. can you help me identify these elements and explain them in the hall effect sensor ?

    Primary sensor
    2. Variable conversion element
    3. Signal processing element
    4. Signal transmission
    5. Signal presentation/ recording

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.