Skip to content

Hall Effect Sensor

kento-bushey edited this page Apr 3, 2026 · 7 revisions

Hall Effect Sensor

Component Specifications

  • Linear Hall effect sensor
  • Both sides are magnetically sensitive
  • Round side exhibits higher sensitivity than flat side

Link to product: A1302 Linear Hall Effect Sensors Chip

Hall Effect Orientation

Pinout (Flat Face Toward You)

Pin Position Wire Color Function
Left Green Signal
Middle Black Ground
Right Red VCC
Soldered Hall Effect Sensor

Storage:

Linear Hall Effect Sensor Specs

Example Arduino Code

/*
                      ----- Power
Flatt side of sensor  ----- Ground
                      ----- Output
*/

/*
Round side is more sensitive to magnets (Both sides are sensitive). 
*/


const int hallPin = A0;
const int LEDPin = 2;

const int center = 125;

void setup() {
  Serial.begin(9600);
  pinMode(LEDPin, OUTPUT);
}

void loop() {
  int raw = analogRead(hallPin) >> 2;
  int val = raw - center;

  val = constrain(val * 100 / 125, -100, 100);

  Serial.println(val);

  if (val>35){
    digitalWrite(LEDPin,HIGH);
    Serial.print("ON");
  }else{digitalWrite(LEDPin,LOW);}

  delay(50);
}

Waterproofing

Using two-part epoxy resin, fill a 'coffin' with the resin and leave overnight.

IMG_3872 IMG_3878

Video link of testing https://youtube.com/shorts/SlB_8biHOKQ

Clone this wiki locally