Hi Guys
Can anyone give me a rule of thumb as to the strength of magnet required to change the state of a A3144 hall effect sensor?
I have a batch of 10 of these sensors and not one of them is affected in any way by a neodymium magnet that takes a pull of about 20lb plus to remove from a metal surface. They are connected as per the data sheet. As I don't have access to a gauss measuring device, its a mechanical figure I'm looking for.
Hi Spycatcher
Yes I'm using the internal pull-up resistor.
Here's the sketch I was using to check the sensors.
const int hallPin = 12; // the number of the hall effect sensor pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int hallState = 0; // variable for reading the hall sensor status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the hall effect sensor pin as an input:
pinMode(hallPin, INPUT_PULLUP);
}
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);
}
}
STOP PRESS...
Would you $%^& believe it? Out of the batch of 10, I have just found one that works. Double checked all the rest and yup, 9 faulty sensors and just one working one! Could they have been damaged by storing them in a small box in close proximity to the magnet for about a year do you think?