

The Hall Effect KY-035 is a magnetic field sensor that detects the presence and strength of a magnetic field and converts it into an electrical signal. This sensor operates based on the Hall effect principle, where a voltage is generated perpendicular to the flow of current in the presence of a magnetic field. The KY-035 is widely used in applications such as position sensing, speed detection, proximity sensing, and current measurement. Its compact design and ease of use make it a popular choice for hobbyists and professionals alike.








The KY-035 has three pins, as detailed in the table below:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin (3.3V to 5V DC) |
| 2 | GND | Ground pin |
| 3 | OUT | Output pin (Analog or Digital signal output) |
The following example demonstrates how to use the KY-035 with an Arduino UNO to read both analog and digital outputs:
// Define pin connections
const int analogPin = A0; // KY-035 analog output connected to A0
const int digitalPin = 2; // KY-035 digital output connected to D2
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(digitalPin, INPUT); // Set digital pin as input
}
void loop() {
// Read analog value from the sensor
int analogValue = analogRead(analogPin);
Serial.print("Analog Value: ");
Serial.println(analogValue);
// Read digital value from the sensor
int digitalValue = digitalRead(digitalPin);
Serial.print("Digital Value: ");
Serial.println(digitalValue);
// Add a small delay to avoid flooding the serial monitor
delay(500);
}
No Output Signal
Inconsistent Readings
Digital Output Always HIGH or LOW
Q: Can the KY-035 detect both north and south poles of a magnet?
A: Yes, the KY-035 can detect both poles of a magnet, but the output signal will vary depending on the pole's orientation and strength.
Q: Is the KY-035 suitable for high-speed applications?
A: The KY-035 is suitable for moderate-speed applications. For high-speed sensing, consider using a sensor with a faster response time.
Q: Can I use the KY-035 with a 3.3V microcontroller?
A: Yes, the KY-035 operates at both 3.3V and 5V, making it compatible with 3.3V microcontrollers like the ESP32 or Raspberry Pi Pico.
By following this documentation, you can effectively integrate the Hall Effect KY-035 sensor into your projects for reliable magnetic field detection.