The GH1248 Hall Sensor, manufactured by GoChip Elec Tech, is a versatile electronic component designed to detect magnetic fields and convert them into electrical signals. This sensor is widely used in various applications, including proximity sensing, positioning, speed detection, and current sensing. Its ability to provide accurate and reliable measurements makes it an essential component in many electronic systems.
Parameter | Value |
---|---|
Supply Voltage | 3.3V to 5V |
Output Type | Digital |
Output Voltage | High (Vcc) / Low (0V) |
Current Consumption | 10mA (typical) |
Operating Temperature Range | -40°C to 85°C |
Sensitivity | 1.4mT (typical) |
Response Time | 10µs |
Pin Number | Pin Name | Description |
---|---|---|
1 | Vcc | Power supply (3.3V to 5V) |
2 | GND | Ground |
3 | OUT | Digital output signal |
Arduino UNO GH1248 Hall Sensor
----------- ------------------
5V --------------> Vcc
GND -------------> GND
Digital Pin 2 ---> OUT
// GH1248 Hall Sensor Example Code
// Connect the OUT pin of the GH1248 to digital pin 2 of the Arduino UNO
const int hallSensorPin = 2; // Hall sensor connected to digital pin 2
int sensorState = 0; // Variable to store the sensor state
void setup() {
pinMode(hallSensorPin, INPUT); // Set the hall sensor pin as input
Serial.begin(9600); // Initialize serial communication
}
void loop() {
sensorState = digitalRead(hallSensorPin); // Read the sensor state
if (sensorState == HIGH) {
Serial.println("Magnetic field detected!"); // Print message if magnetic field is detected
} else {
Serial.println("No magnetic field."); // Print message if no magnetic field is detected
}
delay(500); // Wait for 500 milliseconds before the next reading
}
No Output Signal:
Unstable Readings:
Incorrect Readings:
Q1: Can the GH1248 Hall Sensor detect both North and South poles of a magnet? A1: Yes, the GH1248 can detect both North and South poles, but the output signal will be the same for both.
Q2: What is the maximum distance the GH1248 can detect a magnetic field? A2: The detection distance depends on the strength of the magnetic field. Typically, it can detect fields up to a few centimeters away.
Q3: Can I use the GH1248 Hall Sensor in an outdoor environment? A3: Yes, the GH1248 can operate in a wide temperature range (-40°C to 85°C), making it suitable for outdoor use. However, ensure it is protected from moisture and extreme conditions.
Q4: How do I know if the sensor is working correctly? A4: You can test the sensor by bringing a magnet close to it and observing the output signal. If the output changes from LOW to HIGH, the sensor is functioning correctly.
By following this documentation, users can effectively integrate the GH1248 Hall Sensor into their projects, ensuring accurate and reliable magnetic field detection.