Summary of A Strange Attraction. Various Hall Effect Sensors
Hall effect sensors detect magnetic fields and vary in type, including digital switches, latching, and linear ratiometric outputs. They operate based on magnetic field strength (Gauss) and distance from the magnet. The article highlights three specific sensors: OPTEK OH090U, Melexis US1881, and Allegro A1321. It details the OH090U as a digital switch with Schmitt triggering, requiring a pull-up resistor for proper operation.
Parts used in Hall Effect Sensor Project:
- OPTEK Technology OH090U
- Melexis US1881
- Allegro A1321
- Capacitor
- Resistor 500-860Ω
I came pretty close to calling this one “Magnets, How do they work?” But I thought that might confuse more than it would amuse. All jokes aside, hall effect sensors are pretty cool, and also pretty simple to use, but there are a few types you may not know about and I figured it would be a good time to introduce them incase your next project was In need of sensing some magnetic forces.
If you don’t know, a hall-effect sensor is a device that reacts to a magnetic field. The most common reaction being the sensor acting as a digital switch “turning on” in the presence of a strong enough magnetic field. And actually most people when first looking into them only know of these. But the reality is that there any many different types, from ones that output an analog signal depending on the strength and polarity of a magnet, to ones that latch on when a strong enough field is sensed, but won’t unlatch until an equally strong, opposing field is sensed.
Hall effect sensors are all rated to work with a specific strength of magnet field (measured in Gauss) which dissipates with distance from the magnet. Just like sound, it is softer when you are further away from the source. The only reason this is important, is because the distance a magnet needs to get to one of these sensors to trigger it is totally dependent of the magnets strength. So a really powerful magnet will trigger the sensor from a greater distance than a weak magnet. Sounds obvious I know, but these sensors also have a max Gauss rating as well. So, too powerful of a magnet, getting too close, can mess them up and eventually break them. Most sensors are sold in a wide range of sensitivity. The 3 in this article work well with household magnets, but if you need ones to work with very strong magnets, they are available.
The 3 sensors we will be going over are:
OPTEK Technology OH090U – Simple Hall Effect Sensor
Melexis US1881 – Latching Hall Effect Sensor
Allegro A1321 – Ratiometric Linear Hall Effect Sensor
OPTEK Technology OH090U
The OH090U (available from digikey at $1.75) is probably what you think of when you think of a hall effect sensor, this guy acts just like a digital reed switch, when a magnetic field gets close enough, it switches. In the case of the OH090U, it switches LOW. So when no magnetic field of the minimum trigger value is sensed, the OH090U output pin will be equal to the source voltage (4.5V to 24V), and when a field of the minimum trigger strength is within range, the output pin will be ground, or 0v.
One nice thing about the OH090U is that it schmitt triggers. Meaning there is a gap between when it triggers on, and triggers off. So if the sensor triggers on at 90 gauss, it wont release until it drops below 65 gauss. This keeps it from triggering on/off/on/off if a magnet is right on the cusp of that minimum trigger spot.
Hooking It Up
The doc sheet for the OH090U says you need a capacitor between ground and the out pin, however, in my testing, it worked perfectly without it. This is probably to smooth out the signal, and 95% of the time, this is going to be ok with out the capacitor, but if you plan on using this for automative purposes or other situations that could put people in harm’s way if it were to misfire, use the capacitor, seriously. The sensor does need a 500-860Ω resistor between VCC (V+) and the output pin for it to work.
For more detail: A Strange Attraction. Various Hall Effect Sensors
- How does a hall effect sensor react to a magnetic field?
The most common reaction is acting as a digital switch that turns on when a strong enough magnetic field is present. - Can too powerful of a magnet break a hall effect sensor?
Yes, if a magnet is too powerful and gets too close, it can mess up and eventually break the sensor. - Does the OPTEK OH090U require a capacitor to work?
Testing showed it works perfectly without one, though the datasheet recommends it for smoothing signals in critical applications. - What resistor value is needed for the OPTEK OH090U?
The sensor needs a 500-860Ω resistor between VCC and the output pin to function correctly. - What happens if a magnet is at the cusp of the trigger spot?
Schmitt triggering creates a gap between on and off points, preventing the sensor from flickering on and off rapidly. - How does distance affect the triggering of these sensors?
Magnetic field strength dissipates with distance, so a powerful magnet triggers the sensor from further away than a weak one. - What is the operating voltage range for the OPTEK OH090U?
The source voltage ranges from 4.5V to 24V. - What output state does the OPTEK OH090U produce when triggered?
When a minimum trigger strength is sensed, the output pin goes to ground or 0v.
