BCP Online Shop

Hall Effect Sensor A1302

Product Code: 954

Stock: Available
TK :95 (pcs)

A Hall Effect Sensor works on the principle of, well, Hall Effect. Simply speaking, a Hall Effect Sensor or IC detects motion, position or change in magnetic field strength of either a permanent magnet, an electromagnet or any ferromagnetic material. A1302 IC can detect magnetic fields. We will then connect this IC to an arduino, so that we the arduino can read the voltage output by the A1302 and we can display the readings to the computer screen.



Supply Voltage: 4.5V-6V

Supply Current: 11mA

Output Voltage: 0.25V-4.65V

Output Resistance: 2-5 Ohms



Test Code

int Sensor_A1302 = 2;
int Relay = 13;
volatile bool ledState = LOW;

void setup()
{
Serial.begin(9600);
pinMode(Sensor_A1302,INPUT);
pinMode(Relay, OUTPUT);
attachInterrupt(digitalPinToInterrupt(Sensor_A1302), hall_ISR, CHANGE);
delay(1000);

}

void loop()
{
digitalWrite(Relay, ledState);
}

void hall_ISR()
{
ledState = !ledState;
}

No one has made any reviews yet.


Related Products