Hall effect sensors detect whether a magnet is near. Useful for non-contact or waterproof type switches, position sensors, rotary/shaft encoders. When working with this switch, the stronger the magnet you have the further away you could be to cross the threshold and create a reaction.
General features of Hall effect based sensing devices are:
• True solid state
• Long life (30 billion operations in a continuing keyboard module test program)
• High speed operation – over 100 kHz possible
• Operates with stationary input (zero speed)
• No moving parts
• Logic compatible input and output
• Broad temperature range (-40 to +150°C)
• Highly repeatable operation
There are many Hall effect sensors. The main differences between them are if they work as analog or digital sensors, as well as if they are latching or not.
It is a linear (analog) hall effect sensor. This sensor does not have a wide operating voltage range, and is limited to 4.5 to 5.5V. When no minimum magnetic field is sensed, this sensor will output half of the source voltage, (2.5v). When the north side of a magnet approaches the face of the sensor, the output voltage will linearly ramp up to the source (5v) and when the south pole of a magnet approaches the face of the sensor, the output will linearly drop to ground (0V).
- Analog Output
- Supply Voltage: 4.5V – 5.5V DC
- Max Supply Current: 9mA
- Output proportional to magnetic flux density
At first I used a combination of the calibration and smoothing sketches for analog sensor from the Arduino examples sketches. When writing the sensor value onto a led pin, it is hard to see the effect.
Then I decided to try using the sensor as a digital input, with setting a threshold detection.
My own magnetic field was strong enough to create a change in the sensor – see video
Strengths – can be used as a proximity sensor and makes the interaction feel like magic.
Weakness – needs to be calibrated, limited to 5V and used as a voltage divider, so useful if that’s what you need to activate your output.
US1881 Hall Latch – High Sensitivity – this one is an integrated Hall effect latched sensor which means that whichever state the switch is left in, it will persist until the switch is actuated again. To switch the state, you will need to flip the sides of the magnet from North to South etc. From my understanding it would work kind of like a toggle switch.
- 3.5V to 24V DC operation voltage
- Low current consumption
- Temperature compensation
- Wide operating voltage range
- Open-Collector pre-driver
- 50mA maximum sinking output current
- Reverse polarity protection
- Bildr Tutorial
- Link to buy US1881 on Sparkfun $0.95 per unit
Someone recommended the AH1815-PB which is a Digital Switch Omnipolar Switch Open Drain Hall Effect 3-SIP. It’s description: Low-Power Hall-Effect Switch is a low-sensitivity, micro-power Omnipolar Hall effect switch IC. It’s designed for portable and battery powered consumer equipment for home appliance and industrial applications like smart-meter magnetic-tamper detection. Based on two sensitive hall- effect plates and a chopper-stabilized architecture, the AH1815 provides a reliable solution over the whole operating range. To support portable and battery powered equipment, the design has been optimized to operate over the supply range of 2.5V to 5.5V and consumes only 24μW with a supply of 3V.
- Link to buy AH1815-PB on digikey $0.70 per unit