Hall effect vs. reed switch: Magnetic sensor comparison

By Jeremy Cook

Hall effect sensors vs. reed switches: Exploring types of magnetic sensors

Hall effect sensors and reed switches are both used to sense magnetic fields. There’s a significant amount of crossover between the two, applications-wise, but they operate in very different manners. Either sensor may be acceptable in some situations, while one type may have significant advantages in others.

In this article, we will define each type of magnetic sensor and explore their relative strengths and weaknesses. We’ll also provide simple examples of use cases for each, taking advantage of the “secret” Hall effect sensor hidden inside the popular ESP32-WROOM-32E module.

What is a Hall effect sensor?

See related product

TLE49631MXTSA1

Infineon Technologies AG Hall Effect Sensors View
The TLE49631MXTSA1 from Infineon Technologies AG is a popular Hall effect sensor option on Arrow

Hall effect sensors take their name from American physicist Edwin Hall, who discovered the voltage effect of a magnetic field on an electrical conductor in the late 1800s. This “Hall voltage,” when adequately amplified, can be read by a microcontroller. Modern Hall effect sensors typically include an amplifier and other electronics in the unit’s package.

Depending on how they are set up, these sensors can output a digital or analog signal. Unlike reed switches, Hall effect sensors respond to the presence of a magnetic field and can also sense the field’s amplitude and orientation. So, a sensor could output a positive analog for one magnetic orientation and a negative analog signal for the other. This principle can also be incorporated as a latching capability, turning on when one orientation is sensed and turning off only when it senses the opposite orientation.

As digital devices, Hall effect sensors aren’t subject to signal bouncing, and this output can be tuned at the factory via the supporting electronics package. Hall effect sensor packages use current at all times to sense magnetic fields, potentially making them less appropriate for very low-power applications.

What to know about reed switches

 0423-Reed-switch-continuity-testing-body-1

Reed switch continuity testing by Jeremy Cook

See related product

59045-010

Littelfuse Switch Reed View

Littelfuse 59045-010 Reed Switch on Arrow

Reed switches were developed in the early 1900s. They are mechanical contacts that are actuated by applying an external magnetic field. Surrounding these internal switching contacts is a glass enclosure filled with inert gas, out of which external connections emanate. Reed switches are typically set up as normally open but can also be normally closed, and come in other configurations as well.

Reed switches can be activated by a permanent magnet for sensing or via a generated electrical field as a reed relay. No current is needed when off and waiting for a magnetic signal, potentially saving significant power during long standby times.

As mechanical devices, reed switches are subject to switch bouncing and thus have a settling time. The sensing operation is binary. Reed switches cannot be employed to sense the amplitude of a signal beyond the turn-on threshold.

Learn more about how reed switches work and when to use them.

Reed switch vs. Hall effect main differences

Here’s a list of aspects to consider when choosing between a Hall effect sensor vs. a reed switch:

  • Reed switches have a bounce/settling time that needs to be considered.
  • Reed switches use no power in an open state.
  • Reed switches are binary devices; they cannot tell between magnetic north and south poles.
  • Hall effect sensors are digital devices; they do not experience a physical contact bounce.
  • Hall effect sensors constantly drain a small amount of current to sense the presence of a magnetic field.
  • Hall effect sensors can be configured as analog or digital devices; they can sense the direction of a magnetic field.

Be sure to examine the datasheet for each device for its specific characteristics.

Hall effect sensors and reed switches hands-on tutorial

0423-Hall-effect-sensor-and-reed switch-body-2

By Jeremy Cook

As a quick demo of how these two devices can be used, let’s first examine the Huzzah32 ESP32 development board from Adafruit. This board lays everything out nicely for the ESP32, including accommodations for a LiPo battery, but it doesn’t add any extra sensors. However, the ESP32-WROOM-32E module at the Huzzah32’s heart features a built-in Hall sensing unit.

0423-ESP32-Hall-sensor-results-with-100ms-delay-added-for-readability-body-3

ESP32 Hall sensor results, with 100ms delay added for readability by Jeremy Cook

On the Arduino IDE with the ESP32 module board definition installed, load up the Hall sensor ESP32 example code and open a serial plotter at 9600 baud. Place a magnet on top of the ESP32 to see it react. Flip the magnet and it will show an inverted value, signifying the flipped magnetic direction.

0423-Settling-time-in-under-a-microsecond--Huzzah32-used-for-3V-supply-body-4

Settling time in under a microsecond. Huzzah32 used for 3V supply by Jeremy Cook

To observe a reed switch’s operation, hook it up to a multimeter on the continuity setting. If normally open, it will stay disconnected with no magnet, then show a solid connection when a magnet is applied. From here, you could apply this input to a microcontroller (e.g., an ESP32), observe its settling time on a scope, or even use it to control something independently.

See related product

3405

Adafruit Industries View

See related product

59045-010

Littelfuse Switch Reed View

See related product

TLE49631MXTSA1

Infineon Technologies AG Hall Effect Sensors View

ArrowPerks-Loyalty-Program-Signup-banner-EN


Latest News

Sorry, your filter selection returned no results.

We've updated our privacy policy. Please take a moment to review these changes. By clicking I Agree to Arrow Electronics Terms Of Use  and have read and understand the Privacy Policy and Cookie Policy.

Our website places cookies on your device to improve your experience and to improve our site. Read more about the cookies we use and how to disable them here. Cookies and tracking technologies may be used for marketing purposes.
By clicking “Accept”, you are consenting to placement of cookies on your device and to our use of tracking technologies. Click “Read More” below for more information and instructions on how to disable cookies and tracking technologies. While acceptance of cookies and tracking technologies is voluntary, disabling them may result in the website not working properly, and certain advertisements may be less relevant to you.
We respect your privacy. Read our privacy policy here