Role of Pull up in reducing noise in a hall effect sensor.

Thread Starter

DonBradman

Joined Mar 30, 2023
40
What decides the choice of value of pull up resistors in hall effect sensors?

I have flow sensing system with a hall effect sensor. I was facing some erratic behavior when trying to take out known volume from this sensor. Sometimes it would give out the desired volume in a particular pulse count, sometimes it would give out less. A friend suggested noise and EMI issues, and suggested using a pull up resistor to sort it out. This friend suggested a 10K, but I need to understand why 10K, why not 1K or 100K? How does pull up resistor help sort noise issues, how to choose resistor value.
 

Ian0

Joined Aug 7, 2020
10,293
That's a really poor datasheet - it doesn't give any of the important details of the output.
Many Hall-effect switches have open -collector outputs, and so won't work without a pullup resistor.
If you are connecting it to a CMOS input, any value will work between about 330Ω and 1M. Most microcontrollers have a pullup option on the inputs which you can switch on.
A lower value will give more immunity from interference and work better with a long cable, but, as the resistor will be taking current about half the time, a higher value will give lower power consumption and better battery life.
You can look up (or measure) the cable capacitance, then make sure that 3RC< the shortest period that the sensor has to measure. (R=pullup, C=cable capacitance)
 

Thread Starter

DonBradman

Joined Mar 30, 2023
40
That's a really poor datasheet - it doesn't give any of the important details of the output.
Many Hall-effect switches have open -collector outputs, and so won't work without a pullup resistor.
If you are connecting it to a CMOS input, any value will work between about 330Ω and 1M. Most microcontrollers have a pullup option on the inputs which you can switch on.
A lower value will give more immunity from interference and work better with a long cable, but, as the resistor will be taking current about half the time, a higher value will give lower power consumption and better battery life.
You can look up (or measure) the cable capacitance, then make sure that 3RC< the shortest period that the sensor has to measure. (R=pullup, C=cable capacitance)
See, I am confused because if low value resistance is better for immunity from interference, then why isn't zero resistance best? Power consumption isn't a big deal for me, I am not using a battery but the mains through DC convertors. Also, this sensor is supposed to give pulses High. But if we pull up the signal pin to 5V, wouldn't the pin be constantly high?

You are right this is a poor datasheet. I tried another sensor with similar issues, and just could not find any datasheet for this one. Also nowhere do these guys mention how to orient this. I get that orientation should be horizontal, but should the wires be coming out towards the up or down? Could that have an effect?
 

Ian0

Joined Aug 7, 2020
10,293
See, I am confused because if low value resistance is better for immunity from interference, then why isn't zero resistance best? Power consumption isn't a big deal for me, I am not using a battery but the mains through DC convertors. Also, this sensor is supposed to give pulses High. But if we pull up the signal pin to 5V, wouldn't the pin be constantly high?

You are right this is a poor datasheet. I tried another sensor with similar issues, and just could not find any datasheet for this one. Also nowhere do these guys mention how to orient this. I get that orientation should be horizontal, but should the wires be coming out towards the up or down? Could that have an effect?
Zero resistance would be excellent to avoid interference, but it would eliminate the signal as well.
I quoted a minimum of 330Ω because the output has to pull the line down to 0V and and current of 5V/330Ω=15mA will flow in the resistor.
The line is pulled up with a resistor so that the output can pull it down to create the pulse.

There is another reason to use a pull-up resistor - it allows the logic voltage levels to be different from the power supply voltage. The device can be supplied with any voltage from 5V to 18V, but the logic levels are defined by the voltage at the other end of the pullup resistor. e.g. a pull-up resistor connected to 5V will result in logic levels of 0V/5V even though the power supply is 12V or 18V or whatever.
 
Top