US5881LUA Hall Effect Sensor Output Stuck LOW - digitalRead() returns 0 at 3.8V

Hi everyone,

I am working on a fan speed monitoring project using the US5881LUA Hall effect sensor (Adafruit Product 158) with Arduino and cannot resolve a persistent issue after hours of troubleshooting.

Setup:

  • US5881LUA: Pin 1 (VDD) → 5V, Pin 2 (GND) → GND, Pin 3 (OUT) → Arduino digital pin
  • 10K pull-up resistor between OUT and 5V
  • 100nF capacitor between VDD and GND
  • Supply voltage confirmed at 4.8-4.9V
  • South pole of neodymium disc magnet, flat/branded face of sensor facing magnet

Tested on:

  • Arduino Uno R3 and Arduino Mega 2560
  • Pins D2, D3, D4, D5, D6, D8, A2 on Uno, D6 and D22 on Mega
  • 3 brand new sensors
  • Two different breadboards
  • With and without external pull-up resistor
  • INPUT_PULLUP and INPUT modes

Problem:
The sensor OUT pin reads LOW constantly regardless of magnet presence. When the signal wire is disconnected from the Arduino pin, it correctly reads HIGH. The moment it connects to any Arduino pin it goes LOW and stays LOW.

Key finding:
With a multimeter, the signal pin reads 3.8V when connected with INPUT_PULLUP and no external resistor. This should read as HIGH on a 5V Arduino but digitalRead() returns 0. With a 10K pull-up, signal drops to 1.4V, suggesting the output transistor is partially conducting with no magnet present.

The sensor briefly produced correct RPM readings earlier in testing when used completely alone with no other components connected. A separate ESP32-based setup in our lab using the same sensors showed identical behavior - LED indicator constantly ON regardless of magnet presence.

Has anyone seen this before? Could the Arduino Uno having been involved in a short circuit incident have damaged its input threshold circuitry? Any help appreciated - this is a USDA funded research project.

Thank you

Consider showing your sketch, a schematic, and clear, well lit, in focus pictures of your wiring.

Disconnect from arduino. Put 10k pullup between output pin and +5. With no arduino connected what voltage does your meter measure between output pin and GND with and without the magnet?

Are you saying the output is ok as long as it isn't connected to the Arduino?

If so, check the Arduino pin with the 10K resistor to 5v and no device connected.

@ van_der_decken @cedarlakeinstruments @SurferTim

Thank you all for the quick responses. Here is everything we have tested:

Sketch being used is below:

void setup() {
Serial.begin(9600);
pinMode(3, INPUT_PULLUP);
}

void loop() {
Serial.println(digitalRead(3));
delay(100);
}


**Answer to cedarlakeinstruments:**
We disconnected the Arduino completely and put a 10K resistor between the signal pin and 5V with no Arduino connected. Results:

* No magnet present: signal pin reads 1.4-1.5V
* With magnet present: no change, still 1.4-1.5V

**Answer to SurferTim:**
Yes — when the signal wire is NOT connected to the Arduino, the pin reads HIGH (1) correctly. The moment we connect the signal wire to any Arduino pin, digitalRead() returns LOW (0) and stays there regardless of magnet.

**Additional findings:**

* Tested with INPUT_PULLUP and no external resistor — signal pin reads 3.8V on multimeter but digitalRead() still returns 0
* Tested on Arduino Uno R3 and Arduino Mega 2560 with identical results
* Tested on pins D2, D3, D4, D5, D6, D8, A2 on Uno and D6, D22 on Mega
* Tested 3 brand new sensors from Adafruit
* Tested on two different breadboards
* The Arduino Uno was previously involved in a short circuit incident — could this have damaged the input threshold circuitry?

Are you certain the pins are connected correctly? Not reversed?

Common ground from Arduino to device?

@SurferTim Yes, pins are confirmed correct per the datasheet — Pin 1 (VDD) to 5V, Pin 2 (GND) to GND, Pin 3 (OUT) to Arduino digital pin. We have verified this multiple times with 3 different sensors.

Yes, common ground is shared between the Arduino and the sensor. The GND wire goes directly from the sensor to the Arduino GND pin.

Using such a powerful magnet is ridiculous! If your fan is steel, you have likely magnetized it. Try a tiny cheap magnet, Smaller the better!

The 1.5v output from the device should show LOW on the Arduinos you are using.

@Paul_KD7HB @SurferTim Additional information — the fan we are using is plastic so magnetization of steel fan components is not the issue. Also we are testing on a wooden workbench with no steel nearby.

Most importantly: with the sensor powered at 5V and the 10K pull-up resistor connected but the Arduino completely disconnected, the signal pin reads 1.5V constantly with no magnet present and does not change at all when we bring the magnet close in any orientation.

This suggests the sensor output transistor is permanently conducting regardless of magnetic field. Could all 3 brand new sensors be damaged? Or is there something about our 5V power supply causing this?

One more thing worth mentioning - we are wondering if the sensors could be latched. The US5881 datasheet describes a hysteresis characteristic where the output switches at BOP (operating point) and releases at BRP (release point). Is it possible that our neodymium magnet, which we have been using extensively throughout testing, has permanently latched the sensor output LOW? If so, would removing all magnetic fields and power cycling the sensor reset it, or is there a specific procedure to unlatch it?

At how much current? Your device can draw 50ma as per the data sheet.

Also, I see your device will operate differently based on which magnetic pole is closest to the device.

@Paul_KD7HB We have not measured current draw directly. The 5V supply is from the Arduino USB connection to a computer, or alternatively a 3A power bank. The voltage measures 4.8-4.9V under load.

Regarding the magnetic pole — yes we are aware the UA package responds only to the south pole on the branded face. We have tried both poles of the magnet in all orientations with no change in sensor output. The signal pin reads 1.5V constantly regardless of magnet presence or orientation.

The the device is dead or your wiring is wrong. Time for a schematic of your circuit!

@Paul_KD7HB Here is the wiring:

US5881 Pin Connection
Pin 1 (VDD) Arduino 5V
Pin 2 (GND) Arduino GND
Pin 3 (OUT) Arduino D3 + one leg of 10K resistor
10K resistor other leg Arduino 5V

So Pin 3 (OUT) is pulled HIGH to 5V through the 10K resistor, and the Arduino reads that same pin.

We have tested 3 brand new sensors purchased directly from Adafruit with this exact wiring and get identical results on all of them. Could all 3 sensors be dead? Is there anything wrong with this wiring?

Are you certain there are no AC magnetic sources nearby? An o-scope would be helpful.

The 1.5v reading is strange. I presume you are using a voltmeter. The device uses an open collector output driven by a comparator that should be either near 5v or 0v.

Where are the capacitors that the data sheet shows?

That matches the description on the AdaFruit page:
"To use connect power to pin 1 (all the way to the left), ground to pin 2 (middle) and then a 10K pull up resistor from pin 3 to power."
[Edit: This is wrong as pointed out by Jim]

However, the datasheet link on the AdaFruit page disagrees:


[/Edit]
[Edit: I had a look on the AdaFruit forum. I was going to ask about this discrepancy, but I see you already have a thread on there about this problem so maybe you could ask]

Looks the same to me.

Are you sure you don't have it backwards?