# What happens: n Hall effect sensors wired in parallel, < n of them is triggered?

This is almost certainly a noob-level question. I only have one Hall effect sensor to play around with so I can't test this out for myself.

Say I have multiple Hall effect sensors wired like this, but their output pins all connect to the same pin on an Arduino. Namely:

• all left legs tied to 5V
• all center legs to ground
• output pins to 5V via a pullup resistor and also to the same Arduino pin

(image credit to Wei-Hsiung Huang)

With the pullup, digitalRead()will normally be HIGH, going LOW when a magnet triggers the switch. What I'm unsure of is what happens in the scenario of multiple outputs tied together and one sensor being triggered. Could someone help me understand which of these occurs?

• the other pins keep the output HIGH since they are still HIGH
• the activated pin is like a connection to ground, so the output goes LOW

Followup: in the dream scenario where all of them go LOW upon one activating, do they need separate physical pullups, or would it work to have them all tied directly to the Arduino using pinMode(pin, INPUT_PULLUP)?

Edit: I'm not familiar with all the different types, but per Michael's comment I should have included a specific example. I was considering this sensor, the AH3390Q-P-B from Diodes Incorporated. That said, for the sake of generality, if there were specific cases where this would/would not work, it might be useful to specify for other readers.

For two other examples, Adafruit supplies the Melexis US5881 and Amazon seems to almost exclusively sell the Allegro A3144.

• Without looking at the datasheet, the digital out is likely a common drain/common emitter type of circuit, so the out node will be pulled down to ground. This means that you can do a bunch in parallel, and if any one sensor triggers the output node will go low (known as a wired OR configuration). Only when all sensors are outputting high will the out node be high. You should still only need one pull-up resistor. This resistor can be internal or external. – Michael Feb 12 '20 at 2:52
• @Michael thanks for the response! Apologies, I indeed should have included a specific example as I'm sure the type matters. I updated my answer with a link to the specific example I had mind for my application and two other common ones I ran across that would probably be relevant to other hobbyists. – Hendy Feb 12 '20 at 3:16