U18 US1881 OH188 1881 Hall Effect Sensor Magnetic Detector

U18 US1881 OH188 1881 Hall Effect Sensor Magnetic Detector
U18 US1881 OH188 1881 Hall Effect Sensor Magnetic Detector
0.80€
100 or more 0.47€
1000 or more 0.17€
  • Stock: In Stock
  • Product Code: SNA001.US1881
  • Weight: 0.30

U18 US1881 OH188 1881 Hall Effect Sensor Magnetic Detector

The US1881 Hall effect sensor is a digital output magnetic field detector. It can detect the presence and direction of magnetic fields. This sensor is commonly used in automotive, industrial, and consumer electronics applications. The US1881 provides a digital signal when a magnet is brought close to it.

Technical Specifications:

  • Operating Voltage: 3.5V - 24V
  • Output Type: Digital
  • Sensing Distance: Depends on the strength of the magnet
  • Operating Temperature: -40°C to 150°C
  • Hysteresis: Typically 25 Gauss

Applications:

  • Position detection
  • Speed measurement
  • Tachometers
  • Magnetic switch applications

Using US1881 Hall Sensor with Arduino

The US1881 Hall sensor, when used with an Arduino, can detect the presence of a magnet and produce a digital signal. Here is an example code for using the US1881 sensor with an Arduino:

Required Components:

  • Arduino Uno
  • US1881 Hall Sensor
  • Connecting wires
  • Magnet

Connection Diagram:

  • Connect the Vcc pin of the US1881 to the 5V pin on the Arduino.
  • Connect the GND pin of the US1881 to the GND pin on the Arduino.
  • Connect the OUT pin of the US1881 to the digital pin 2 on the Arduino.

const int hallPin = 2;  // Pin where the Hall sensor output is connected
int hallState = 0;      // Variable to store the state of the Hall sensor

void setup() {
  Serial.begin(9600);   // Initialize serial communication
  pinMode(hallPin, INPUT);  // Set hallPin as an input
}

void loop() {
  hallState = digitalRead(hallPin);  // Read the state of the Hall sensor

  if (hallState == HIGH) {
    Serial.println("Magnet detected");  // Print message when magnet is detected
  } else {
    Serial.println("No magnet");        // Print message when no magnet is detected
  }
  delay(500);  // Wait for 500 milliseconds
}

Explanation:

  • In the setup() function, serial communication is initialized, and the Hall sensor output is set as an input.
  • In the loop() function, the state of the Hall sensor is read. If the sensor detects a magnet, "Magnet detected" is printed to the serial monitor. Otherwise, "No magnet" is printed.
  • The delay(500) function creates a 500-millisecond delay between sensor readings.

This simple project allows you to observe whether the US1881 Hall sensor detects a magnet using your Arduino.

Write a review

Note: HTML is not translated!
Rating
Bad Good

Related Products

1kg Load Cell Weight Sensor for Electronic ScaleOur 1kg Load Cell Weight Sensor is a high-quality, precision measurement tool designed to provide accu..
2.51€
Add to Cart
5kg Load Cell Weight Sensor Our 5kg Load Cell Weight Sensor is a high-quality, precision measurement tool designed to provide accurate weight measurem..
2.30€
AM2301A Digital Temperature Humidity Sensor Module The AM2301A, also known as DHT21, is a digital temperature and humidity sensor. Here's some informa..
6.90€
Add to Cart
DHT11 Digital Temperature Humidity Sensor Temperature Sensor The DHT11 is a basic, low-cost digital temperature and humidity sensor. It is popular in ..
1.01€
Add to Cart
DHT21 AM2301 Digital Temperature Humidity Sensor ModuleThe DHT21 (also known as AM2301) is a digital temperature and humidity sensor. It is widely use..
6.07€
Add to Cart
DHT22 AM2302 Digital Temperature Humidity Sensor Module The DHT22, also known as the AM2302, is a high-accuracy digital temperature and humidity senso..
5.70€
Add to Cart