The A3144 output is open-collector, so it needs a pull-up resistor to read HIGH. It pulls LOW when the right magnet pole is near.
What the message means
An open-collector output can only pull the line down. Something must pull it up when the sensor is off.
Fix it in this order
- Connect a pull-up resistor of about 10 kohm from the output to the supply, or use INPUT_PULLUP.
- Connect power and ground to the right legs. Check the datasheet pin order for your part.
- Turn the magnet over. The sensor responds to one pole facing it.
- Read the state: it is LOW when the magnet is detected.
- Keep the magnet close enough, at a few millimetres.
- For speed counting use an interrupt on the falling edge.
Why it happens
The A3144 is an open-collector Hall sensor. Its output transistor can only pull the line LOW; it cannot drive HIGH by itself. Without a pull-up resistor to a positive supply, the line floats when the magnet is away, so a digital input reads an unpredictable level. The resistor gives the line a defined HIGH, and the sensor pulls it LOW when a suitable magnetic pole is close enough.
The sensor responds only to one magnetic pole, and only within a limited distance. A magnet with the wrong pole facing it, or one held too far away, leaves the transistor off, so the line stays HIGH. Power and ground must also reach the correct pins, since reversed supply can damage a part. Check the datasheet’s pin diagram for your package before wiring, because pin order differs between variants.
If you see this, do this
| You see | Do this |
|---|---|
| Always HIGH | Wrong magnet pole or too far. |
| Floating values | No pull-up. |
Confirm the fix
- With the sensor powered and no magnet nearby, measure the output pin to ground; it should read close to the supply voltage.
- Bring a magnet slowly toward the face of the sensor; the output should drop toward ground and back up when the magnet leaves.
- If the output does not drop, flip the magnet and repeat; a serial print of digitalRead inside loop confirms the change.
Common mistake: Many readers assume a Hall sensor works like a switch that drives both states, so they skip the pull-up and wonder why the input floats.
Related
pull-up input, encoder counts.
Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.
Why this happens
The A3144 is a unipolar Hall switch. Inside, a Hall element senses the magnetic field and a comparator turns on an output transistor when the field passes a threshold. The transistor connects the output pin to ground and nothing else, which is what open-collector means. When the field is off, the transistor is off and the pin is not connected to anything, so it floats.
A pull-up resistor from the output to the supply gives the pin a defined high level. The sensor then pulls it low when switched on. The switch responds to one pole only, which is normally the south pole facing the branded face of the sensor, though you should confirm that in your datasheet. The opposite pole usually does nothing.
How to confirm the cause
- With power connected and no magnet, measure the output pin to ground. Near the supply voltage means the pull-up works; a floating, wandering reading means there is none.
- Move a magnet slowly toward the branded face. The output should drop close to 0 V and rise again when the magnet leaves.
- If nothing happens, turn the magnet over and repeat. No change on either pole means the sensor is wired wrongly or damaged.
- Check the pins against the datasheet for your package. A reversed supply can damage the part.
- Reduce the distance. The sensor needs the magnet within a few millimetres for a typical small magnet.
Worked example
With a 10 kohm pull-up on 5 V, the current when the output is low is 5 / 10000 = 0.5 mA, well within the sensor’s limit. This sketch counts pulses on pin 2 and shows speed in revolutions per minute for one magnet per revolution.
volatile unsigned long pulses = 0;
void onPulse() { pulses++; }
void setup() {
Serial.begin(9600);
pinMode(2, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(2), onPulse, FALLING);
}
void loop() {
delay(1000);
noInterrupts(); unsigned long n = pulses; pulses = 0; interrupts();
Serial.println(n * 60); // pulses per second x 60 = RPM
}Check that the output is connected to the pin you declared and that the magnet passes close to the sensor face on each revolution.
Common mistakes
- Expecting a high output when the magnet is present. The output goes low.
- Using a pull-up to 5 V on a pin of a 3.3 V board.
- Using a weak magnet or one that is too far away.
- Counting RISING and FALLING edges together and doubling the count.
If this did not fix it
- Bounce or extra pulses on long wires: use a stronger pull-up such as 4.7 kohm or shorter wiring.
- Missed pulses at high speed: check the sensor’s switching speed and use an interrupt, not polling.
- Magnet strength: the sensor needs a minimum field, which a very small magnet may not supply.