Linear Hall Effect Sensor

Linear Hall Sensor is a sensor which detects the magnetic fields and produces an equivalent voltage across its terminals, the analog value from the terminals are taken into an ADC which converts the analog signals to its respective Digital value and transmits it through Output pin. The Hall effect sensor is an orientation based sensor ie; the sensor the detect the poles of an magnetic field source head to head, any other orientation leading to misallignment will not be detected by the sensor. PIN Description: 1. Vcc: 5V or 3.3V from the microcontroller 2. GND: Ground pin of the Mircontroller 3. A0: Analog Output 4. D0: Digital Output

Image result for hall effect sensor

int hsensor=3;
void setup() {
  // put your setup code here, to run once:
pinMode(hsensor, INPUT);

void loop() {
  // put your main code here, to run repeatedly:
int sensor=analogRead(hsensor);

Leave a Comment

Your email address will not be published. Required fields are marked *