
- Stock: In Stock
- Model: A0311.US1881
US1881/U18/OH188 Hall-Effect Sensor
The US1881 (U18 / OH188) is a latching Hall-effect sensor designed to detect magnetic fields and provide a clean digital output. Ideal for Arduino, Raspberry Pi (with proper interfacing), and other microcontroller platforms, this compact device is widely used in automotive, industrial, and consumer electronics applications. When exposed to a magnet, it switches state and remains latched until the opposite pole is applied—enabling simple direction/polarity-aware switching.
✅ Key Features
- Latching digital output — one magnetic pole turns it ON, the opposite pole turns it OFF.
- Wide supply voltage range for easy integration into electronics modules and systems.
- High operating temperature capability for harsh environments.
- Suitable for position detection, speed sensing, and magnetic switch functions.
- Compatible with Arduino and other microcontrollers; can interface with Raspberry Pi using a proper pull-up or level shifting.
📐 Technical Specifications
- Operating Voltage: 3.5 V to 24 V
- Output Type: Digital (latching behavior)
- Sensing Distance: Depends on magnet strength, geometry, and alignment
- Operating Temperature: -40°C to 150°C
- Hysteresis: Typically ~25 Gauss
🔧 Applications
- Position detection (limit switches, door sensors, proximity triggers)
- Speed measurement and tachometers (fan RPM, gear tooth sensing)
- Magnetic switch applications
🧩 Pinout and Wiring Notes
The US1881 is commonly supplied in a 3-pin SIP/TO-92 package with pins for VCC, GND, and OUT. Pin order may vary by manufacturer—always check the specific datasheet. A typical wiring setup is:
- VCC: 5 V (Arduino) or within 3.5–24 V per spec
- GND: Common ground
- OUT: Connect to a digital input; use a pull-up resistor (e.g., 10 kΩ) if the variant has an open-collector/open-drain output
Arduino: Power at 5 V and read the digital output; enable an internal or external pull-up if needed.
Raspberry Pi: Use a 3.3 V pull-up on the OUT line. If the sensor’s output stage is push-pull (not open-collector), use a level shifter to protect 3.3 V GPIO.
🤖 Using the US1881 Hall Sensor with Arduino
When paired with an Arduino, the US1881 can detect a magnet and generate a digital signal. Because it is latching, one pole of the magnet sets the output, and the opposite pole resets it.
💡 Example Arduino Code
Connect OUT to a digital input (e.g., D2). Use an internal pull-up if your sensor requires it:
// US1881 Hall-Effect Sensor (latching) - Basic Readout const int hallPin = 2; // OUT pin from sensor void setup() { pinMode(hallPin, INPUT_PULLUP); // Use external pull-up if preferred Serial.begin(9600); } void loop() { bool active = (digitalRead(hallPin) == LOW); // Active-low for open-collector variants if (active) { Serial.println("Magnet detected (latched ON)"); } else { Serial.println("No magnet / latched OFF"); } delay(100); } 📎 Tips and Integration Notes
- Latching behavior: Requires opposite magnetic polarity to change state; useful for direction-aware sensing.
- Sensing distance depends on magnet strength, size, and alignment; neodymium magnets provide greater range.
- Noise immunity: The ~25 G hysteresis helps avoid chatter near the switching threshold.
- Thermal robustness: Rated up to 150°C for demanding environments.
- Compatibility: Works well in Arduino, Raspberry Pi (with proper logic levels), and other microcontroller-based projects and electronics components modules.