Hall-Effect Sensor: 1,2,3 Are The Leg Numbers We See Protruding Out of The Sensor
Hall-Effect Sensor: 1,2,3 Are The Leg Numbers We See Protruding Out of The Sensor
Hall-Effect Sensor: 1,2,3 Are The Leg Numbers We See Protruding Out of The Sensor
1.Introduction
Hall-effect sensors are transducers, the device varies output voltage
in response to a magnetic field. They are widely used as non-physical
on-off switches. When a magnetic field is present near a hall effect
sensor, the output voltage tends to zero. They see application as
proximity switching, positioning, speed detection, and current
sensing applications.
2.Theory
How it works?
In a Hall-effect sensor, a thin strip of metal has a current applied to
it. In the presence of a magnetic field, the electrons in the metal strip
are deflected toward one edge, this increases the resistance and thus
leads to an output voltage drop.
https://en.wikipedia.org/wiki/Hall_effect
(for scientifically accurate explanation)
1,2,3 are the leg numbers we see protruding out of the sensor…
CODE:
int hallSensorPin = 2;
int state = 0;
void setup() {
pinMode(hallSensorPin, INPUT);
}
void loop() {
state = digitalRead(hallSensorPin);
if (state == LOW)
Serial.println("ON");
else
Serial.println("OFF");
delay(250);
}
Schematic: