A Hall Effect Sensor is transducer that varies its output voltage in response to magnetic field.
Step 1 : components require
- Hall effect sensor (we use AH44E sensor)
- 10M resistor
- 3 wires for connection
- Arduino uno
- any type of magnet
- Resistor connect between pin 1(+vcc) & pin 3(digital output)
Step 3 : connection
Step 4 : load program to arduino
Below program are paste in arduino programing
const int hallPin = 12; // number of the hall effect sensor pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int hallState = 0; // the hall sensor status
void setup() {
// initialize the LED pin as output:
pinMode(ledPin, OUTPUT);
// initialize the hall effect sensor pin as input:
pinMode(hallPin, INPUT);
}
void loop(){
// read the state of the hall effect sensor:
hallState = digitalRead(hallPin);
if (hallState == LOW) {
// turn LED on:
digitalWrite(ledPin, HIGH);
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
Watch Video :
This comment has been removed by the author.
ReplyDeletemr Rutvik Karkar
ReplyDeletethank you very much
more power more success