Hall effect sensor US5881LUA doesn't work with internal pull up resistor?

Hey there,

I'm trying to get US5881 working with my Arduino UNO without an external pull-up 10K resistor. I want to use the internal resistor.

No matter what I'm trying to do or whatever magnet I'm using, I'm not getting any signal from the sensor. Doesn't it work with the inernal pull-up resistor?

Here's a small sample code what I'm using to debug this thing:

void setup() {
  // put your setup code here, to run once:

void loop() {
  // put your main code here, to run repeatedly:
  if(digitalRead(2)== LOW){
    Serial.println(" ON");
    Serial.println(" OFF");

For proper operation, a 100nF bypass capacitor should be placed as close as possible to the device between the VDD and ground pin.

Do you have the cap installed?

The US5881 is unipolar … you’re US5881LUA package is south pole active - using any other magnetic field will not affect its output.


Prior to Arduino 1.0.1, it was possible to configure the internal pull-ups in the following manner:

pinMode(pin, INPUT); // set pin to input digitalWrite(pin, HIGH); // turn on pullup resistors


Still can as far as I know.